/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Eurostile:wght@400&display=swap');

/*
ATX Defense Brand Identity:
- Background: #323232 (Dark Gray)
- Primary/Button Color: #D15E14 (Orange)
- Headlines (h1, h2, h3, h4): Eurostile Regular (font-weight: 400)
- Body text: Open Sans Regular (font-weight: 400)
- Labels, buttons, emphasis: Open Sans SemiBold (font-weight: 600)  
- Strong emphasis: Open Sans Bold (font-weight: 700)
*/

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    font-weight: 400; /* Open Sans Regular */
    line-height: 1.6;
    color: #333;
    background: #323232; /* ATX Defense brand background */
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.header {
    color: white;
    margin-bottom: 40px;
    padding: 40px 20px;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    max-width: 1200px;
    margin: 0 auto;
    gap: 30px;
}

.logo-section {
    flex-shrink: 0;
}

.company-logo {
    height: 50px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
    border-radius: 4px;
}

/* Fallback styling if logo is missing */
.company-logo:not([src]), .company-logo[src=""] {
    display: none;
}

.title-section {
    flex: 1;
    text-align: center;
}

.header h1 {
    font-family: 'Eurostile', 'Arial Black', sans-serif;
    font-size: 2.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.header h2 {
    font-family: 'Eurostile', 'Arial Black', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 10px;
    opacity: 0.9;
}

.header p {
    font-size: 1.1rem;
    opacity: 0.8;
}

/* Main content */
.main-content {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Steps */
.step {
    display: none;
    width: 100%;
    max-width: 600px;
}

.step.active {
    display: block;
}

/* Cards */
.card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

.card h3 {
    font-family: 'Eurostile', 'Arial Black', sans-serif;
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 15px;
    color: #2c3e50;
}

.card p {
    margin-bottom: 25px;
    color: #666;
    font-size: 1rem;
}

/* Form elements */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input[type="text"] {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e6ed;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input[type="text"]:focus {
    outline: none;
    border-color: #D15E14; /* ATX Defense brand orange */
    box-shadow: 0 0 0 3px rgba(209, 94, 20, 0.1);
}

/* File upload area */
.file-upload-area {
    position: relative;
    border: 2px dashed #e0e6ed;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: border-color 0.3s ease, background-color 0.3s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #D15E14; /* ATX Defense brand orange */
    background-color: #fef5f0; /* Light orange background */
}

.file-upload-area.dragover {
    border-color: #D15E14; /* ATX Defense brand orange */
    background-color: #fef0e7; /* Slightly darker orange background */
}

.file-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.upload-prompt {
    pointer-events: none;
}

.upload-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 15px;
    fill: #D15E14; /* ATX Defense brand orange */
}

.upload-prompt p {
    margin: 10px 0;
    color: #666;
}

.file-types {
    font-size: 0.9rem;
    color: #999;
}

/* Selected files */
.selected-files {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 8px;
}

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    fill: #D15E14; /* ATX Defense brand orange */
}

.file-name {
    font-weight: 600; /* Open Sans SemiBold */
    color: #2c3e50;
    margin-right: 10px;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
}

.file-remove {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.file-remove:hover {
    background-color: #ffeaea;
}

/* Upload info */
.upload-info {
    background: #f8f9ff;
    border: 1px solid #e0e8ff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.upload-info h4 {
    font-family: 'Eurostile', 'Arial Black', sans-serif;
    font-weight: 400;
    color: #2c3e50;
    margin-bottom: 10px;
}

.upload-info ul {
    list-style: none;
    padding-left: 0;
}

.upload-info li {
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.upload-info li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: bold;
}

/* Download info */
.download-info {
    background: #f8fff9;
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.download-info h4 {
    font-family: 'Eurostile', 'Arial Black', sans-serif;
    font-weight: 400;
    color: #2c3e50;
    margin-bottom: 10px;
}

.download-info p {
    color: #666;
    margin-bottom: 15px;
}

.download-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.download-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    transition: border-color 0.2s ease;
}

.download-item:hover {
    border-color: #D15E14; /* ATX Defense brand orange */
}

.download-content {
    flex: 1;
}

.download-content h5 {
    font-family: 'Eurostile', 'Arial Black', sans-serif;
    font-weight: 400;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1rem;
}

.download-content p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #D15E14; /* ATX Defense brand orange */
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.download-btn:hover {
    background: #b84f0f;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(209, 94, 20, 0.3);
}

.download-icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    position: relative;
    min-width: 120px;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #D15E14; /* ATX Defense brand orange */
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(209, 94, 20, 0.4); /* Orange shadow */
}

.btn-secondary {
    background: #f8f9fa;
    color: #666;
    border: 1px solid #e0e6ed;
}

.btn-secondary:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #adb5bd;
}

.btn-loading {
    display: none;
}

.btn.loading .btn-text {
    display: none;
}

.btn.loading .btn-loading {
    display: inline;
}

.button-group {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Success card */
.success-card {
    text-align: center;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-icon svg {
    width: 40px;
    height: 40px;
    fill: white;
}

.upload-summary {
    background: #f8fff9;
    border: 1px solid #d4edda;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9f7ef;
}

.summary-item:last-child {
    margin-bottom: 0;
    border-bottom: none;
}

.next-steps {
    background: #f8f9ff;
    border: 1px solid #e0e8ff;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
    text-align: left;
}

.next-steps h4 {
    font-family: 'Eurostile', 'Arial Black', sans-serif;
    font-weight: 400;
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Error messages */
.error-message {
    color: #e74c3c;
    font-size: 0.9rem;
    margin-top: 8px;
    padding: 8px 12px;
    background: #ffeaea;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Footer */
.footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 40px;
    opacity: 0.8;
}

.footer p {
    margin-bottom: 10px;
}

.footer a {
    color: white;
    text-decoration: underline;
}

.footer a:hover {
    opacity: 0.8;
}

/* Responsive design */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .header {
        padding: 20px 10px;
        margin-bottom: 20px;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .company-logo {
        height: 60px;
        max-width: 150px;
    }
    
    .title-section {
        text-align: center;
    }
    
    .header h1 {
        font-size: 2rem;
    }
    
    .header h2 {
        font-size: 1.3rem;
    }
    
    .card {
        padding: 25px 20px;
    }
    
    .button-group {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn.loading::after {
    content: "";
    width: 16px;
    height: 16px;
    margin-left: 10px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Collapsible templates section */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease;
}

.collapsible-header:hover {
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}

.collapsible-header h4 {
    margin: 0;
    display: flex;
    align-items: center;
}

.collapse-icon {
    width: 20px;
    height: 20px;
    transition: transform 0.3s ease;
    fill: #007bff;
}

.collapsible-content {
    transition: all 0.3s ease;
    overflow: hidden;
}

.collapsible-content p {
    margin-top: 10px;
    margin-bottom: 15px;
}