/* Booking System Styles */

/* Booking Container */
.booking-container {
    padding: 2rem;
}

/* Remove backgrounds - only step boxes should have them */
[data-theme="light"] .booking-container,
body:not([data-theme="dark"]) .booking-container {
    background: transparent;
    box-shadow: none;
}

/* Booking Steps */
.booking-step {
    margin-bottom: 2rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
    overflow: hidden;
    background: rgba(255,255,255,0.02);
}

.step-header {
    background: rgba(255,255,255,0.05);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.step-number {
    background: #3AAA64;
    color: #000;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
}

.step-number.inactive {
    background: #6c757d;
    opacity: 0.5;
}

.step-header h4 {
    margin: 0;
    font-size: 1.25rem;
    color: #fff;
}

.step-header h4.inactive {
    color: #6c757d;
    opacity: 0.6;
}

[data-theme="light"] .step-header h4,
body:not([data-theme="dark"]) .step-header h4 {
    color: #212529;
}

.step-content {
    padding: 1.5rem;
}

/* Appointment Type Cards */
.appointment-types {
    display: grid;
    gap: 1rem;
}

.appointment-type-card {
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 8px;
    padding: 1rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    gap: 1rem;
    background: rgba(255,255,255,0.02);
}

.appointment-type-card:hover {
    border-color: #3AAA64;
    box-shadow: 0 2px 8px rgba(0, 208, 132, 0.2);
}

.appointment-type-card.selected {
    border-color: #3AAA64;
    background: rgba(0, 208, 132, 0.1);
}

.type-color {
    width: 4px;
    border-radius: 2px;
    flex-shrink: 0;
}

.type-details h5 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: #fff;
}

[data-theme="light"] .type-details h5,
body:not([data-theme="dark"]) .type-details h5 {
    color: #212529 !important;
}

.type-details p {
    margin: 0;
    font-size: 0.9rem;
    color: #f8f9fa;
}

[data-theme="light"] .type-details p,
body:not([data-theme="dark"]) .type-details p {
    color: #6c757d;
}

/* Calendar */
.calendar-wrapper {
    max-width: 100%;
}

.calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
}

.calendar-nav span {
    font-size: 1.1rem;
    color: #fff;
}

.calendar-nav button {
    background: rgba(255,255,255,0.1);
    border: none;
    color: #3AAA64;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
}

.calendar-nav button:hover {
    background: rgba(0, 208, 132, 0.2);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 1rem;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    color: #adb5bd;
    padding: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    background: rgba(255,255,255,0.02);
    color: #fff;
}

.calendar-day:hover:not(.disabled):not(.empty) {
    background: rgba(0, 208, 132, 0.1);
    border-color: #3AAA64;
}

.calendar-day.disabled {
    background: rgba(255,255,255,0.02);
    color: #666;
    cursor: not-allowed;
}

.calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
}

.calendar-day.today {
    font-weight: bold;
    background: rgba(255, 208, 0, 0.1);
    border-color: #ffd000;
}

.calendar-day.selected {
    background: #3AAA64;
    color: #000;
    border-color: #3AAA64;
    font-weight: bold;
}

.calendar-day.available {
    background: rgba(0, 208, 132, 0.1);
    border-color: #3AAA64;
}

.calendar-legend {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.calendar-legend small {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #adb5bd;
}

.legend-dot {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.1);
}

.legend-dot.available {
    background: rgba(0, 208, 132, 0.3);
    border-color: #3AAA64;
}

.legend-dot.unavailable {
    background: rgba(255,255,255,0.02);
    border-color: rgba(255,255,255,0.1);
}

.legend-dot.selected {
    background: #3AAA64;
    border-color: #3AAA64;
}

/* Time Slots */
.selected-date-display {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
    padding: 0.75rem;
    background: rgba(255,255,255,0.05);
    border-radius: 6px;
    text-align: center;
}

.selected-date-display i {
    color: #3AAA64;
}

.time-slots-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

.time-slot {
    padding: 0.75rem;
    border: 2px solid rgba(255,255,255,0.1);
    border-radius: 6px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: rgba(255,255,255,0.02);
    font-weight: 500;
    color: #fff;
}

.time-slot:hover {
    border-color: #3AAA64;
    background: rgba(0, 208, 132, 0.1);
}

.time-slot.selected {
    border-color: #3AAA64;
    background: #3AAA64;
    color: #000;
}

.time-slot.disabled {
    background: rgba(255,255,255,0.02);
    color: #666;
    cursor: not-allowed;
    border-color: rgba(255,255,255,0.05);
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #adb5bd;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.1);
    border-top: 3px solid #3AAA64;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 0.5rem;
}

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

