/* Car Wash Booking Form Styles */

:root {
    --primary-color: #007cba;
    --primary-hover: #005a87;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --border-radius: 8px;
    --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

.carwash-booking-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.carwash-booking-form {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

/* Progress Indicator */
.carwash-progress {
    padding: 30px 20px;
    background: linear-gradient(135deg, #6c6868 0%, #ebebeb 100%);
    color: white;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
    z-index: 2;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: var(--transition);
}

.step.active .step-number,
.step.completed .step-number {
    background: white;
    color: var(--primary-color);
}

.step-label {
    font-size: 12px;
    text-align: center;
    opacity: 0.8;
}

.step.active .step-label {
    opacity: 1;
    font-weight: 600;
}

.progress-bar {
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 2px;
    transition: width 0.5s ease;
    width: 16.66%;
}

/* Form Steps */
.form-step {
    display: none;
    padding: 40px;
    min-height: 400px;
}

.form-step.active {
    display: block;
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.step-header {
    text-align: center;
    margin-bottom: 40px;
}

.step-header h2 {
    color: var(--dark-color);
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
}

.step-header p {
    color: var(--secondary-color);
    margin: 0;
    font-size: 16px;
}

/* Form Elements */
.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: flex;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 16px;
    transition: var(--transition);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.form-help {
    font-size: 14px;
    color: var(--secondary-color);
    margin-top: 6px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* Vehicle Type Grid */
.vehicle-types-grid,
.vehicle-subtypes-grid,
.services-grid,
.los-grid,
.addons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.vehicle-option,
.vehicle-subtype-option,
.service-option,
.los-option,
.addon-option {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: #ffffff;
    position: relative;
}

.vehicle-option:hover,
.vehicle-subtype-option:hover,
.service-option:hover,
.los-option:hover,
.addon-option:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
}

.vehicle-option.selected,
.vehicle-subtype-option.selected,
.service-option.selected,
.los-option.selected,
.addon-option.selected {
    border-color: var(--primary-color);
    background: rgba(0, 124, 186, 0.05);
}

.vehicle-option .option-image {
    width: 145px;
    height: 100px;
    margin: 0 auto 15px;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    overflow: hidden;
}

.vehicle-option .option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-option .option-name {
    font-weight: 600;
    color: black;
    margin-bottom: 8px;
}

.vehicle-option .option-description {
    font-size: 14px;
    color: var(--secondary-color);
}

/* Vehicle Subtype Option Styling */
.vehicle-subtype-option .option-image {
    width: 100px;
    height: 100px;
    margin: 0 auto 15px;
    background: transparent;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    overflow: hidden;
}

.vehicle-subtype-option .option-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vehicle-subtype-option .option-name {
    font-weight: 600;
    color: black;
    margin-bottom: 8px;
}

.vehicle-subtype-option .option-description {
    font-size: 14px;
    color: var(--secondary-color);
}

.service-option .option-price,
.los-option .option-price,
.addon-option .option-price {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
    margin-top: 10px;
}

/* Checkbox Styling */
.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.checkbox-label:hover {
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: var(--transition);
}

.checkbox-label input[type="checkbox"]:checked+.checkmark {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"]:checked+.checkmark::after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.label-text {
    flex: 1;
}

.sanding-price {
    color: var(--primary-color);
    font-weight: 600;
}

/* Price Preview */
.price-preview {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 20px;
    margin-top: 20px;
}

.price-breakdown {
    max-width: 300px;
    margin: 0 auto;
}

.price-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: var(--secondary-color);
}

.price-total {
    display: flex;
    justify-content: space-between;
    font-size: 18px;
    font-weight: 700;
    color: var(--dark-color);
    border-top: 2px solid var(--border-color);
    padding-top: 12px;
    margin-top: 12px;
}

/* Order Summary */
.order-summary {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 30px;
}

.summary-section {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

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

.summary-section h3 {
    color: var(--dark-color);
    margin: 0 0 15px 0;
    font-size: 18px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

.summary-item .label {
    color: var(--secondary-color);
}

.summary-item .value {
    color: var(--dark-color);
    font-weight: 600;
}

.summary-total {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    padding: 20px;
    background: white;
    border-radius: var(--border-radius);
    margin-top: 20px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    min-width: 120px;
    justify-content: center;
}

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

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-1px);
}

.btn-success {
    background: var(--success-color);
    color: white;
}

.btn-success:hover:not(:disabled) {
    background: #218838;
    transform: translateY(-1px);
}

.btn-icon {
    width: 16px;
    height: 16px;
}

/* Form Actions */
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.form-actions .btn+.btn {
    margin-left: 15px;
}

/* Success Page */
.success-content {
    text-align: center;
    padding: 40px 20px;
}

.success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 30px;
    background: var(--success-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

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

.booking-confirmation {
    background: var(--light-color);
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 30px 0;
    text-align: left;
}

.confirmation-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}

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

.confirmation-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 20px;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    text-align: center;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--border-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

    100% {
        transform: rotate(360deg);
    }
}

/* Dark Theme */
.carwash-booking-container[data-theme="dark"] {
    --light-color: #2c3e50;
    --dark-color: #ecf0f1;
    --border-color: #34495e;
    --secondary-color: #95a5a6;
}

.carwash-booking-container[data-theme="dark"] .carwash-booking-form {
    background: #34495e;
    color: var(--dark-color);
}

.carwash-booking-container[data-theme="dark"] .vehicle-option,
.carwash-booking-container[data-theme="dark"] .vehicle-subtype-option,
.carwash-booking-container[data-theme="dark"] .service-option,
.carwash-booking-container[data-theme="dark"] .los-option,
.carwash-booking-container[data-theme="dark"] .addon-option {
    background: #ffffff !important;
    border-color: #e0e0e0;
    color: #333333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .carwash-booking-container {
        padding: 10px;
    }

    .form-step {
        padding: 20px;
    }

    .progress-steps {
        flex-wrap: wrap;
        gap: 10px;
    }

    .step {
        flex: 0 0 calc(33.333% - 10px);
        margin-bottom: 15px;
    }

    .step-label {
        font-size: 10px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .vehicle-types-grid,
    .vehicle-subtypes-grid,
    .services-grid,
    .los-grid,
    .addons-grid {
        grid-template-columns: 1fr;
    }

    .form-actions {
        flex-direction: column;
        gap: 15px;
    }

    .form-actions .btn {
        width: 100%;
    }

    .step-header h2 {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .step {
        flex: 0 0 calc(50% - 10px);
    }

    .step-number {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }

    .step-label {
        font-size: 9px;
    }
}

/* Phone Input Styling */
.iti {
    width: 100%;
}

.iti__flag-container {
    border-right: 2px solid var(--border-color);
}

.iti__selected-flag {
    padding: 12px 16px;
}

.iti__country-list {
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

/* Error States */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-color: var(--danger-color);
}

.error-message {
    color: var(--danger-color);
    font-size: 14px;
    margin-top: 6px;
}

/* Animation for option selection */
.vehicle-option.selected::after,
.vehicle-subtype-option.selected::after,
.service-option.selected::after,
.los-option.selected::after,
.addon-option.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

/* Custom Form Styling - Black background & White text */
.form-group input,
.form-group textarea,
.form-group select {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* Placeholder styling with all browser prefixes */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    opacity: 1;
}

.form-group input::-webkit-input-placeholder,
.form-group textarea::-webkit-input-placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    opacity: 1;
}

.form-group input::-moz-placeholder,
.form-group textarea::-moz-placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
    opacity: 1;
}

.form-group input:-ms-input-placeholder,
.form-group textarea:-ms-input-placeholder {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Address input specific styling */
.form-group input[name="address"],
.form-group input#address,
.form-group input#customer-address,
.form-group textarea[name="address"],
.form-group textarea#address {
    background-color: #000000 !important;
    color: #ffffff !important;
}

/* Date and Time input icons - custom white icons */
.form-group input[type="date"],
.form-group input[type="time"] {
    color-scheme: dark !important;
    position: relative;
    padding-right: 40px !important;
}

/* Custom calendar icon for date input */
.form-group input[type="date"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

/* Custom clock icon for time input */
.form-group input[type="time"] {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpolyline points='12,6 12,12 16,14'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

/* Hide native calendar picker indicator */
.form-group input[type="date"]::-webkit-calendar-picker-indicator,
.form-group input[type="time"]::-webkit-calendar-picker-indicator {
    opacity: 0;
    width: 100%;
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    cursor: pointer;
}

.form-group input[type="date"]::-webkit-datetime-edit,
.form-group input[type="time"]::-webkit-datetime-edit {
    color: #ffffff !important;
}

/* Time Slots Grid */
.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
    margin-top: 10px;
}

.time-slot {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.time-slot:hover:not(.unavailable) {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.time-slot.selected {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.time-slot.selected .slot-time,
.time-slot.selected .slot-availability {
    color: white;
}

.time-slot.unavailable {
    background: #f5f5f5;
    border-color: #ddd;
    cursor: not-allowed;
    opacity: 0.6;
}

.slot-time {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 5px;
}

.slot-availability {
    display: block;
    font-size: 12px;
    color: #28a745;
}

.time-slot.unavailable .slot-availability {
    color: #dc3545;
}

.select-date-hint {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.field-hint {
    margin-top: 5px;
    font-size: 13px;
}

/* Dark theme time slots */
.carwash-booking-container[data-theme="dark"] .time-slot {
    background: #2a2a2a;
    border-color: #444;
}

.carwash-booking-container[data-theme="dark"] .time-slot:hover:not(.unavailable) {
    border-color: var(--primary-color);
}

.carwash-booking-container[data-theme="dark"] .slot-time {
    color: white;
}

.carwash-booking-container[data-theme="dark"] .time-slot.unavailable {
    background: #1a1a1a;
}

/* Consultation Subtext */
.consultation-subtext {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px 16px;
    margin: 15px 0;
    border-radius: 4px;
    font-size: 14px;
    color: #856404;
    font-style: italic;
}

/* Appointment Type Radio Buttons */
.appointment-type-options {
    display: flex;
    gap: 20px;
    margin-top: 10px;
}

.radio-option {
    flex: 1;
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
    background: white;
}

.radio-option:hover {
    border-color: var(--primary-color);
    background: rgba(0, 124, 186, 0.05);
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin-right: 12px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked+.radio-custom {
    border-color: var(--primary-color);
    background: white;
}

.radio-option input[type="radio"]:checked+.radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    background: var(--primary-color);
    border-radius: 50%;
}

.radio-label {
    font-weight: 600;
    color: var(--dark-color);
}

.radio-option input[type="radio"]:checked~.radio-label {
    color: var(--primary-color);
}

/* Responsive for appointment type */
@media (max-width: 480px) {
    .appointment-type-options {
        flex-direction: column;
        gap: 12px;
    }
}