/* Enhanced Checkout Styles for NeuroInsight Technologies */
:root {
    --primary-color: #2c3e50;
    --secondary-color: #3498db;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-bg: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Checkout Section */
.checkout-section {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

.checkout-form-container {
    background: white;
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
    backdrop-filter: blur(10px);
}

/* Progress Indicator */
.checkout-progress {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4rem;
    position: relative;
    margin-bottom: 3rem !important;
}

.checkout-progress::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 10%;
    right: 10%;
    height: 3px;
    background: var(--border-color);
    transform: translateY(-50%);
    z-index: 1;
}

.progress-step {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: var(--border-color);
    position: relative;
    z-index: 2;
    transition: var(--transition);
}

.progress-step.active {
    border-color: var(--secondary-color);
    background: var(--secondary-color);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

/* Form Sections */
.form-section {
    background: var(--light-bg);
    border-radius: 15px;
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}

.form-section:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.form-section h3 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Form Layout */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.form-control,
.form-select {
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
    transform: translateY(-1px);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: var(--danger-color);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23e74c3c'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 3.6.4.4.4-.4'/%3e%3cpath d='M6 7v2.5'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
}

.invalid-feedback {
    display: block;
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    font-weight: 500;
}

/* Checkbox Group */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.form-check-input {
    margin-top: 0.25rem;
    border: 2px solid var(--border-color);
    border-radius: 4px;
}

.form-check-input:checked {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.form-check-label {
    color: var(--primary-color);
    line-height: 1.5;
}

/* Submit Button */
#submit-quote-btn {
    background: linear-gradient(135deg, var(--secondary-color), #2980b9);
    border: none;
    border-radius: 12px;
    padding: 1.25rem 2rem;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

#submit-quote-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.4);
}

#submit-quote-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-top: 2px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Order Summary */
.order-summary {
    position: sticky;
    top: 100px;
}

.summary-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-color);
}

.summary-card h3 {
    color: var(--primary-color);
    font-weight: 600;
    text-align: center;
}

/* Checkout Items */
#checkout-items {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

#checkout-items::-webkit-scrollbar {
    width: 6px;
}

#checkout-items::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 3px;
}

#checkout-items::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 3px;
}

.checkout-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--light-bg);
    border-radius: 10px;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--secondary-color);
    transition: var(--transition);
}

.checkout-item:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.checkout-item:last-child {
    margin-bottom: 0;
}

.item-info h5 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
    font-weight: 600;
}

.item-info small {
    color: #6c757d;
}

.item-price {
    font-weight: 600;
    color: var(--secondary-color);
    background: rgba(52, 152, 219, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.9rem;
}

/* Summary Totals */
.summary-totals {
    border-top: 2px solid var(--border-color);
    padding-top: 1.5rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.summary-row:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.summary-row.total {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    background: var(--light-bg);
    padding: 1rem;
    border-radius: 10px;
    margin-top: 1rem;
}

/* Support Cards */
.support-card,
.contact-info {
    margin-top: 1.5rem;
}

.support-card .card,
.contact-info .card {
    border-radius: 15px;
    overflow: hidden;
}

.support-card h4,
.contact-info h5 {
    color: var(--primary-color);
    font-weight: 600;
}

.process-step {
    padding: 0.75rem;
    background: white;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    border-left: 3px solid var(--secondary-color);
}

.process-step:last-child {
    margin-bottom: 0;
}

.process-step strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.25rem;
}

/* Success Message */
.success-message {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    border: 2px solid #c3e6cb;
    border-radius: 15px;
    padding: 2.5rem;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-icon {
    font-size: 4rem;
    animation: bounce 1s ease infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.success-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Form Text */
.form-text {
    color: #6c757d;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .checkout-form-container {
        padding: 1.5rem;
        margin-bottom: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .checkout-progress {
        gap: 2rem;
    }
    
    .checkout-progress::before {
        left: 5%;
        right: 5%;
    }
    
    .progress-step {
        width: 40px;
        height: 40px;
        font-size: 0.9rem;
    }
    
    .form-section {
        padding: 1.5rem;
    }
    
    .success-actions {
        flex-direction: column;
    }
    
    .success-actions .btn {
        width: 100%;
        margin: 0.25rem 0;
    }
}

@media (max-width: 576px) {
    .checkout-form-container {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .form-section {
        padding: 1rem;
        border-radius: 10px;
    }
    
    .summary-card {
        padding: 1.5rem;
    }
    
    .checkout-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .item-price {
        align-self: flex-start;
    }
}

/* Loading States */
.form-loading {
    position: relative;
    pointer-events: none;
}

.form-loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Animation for form sections */
.form-section {
    animation: slideInLeft 0.6s ease;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced focus states for accessibility */
.form-control:focus-visible,
.form-select:focus-visible,
.form-check-input:focus-visible {
    outline: 2px solid var(--secondary-color);
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    .checkout-section {
        background: white !important;
    }
    
    .checkout-form-container,
    .summary-card {
        box-shadow: none !important;
        border: 1px solid #000 !important;
    }
    
    .btn {
        display: none !important;
    }
    
    .success-message {
        border: 2px solid #000 !important;
    }
}