/* Booking Summary */
.booking-summary {
    background: rgba(0, 208, 132, 0.1);
    border: 2px solid #3AAA64;
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.booking-summary h6 {
    margin: 0 0 1rem 0;
    color: #3AAA64;
    font-weight: 600;
}

.summary-item {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    color: #fff;
}

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

.summary-item strong {
    color: #3AAA64;
    display: inline-block;
    min-width: 90px;
}

/* Form Inputs Dark Mode */
.booking-container .form-control,
.booking-container .form-select {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
}

.booking-container .form-control:focus,
.booking-container .form-select:focus {
    background: rgba(255,255,255,0.08);
    border-color: #3AAA64;
    color: #fff;
    box-shadow: 0 0 0 0.2rem rgba(0, 208, 132, 0.25);
}

.booking-container .form-control::placeholder {
    color: #6c757d;
}

.booking-container .form-label {
    color: #adb5bd;
}

[data-theme="light"] .booking-container .form-label,
body:not([data-theme="dark"]) .booking-container .form-label {
    color: #495057;
}

/* Light mode borders and backgrounds */
[data-theme="light"] .booking-step,
body:not([data-theme="dark"]) .booking-step {
    border-color: rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.5);
}

[data-theme="light"] .step-header,
body:not([data-theme="dark"]) .step-header {
    background: rgba(0,0,0,0.02);
    border-bottom-color: rgba(0,0,0,0.1);
}

[data-theme="light"] .appointment-type-card,
body:not([data-theme="dark"]) .appointment-type-card {
    border-color: rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.5);
}

[data-theme="light"] .calendar-day,
body:not([data-theme="dark"]) .calendar-day {
    border-color: rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.5);
    color: #212529;
}

[data-theme="light"] .calendar-day.available,
body:not([data-theme="dark"]) .calendar-day.available {
    background: rgba(58, 170, 100, 0.15);
    border-color: #3AAA64;
    color: #212529;
}

[data-theme="light"] .calendar-day.disabled,
body:not([data-theme="dark"]) .calendar-day.disabled {
    background: #f0f0f0;
    color: #b0b0b0;
    border-color: #e0e0e0;
}

[data-theme="light"] .calendar-day.today,
body:not([data-theme="dark"]) .calendar-day.today {
    background: rgba(255, 208, 0, 0.15);
    border-color: #d4a800;
}

[data-theme="light"] .legend-dot.unavailable,
body:not([data-theme="dark"]) .legend-dot.unavailable {
    background: #f0f0f0;
    border-color: #e0e0e0;
}

[data-theme="light"] .calendar-day-header,
body:not([data-theme="dark"]) .calendar-day-header {
    color: #495057;
}

[data-theme="light"] .calendar-nav span,
body:not([data-theme="dark"]) .calendar-nav span {
    color: #212529;
}

[data-theme="light"] .time-slot,
body:not([data-theme="dark"]) .time-slot {
    border-color: rgba(0,0,0,0.1);
    background: rgba(255,255,255,0.5);
    color: #212529;
}

/* Reschedule note on cancel page */
.reschedule-note p {
    color: rgba(255, 255, 255, 0.85);
}

[data-theme="light"] .reschedule-note p,
body:not([data-theme="dark"]) .reschedule-note p {
    color: #495057;
}

[data-theme="light"] .selected-date-display,
body:not([data-theme="dark"]) .selected-date-display {
    color: #212529;
    background: rgba(0,0,0,0.02);
}

[data-theme="light"] .summary-item,
body:not([data-theme="dark"]) .summary-item {
    color: #212529;
}

[data-theme="light"] .legend-item,
body:not([data-theme="dark"]) .legend-item {
    color: #495057;
}

[data-theme="light"] .booking-container .form-control,
[data-theme="light"] .booking-container .form-select,
body:not([data-theme="dark"]) .booking-container .form-control,
body:not([data-theme="dark"]) .booking-container .form-select {
    background: rgba(255,255,255,0.8);
    border-color: rgba(0,0,0,0.2);
    color: #212529;
}

[data-theme="light"] .booking-container .form-control::placeholder,
body:not([data-theme="dark"]) .booking-container .form-control::placeholder {
    color: #6c757d;
}

/* Success Page */
.success-icon {
    font-size: 5rem;
    margin-bottom: 1rem;
    color: #3AAA64;
}

.success-icon i {
    display: inline-block;
    animation: scaleIn 0.5s ease-out;
}

@keyframes scaleIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Page Description Styling */
.booking-page-description {
    color: #adb5bd !important;
}

