/**
 * eCOUNT Formulare - Unified Styles
 * Modern, professional design for both Simple Contact and Quote Request forms
 * eCOUNT CI colors: #4A90E2 (primary), #7ED321 (accent), #e74c3c (quote accent)
 */

/* ================================
   Base Styles and Reset
   ================================ */

.ecount-simple-form *,
.ecount-quote-form * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.ecount-simple-form,
.ecount-quote-form {
    font-family: 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
    max-width: 1000px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    color-scheme: light;
}

/* ================================
   Form Headers
   ================================ */

.form-header {
    padding: 40px 40px 20px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-bottom: 1px solid #e9ecef;
}

.form-title {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
}

.form-subtitle {
    color: #7f8c8d;
    font-size: 1.1rem;
    text-align: center;
    margin-bottom: 30px;
}

/* ================================
   Progress Indicators
   ================================ */

.progress-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: all 0.3s ease;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    margin-bottom: 8px;
}

.step-number.active {
    background: linear-gradient(135deg, #4A90E2, #2E5BBA);
    color: white;
    transform: scale(1.1);
}

.step-number.completed {
    background: linear-gradient(135deg, #7ED321, #50E3C2);
    color: white;
}

.step-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6c757d;
    text-align: center;
}

.step-indicator.active .step-label {
    color: #2c3e50;
}

/* Progress Bar */
.progress-bar-container {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 20px;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #4A90E2, #7ED321);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ================================
   Step Content
   ================================ */

.step-content {
    display: none;
    padding: 40px;
    min-height: 400px;
}

.step-content.active {
    display: block;
    animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-heading {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.6rem;
    font-weight: 600;
    position: relative;
    padding-bottom: 15px;
}

.step-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #4A90E2, #7ED321);
    border-radius: 3px;
}

.step-description {
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.5;
}

/* ================================
   Form Fields
   ================================ */

.form-field {
    margin-bottom: 20px;
    position: relative;
}

.form-field.required label::after {
    content: ' *';
    color: #e74c3c;
    font-weight: bold;
}

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

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #ffffff;
    color: #2c3e50;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: #4A90E2;
    box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
    transform: translateY(-1px);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #6c757d;
    opacity: 0.7;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: block;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.form-field.error .error-message {
    opacity: 1;
}

.form-field.error input,
.form-field.error textarea {
    border-color: #e74c3c;
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.field-hint {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
}

/* ================================
   Grid Layouts
   ================================ */

.contact-fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.product-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.icd-component-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

/* ================================
   Selection Options
   ================================ */

/* Simple Contact Form - Reason Selection */
.reason-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.reason-option {
    padding: 25px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 15px;
}

.reason-option:hover {
    border-color: #4A90E2;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.15);
}

.reason-option.selected {
    border-color: #4A90E2;
    background: linear-gradient(135deg, #f0f8ff, #ffffff);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.2);
}

.reason-icon {
    flex-shrink: 0;
}

.reason-content h4 {
    margin-bottom: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
}

.reason-content p {
    font-size: 0.9rem;
    color: #7f8c8d;
    line-height: 1.4;
}

/* Quote Form - Business Area Selection */
.business-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.business-option {
    padding: 30px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    position: relative;
    overflow: hidden;
}

.business-option:hover {
    border-color: #3498db;
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.15);
}

.business-option.selected {
    border-color: #3498db;
    background: linear-gradient(135deg, #f0f8ff, #ffffff);
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(52, 152, 219, 0.2);
}

.business-icon {
    text-align: center;
    margin-bottom: 20px;
}

.business-content h4 {
    margin-bottom: 12px;
    font-size: 1.3rem;
    font-weight: 600;
    color: #2c3e50;
    text-align: center;
}

.business-content p {
    font-size: 1rem;
    color: #7f8c8d;
    margin-bottom: 15px;
    text-align: center;
    line-height: 1.5;
}

.business-content small {
    display: block;
    font-size: 0.85rem;
    color: #95a5a6;
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
}

.business-features {
    list-style: none;
    margin-top: 15px;
}

.business-features li {
    padding: 4px 0;
    font-size: 0.9rem;
    color: #6c757d;
    position: relative;
    padding-left: 20px;
}

.business-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #7ED321;
    font-weight: bold;
}

/* ================================
   Product Selection
   ================================ */

.product-section,
.component-section {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.product-section h4,
.component-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
    font-weight: 600;
}

.section-description {
    color: #7f8c8d;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.product-item {
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
}

.product-item:hover {
    border-color: #3498db;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.1);
}

.product-item.selected {
    border-color: #3498db;
    background: linear-gradient(135deg, #f0f8ff, #ffffff);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.15);
}

.product-item input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.product-info strong {
    display: block;
    color: #2c3e50;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.product-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.part-number {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #6c757d;
    font-family: 'Monaco', 'Menlo', monospace;
}

/* ================================
   Accessory Selection
   ================================ */

.accessory-section {
    margin-top: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.accessory-section h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.accessory-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
}

.loading-spinner-small {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e9ecef;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

.accessory-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 12px;
}

.accessory-item {
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    position: relative;
}

.accessory-item:hover {
    border-color: #e74c3c;
    background: #fff5f5;
}

.accessory-item.selected {
    border-color: #e74c3c;
    background: linear-gradient(135deg, #fff5f5, #ffffff);
    transform: translateY(-1px);
}

.accessory-item input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.accessory-item .accessory-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.accessory-item .accessory-desc {
    color: #7f8c8d;
    font-size: 0.85rem;
    margin-bottom: 8px;
    line-height: 1.3;
}

.accessory-item .accessory-part {
    background: #f8f9fa;
    padding: 3px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    color: #6c757d;
    font-family: monospace;
}

/* ================================
   Contact Preferences
   ================================ */

.contact-preferences {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.contact-preferences h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.contact-options {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.contact-option {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: #ffffff;
    min-width: 120px;
}

.contact-option:hover {
    border-color: #7ED321;
    background: #f0fff4;
}

.contact-option.selected {
    border-color: #7ED321;
    background: #f0fff4;
}

.contact-option input[type="checkbox"] {
    margin-right: 8px;
    transform: scale(1.1);
    accent-color: #7ED321;
}

.contact-option label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ================================
   Privacy Policy
   ================================ */

.privacy-policy {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #fff3cd, #ffffff);
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.privacy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.privacy-checkbox input[type="checkbox"] {
    margin-top: 4px;
    transform: scale(1.2);
    accent-color: #4A90E2;
}

.privacy-checkbox label {
    margin-bottom: 0;
    line-height: 1.5;
    color: #2c3e50;
    font-size: 0.95rem;
}

.privacy-checkbox a {
    color: #4A90E2;
    text-decoration: none;
    font-weight: 500;
}

.privacy-checkbox a:hover {
    text-decoration: underline;
}

/* ================================
   Buttons
   ================================ */

.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-decoration: none;
    display: inline-block;
    min-width: 140px;
    text-align: center;
}

.btn:disabled {
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    opacity: 0.6;
}

.btn-primary {
    background: linear-gradient(135deg, #4A90E2, #2E5BBA);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2E5BBA, #1e4ba8);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(74, 144, 226, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #95a5a6, #7f8c8d);
    color: white;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #7f8c8d, #6c7b7d);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(149, 165, 166, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, #7ED321, #50E3C2);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: linear-gradient(135deg, #50E3C2, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(126, 211, 33, 0.3);
}

/* ================================
   Form Navigation
   ================================ */

.form-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 25px;
    border-top: 1px solid #e9ecef;
}

/* ================================
   Confirmation Page
   ================================ */

.confirmation-content {
    text-align: center;
    padding: 40px 20px;
}

.success-animation {
    margin-bottom: 30px;
}

.success-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
    animation: bounce 0.8s ease-in-out;
}

.checkmark {
    filter: drop-shadow(0 4px 8px rgba(76, 175, 80, 0.3));
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-15px); }
    60% { transform: translateY(-8px); }
}

.success-title {
    color: #7ED321;
    margin-bottom: 15px;
    font-size: 2rem;
    font-weight: 700;
}

.success-message {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 30px;
    line-height: 1.5;
}

.next-steps {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 25px;
    border-radius: 8px;
    text-align: left;
    max-width: 500px;
    margin: 0 auto 30px;
    border: 1px solid #e9ecef;
}

.next-steps h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.next-steps ul {
    color: #7f8c8d;
    line-height: 1.6;
    padding-left: 20px;
}

.next-steps li {
    margin-bottom: 8px;
}

.company-info {
    margin-top: 25px;
}

.contact-info {
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    display: inline-block;
    text-align: left;
}

.contact-info h4 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.contact-info address {
    font-style: normal;
    color: #7f8c8d;
    line-height: 1.4;
    margin-bottom: 10px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-details span {
    color: #6c757d;
    font-size: 0.9rem;
}

/* ================================
   Additional Message Section
   ================================ */

.additional-message-section {
    margin: 25px 0;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #ffffff);
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* ================================
   Loading Overlay
   ================================ */

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(3px);
}

.loading-spinner {
    position: relative;
    margin-bottom: 20px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #e9ecef;
    border-top: 4px solid #4A90E2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

.loading-overlay p {
    color: #2c3e50;
    font-size: 1rem;
    font-weight: 500;
}

/* ================================
   Form Messages
   ================================ */

.form-messages {
    margin: 20px 0;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid;
    animation: slideInDown 0.3s ease;
}

.form-messages.success {
    background: #d4edda;
    border-left-color: #28a745;
    color: #155724;
}

.form-messages.error {
    background: #f8d7da;
    border-left-color: #dc3545;
    color: #721c24;
}

.error-message-container p {
    margin: 0;
    font-size: 0.95rem;
}

@keyframes slideInDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ================================
   Conditional Content
   ================================ */

.conditional-content {
    display: none;
    animation: fadeIn 0.5s ease;
}

.conditional-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ================================
   Responsive Design
   ================================ */

@media (max-width: 768px) {
    .ecount-simple-form,
    .ecount-quote-form {
        margin: 10px;
        border-radius: 8px;
    }
    
    .form-header {
        padding: 30px 20px 15px;
    }
    
    .form-title {
        font-size: 1.6rem;
    }
    
    .progress-indicator {
        gap: 15px;
    }
    
    .step-content {
        padding: 30px 20px;
    }
    
    .reason-selection,
    .business-selection {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .contact-fields-grid,
    .product-details-grid,
    .icd-component-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .product-grid,
    .accessory-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .contact-options {
        flex-direction: column;
        gap: 12px;
    }
    
    .contact-option {
        min-width: auto;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    .form-navigation .btn {
        width: 100%;
        min-width: auto;
    }
    
    .next-steps {
        margin: 0 auto 20px;
        padding: 20px;
    }
    
    .contact-details {
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .step-content {
        padding: 20px 15px;
    }
    
    .form-header {
        padding: 20px 15px 10px;
    }
    
    .step-number {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .reason-option,
    .business-option {
        padding: 20px;
    }
    
    .product-item,
    .accessory-item {
        padding: 15px;
    }
}

/* ================================
   Print Styles
   ================================ */

@media print {
    .ecount-simple-form,
    .ecount-quote-form {
        border: 1px solid #ddd;
        box-shadow: none;
    }
    
    .step-content:not(.active) {
        display: none !important;
    }
    
    .form-navigation,
    .loading-overlay,
    .form-messages {
        display: none !important;
    }
    
    .progress-indicator,
    .progress-bar-container {
        display: none;
    }
}

/* ================================
   Dark Mode Override - Force Light
   ================================ */

.ecount-simple-form,
.ecount-quote-form,
.ecount-simple-form *,
.ecount-quote-form * {
    color-scheme: light !important;
}

.ecount-simple-form,
.ecount-quote-form {
    background: #ffffff !important;
    color: #2c3e50 !important;
}

.ecount-simple-form .form-field input,
.ecount-simple-form .form-field textarea,
.ecount-quote-form .form-field input,
.ecount-quote-form .form-field textarea {
    background: #ffffff !important;
    border-color: #dee2e6 !important;
    color: #2c3e50 !important;
}

.ecount-simple-form .form-field input::placeholder,
.ecount-simple-form .form-field textarea::placeholder,
.ecount-quote-form .form-field input::placeholder,
.ecount-quote-form .form-field textarea::placeholder {
    color: #6c757d !important;
    opacity: 0.7 !important;
}
