/**
 * Public Styles
 */

.appointment-booking-form-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.appointment-booking-form-container .form-step {
    min-height: 280px;
}

.appointment-booking-form-container .hidden {
    display: none !important;
}

.appointment-booking-form-container .step-line {
    transition: background-color 0.3s ease;
}

.appointment-booking-form-container .step-indicator.active .step-line {
    background-color: #3b82f6;
}

.appointment-booking-form-container .step-indicator.completed .step-line {
    background-color: #10b981;
}

.appointment-booking-form-container input[type="text"],
.appointment-booking-form-container input[type="email"],
.appointment-booking-form-container input[type="tel"],
.appointment-booking-form-container select,
.appointment-booking-form-container textarea {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.appointment-booking-form-container input:focus,
.appointment-booking-form-container select:focus,
.appointment-booking-form-container textarea:focus {
    outline: none;
}

.appointment-booking-form-container .has-error {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.2);
}

.appointment-booking-form-container .field-error {
    color: #dc2626;
    font-size: 0.85rem;
    margin-top: 4px;
}

.appointment-booking-form-container button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading spinner */
.spinner-border {
    display: inline-block;
    width: 2rem;
    height: 2rem;
    vertical-align: text-bottom;
    border: 0.25em solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border 0.75s linear infinite;
}

@keyframes spinner-border {
    to {
        transform: rotate(360deg);
    }
}

/* Weekly Calendar Styles */
.weekly-calendar-container {
    margin-top: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.weekly-calendar-container.error-state {
    border: 1px solid #dc2626;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 0 0 1px rgba(220, 38, 38, 0.15);
}

.weekly-calendar-header {
    margin-bottom: 10px;
}

.weekly-calendar-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}

.weekly-calendar-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 6px;
}

.week-day-column {
    flex: 1;
    min-width: 140px;
    background-color: #a7f3d0;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.week-day-header {
    background-color: #6ee7b7;
    padding: 8px;
    text-align: center;
    color: white;
    position: relative;
    border-bottom: 2px solid #10b981;
}

.week-day-header::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 8px solid #6ee7b7;
}

.doctor-name-week {
    font-weight: 600;
    font-size: 0.875rem;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.day-date {
    font-size: 0.875rem;
    margin-bottom: 2px;
}

.day-name {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Scoped under form container so theme button styles do not override slot colors */
.appointment-booking-form-container .time-slots-container {
    padding: 8px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 200px;
}

.appointment-booking-form-container .time-slot-button {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    padding: 6px 10px;
    text-align: center;
    font-size: 0.8125rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
    /* Override theme button styles that may set background/color */
    box-shadow: none;
    appearance: none;
}

.appointment-booking-form-container .time-slot-button:hover {
    background-color: #f3f4f6;
    border-color: #3b82f6;
    color: #374151;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Selected time slot – blue; higher specificity so theme cannot override */
.appointment-booking-form-container .time-slot-button.active,
.appointment-booking-form-container .time-slot-button.active:hover {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.4);
}

.appointment-booking-form-container .time-slot-button:focus {
    outline: none;
}

/* Force slot colors over theme button styles (needed when theme uses high specificity or !important) */
.appointment-booking-form-container .time-slots-container .time-slot-button {
    background-color: #ffffff !important;
    color: #374151 !important;
}
.appointment-booking-form-container .time-slots-container .time-slot-button:hover {
    background-color: #f3f4f6 !important;
    color: #374151 !important;
}
.appointment-booking-form-container .time-slots-container .time-slot-button.active,
.appointment-booking-form-container .time-slots-container .time-slot-button.active:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
    border-color: #2563eb !important;
}

/* Disabled / past time slots – greyed out and not clickable */
.appointment-booking-form-container .time-slot-button.time-slot-disabled,
.appointment-booking-form-container .time-slots-container .time-slot-button.time-slot-disabled {
    background-color: #e5e7eb !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}
.appointment-booking-form-container .time-slot-button.time-slot-disabled:hover,
.appointment-booking-form-container .time-slots-container .time-slot-button.time-slot-disabled:hover {
    background-color: #e5e7eb !important;
    color: #9ca3af !important;
}

.appointment-booking-form-container .no-slots {
    text-align: center;
    color: #6b7280;
    font-size: 0.8125rem;
    padding: 12px;
    font-style: italic;
}

/* Booking success styles */
.booking-success-card {
    max-width: 520px;
    margin: 0 auto;
    padding: 32px 28px;
    border-radius: 16px;
    background: linear-gradient(180deg, #ecfdf5 0%, #ffffff 100%);
    border: 1px solid #bbf7d0;
    box-shadow: 0 15px 30px rgba(16, 185, 129, 0.12);
    text-align: center;
}

.booking-success-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: #10b981;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.booking-success-icon svg {
    width: 36px;
    height: 36px;
    color: #ffffff;
}

.booking-success-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #065f46;
    margin-bottom: 8px;
}

.booking-success-copy {
    color: #4b5563;
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.booking-summary-list {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    padding: 20px;
    margin-bottom: 24px;
    text-align: left;
}

.booking-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.95rem;
    color: #374151;
    padding: 8px 0;
    border-bottom: 1px dashed #e5e7eb;
}

.booking-summary-row:last-child {
    border-bottom: none;
}

.booking-summary-row strong {
    color: #111827;
    font-weight: 600;
}

.booking-success-btn {
    width: 100%;
    padding: 12px 16px;
    border-radius: 999px;
    background-color: #0ea5e9;
    color: #ffffff;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.booking-success-btn:hover {
    background-color: #0284c7;
    transform: translateY(-1px);
}

.booking-success-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.35);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .appointment-booking-form-container {
        padding: 10px;
    }

    .appointment-booking-form-container .step-indicator {
        font-size: 0.75rem;
    }

    .appointment-booking-form-container .step-circle {
        width: 8px !important;
        height: 8px !important;
        font-size: 0.625rem;
    }

    .appointment-booking-form-container .step-line {
        height: 2px;
    }

    .weekly-calendar-grid {
        flex-wrap: nowrap;
        gap: 8px;
    }

    .week-day-column {
        min-width: 140px;
    }

    .appointment-booking-form-container .time-slot-button {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
}