[data-theme="light"] .booking-page-description,
body:not([data-theme="dark"]) .booking-page-description {
    color: #6c757d !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .booking-container {
        padding: 1rem;
    }

    .step-content {
        padding: 1rem;
    }

    .calendar-grid {
        gap: 2px;
    }

    .calendar-day {
        font-size: 0.8rem;
    }

    .time-slots-container {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 0.5rem;
    }

    .time-slot {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    .booking-summary {
        padding: 1rem;
    }

    .summary-item strong {
        display: block;
        margin-bottom: 0.25rem;
    }
}

/* Print Styles */
@media print {
    .booking-container {
        box-shadow: none;
    }

    .btn,
    .calendar-nav,
    .step-number {
        display: none !important;
    }
}

/* Accessibility */
.calendar-day:focus,
.time-slot:focus,
.appointment-type-card:focus {
    outline: 2px solid #3AAA64;
    outline-offset: 2px;
}

/* Animation for step transitions */
.booking-step.d-none {
    display: none !important;
}

.booking-step {
    animation: fadeIn 0.3s ease-in;
}

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

/* Book Appointment Button - Green */
#booking-form button[type="submit"],
.booking-container .btn-primary {
    background: #3AAA64;
    border-color: #3AAA64;
    color: #000;
    font-weight: 600;
}

#booking-form button[type="submit"]:hover,
.booking-container .btn-primary:hover {
    background: #00b872;
    border-color: #00b872;
    color: #000;
}

#booking-form button[type="submit"]:disabled,
.booking-container .btn-primary:disabled {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
    opacity: 0.65;
}

/* ==================== BOOKING SUCCESS PAGE ==================== */

/* Success Page Card Headers - Green to match site brand */
.card-header.bg-primary {
    background-color: #3AAA64 !important;
    color: #fff !important;
    border-bottom: none;
}

/* Success Page Card Body - Dark Mode */
.card-body {
    background-color: #2D2D30;
    color: rgba(255, 255, 255, 0.7);
}

[data-theme="light"] .card-body,
body:not([data-theme="dark"]) .card-body {
    background-color: #ffffff;
    color: #212529;
}

/* Success Alert Box - Dark Mode */
.alert-success {
    background-color: #1E4620 !important;
    border-color: #3AAA64 !important;
    color: #B7F0B9 !important;
}

[data-theme="light"] .alert-success,
body:not([data-theme="dark"]) .alert-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

/* Success Page Buttons - Dark Mode (Outlined) */
[data-theme="dark"] .btn-outline-primary {
    color: #3AAA64;
    border-color: #3AAA64;
    background-color: transparent;
}

[data-theme="dark"] .btn-outline-primary:hover {
    color: #000;
    background-color: #3AAA64;
    border-color: #3AAA64;
}

[data-theme="dark"] .btn-outline-secondary {
    color: #adb5bd;
    border-color: #6c757d;
    background-color: transparent;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Success Page Buttons - Light Mode (Outlined) */
[data-theme="light"] .btn-outline-primary,
body:not([data-theme="dark"]) .btn-outline-primary {
    color: #3AAA64;
    border-color: #3AAA64;
    background-color: transparent;
}

[data-theme="light"] .btn-outline-primary:hover,
body:not([data-theme="dark"]) .btn-outline-primary:hover {
    color: #fff;
    background-color: #3AAA64;
    border-color: #3AAA64;
}

[data-theme="light"] .btn-outline-secondary,
body:not([data-theme="dark"]) .btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    background-color: transparent;
}

[data-theme="light"] .btn-outline-secondary:hover,
body:not([data-theme="dark"]) .btn-outline-secondary:hover {
    color: #fff;
    background-color: #5a6268;
    border-color: #545b62;
}

/* Card Styling - Dark Mode */
[data-theme="dark"] .card {
    background-color: #2D2D30;
    border-color: rgba(255,255,255,0.1);
}

/* Card Styling - Light Mode */
[data-theme="light"] .card,
body:not([data-theme="dark"]) .card {
    background-color: #ffffff;
    border-color: rgba(0,0,0,0.125);
    box-shadow: 0 0.125rem 0.25rem rgba(0,0,0,0.075);
}

/* Page Title Color */
.green {
    color: #3AAA64 !important;
}

/* Download ICS Button - Outlined in Both Modes */
.btn-outline-primary.btn-sm {
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
}

[data-theme="dark"] .btn-outline-primary.btn-sm {
    color: #3AAA64;
    border-color: #3AAA64;
    background-color: transparent;
}

[data-theme="light"] .btn-outline-primary.btn-sm,
body:not([data-theme="dark"]) .btn-outline-primary.btn-sm {
    color: #3AAA64;
    border-color: #3AAA64;
    background-color: transparent;
}
