/* ============================================
   APPOINTMENT BOOKING PAGE STYLES
   ============================================ */

/* ===== PAGE HEADER ===== */
.appointment-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    padding: 80px 0 60px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
}

.appointment-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M10 10h80v80H10z" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></svg>');
    opacity: 0.3;
}

.appointment-header .container {
    position: relative;
    z-index: 1;
}

.appointment-header h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.appointment-header p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
}

.breadcrumb a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.breadcrumb a:hover {
    opacity: 0.8;
}

/* ===== PAGE HEADER (booking page) ===== */
.page-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0891b2 100%);
    padding: 100px 0 70px;
    margin-top: 117px; /* trust-bar (37px) + navbar (80px) */
    position: relative;
    overflow: hidden;
    text-align: center;
}

.page-header .header-content h1 {
    color: white;
    font-size: 2.8rem;
    margin-bottom: 12px;
    font-weight: 700;
}

.page-header .header-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.1rem;
    margin-bottom: 18px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.page-header .breadcrumb {
    justify-content: center;
    color: rgba(255, 255, 255, 0.85);
}

.page-header .breadcrumb span {
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb i {
    font-size: 0.8rem;
}

/* ===== BOOKING CONTAINER ===== */
.booking-container {
    padding: 60px 0;
    background: var(--background-light);
}

.booking-content {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 40px;
    align-items: start;
}

/* ===== PROGRESS STEPS ===== */
.progress-steps {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    position: relative;
    padding: 0 50px;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 50px;
    right: 50px;
    height: 3px;
    background: #e5e7eb;
    z-index: 0;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.step-number {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    border: 3px solid transparent;
}

.step-label {
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
    transition: color 0.3s ease;
}

.step.active .step-number {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(26, 187, 221, 0.3);
}

.step.active .step-label {
    color: var(--primary-color);
    font-weight: 600;
}

.step.completed .step-number {
    background: #10b981;
    color: white;
    border-color: #10b981;
}

.step.completed .step-label {
    color: #10b981;
}

.step.completed .step-number::after {
    content: '\f00c';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
}

/* ===== BOOKING FORM ===== */
.booking-form-wrapper {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.form-step {
    display: none;
}

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

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

.form-step h3 {
    color: var(--secondary-color);
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.form-step-description {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

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

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: var(--secondary-color);
    font-size: 0.95rem;
}

.form-group label .required {
    color: #ef4444;
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

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

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-group small {
    color: var(--text-light);
    font-size: 0.85rem;
}

.error-message {
    color: #ef4444;
    font-size: 0.85rem;
    display: none;
    margin-top: 4px;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ef4444;
}

.form-group.error .error-message {
    display: block;
}

.form-group.success input,
.form-group.success select,
.form-group.success textarea {
    border-color: #10b981;
}

/* Radio and Checkbox Styling */
.radio-group,
.checkbox-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-option,
.checkbox-option {
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.radio-option label,
.checkbox-option label {
    cursor: pointer;
    margin: 0;
}

/* Insurance Section */
#insuranceDetails {
    margin-top: 20px;
    padding: 20px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
}

/* Confirmation Summary */
.confirmation-summary {
    background: #f9fafb;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.summary-section {
    margin-bottom: 25px;
}

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

.summary-section h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.summary-section h4 i {
    font-size: 1rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-label {
    color: var(--text-light);
    font-size: 0.95rem;
}

.summary-value {
    color: var(--secondary-color);
    font-weight: 500;
    text-align: right;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 20px;
    background: #fef3c7;
    border-radius: 8px;
    margin-bottom: 30px;
}

.terms-checkbox input[type="checkbox"] {
    margin-top: 4px;
}

.terms-checkbox label {
    color: var(--secondary-color);
    font-size: 0.95rem;
    line-height: 1.6;
}

.terms-checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Form Navigation Buttons */
.form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #f3f4f6;
}

.btn-prev,
.btn-next,
.btn-submit {
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-prev {
    background: #f3f4f6;
    color: var(--secondary-color);
}

.btn-prev:hover {
    background: #e5e7eb;
    transform: translateX(-4px);
}

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

.btn-next:hover,
.btn-submit:hover {
    background: #0891b2;
    transform: translateX(4px);
    box-shadow: 0 4px 12px rgba(26, 187, 221, 0.3);
}

.btn-submit:hover {
    transform: translateY(-2px);
}

/* ===== BOOKING SECTION LAYOUT ===== */
.booking-section {
    padding: 80px 0 100px;
}

.booking-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    align-items: start;
}

/* ===== BOOKING SIDEBAR ===== */
.booking-sidebar {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.info-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}

.info-card h3 {
    color: var(--secondary-color);
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.info-card h3 i {
    color: var(--primary-color);
}

.info-card p {
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.6;
}

.info-card a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.3s ease;
}

.info-card a:hover {
    gap: 12px;
}

.emergency-card {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.emergency-card h3,
.emergency-card p {
    color: white;
}

.emergency-card a {
    color: white;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    border-radius: 8px;
    display: block;
    text-align: center;
    font-size: 1.3rem;
    margin-top: 10px;
}

.emergency-card a:hover {
    background: rgba(255, 255, 255, 0.3);
    gap: 8px;
}

.checklist {
    list-style: none;
    padding: 0;
    margin: 0;
}

.checklist li {
    padding: 10px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    color: var(--text-color);
}

.checklist li i {
    color: var(--primary-color);
    margin-top: 4px;
}

/* ===== SUCCESS MESSAGE ===== */
.success-message {
    text-align: center;
    padding: 60px 40px;
    display: none;
}

.success-message.show {
    display: block;
    animation: fadeInUp 0.5s ease;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    animation: scaleIn 0.5s ease 0.2s backwards;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-icon i {
    color: white;
    font-size: 2.5rem;
}

.success-message h3 {
    color: var(--secondary-color);
    font-size: 2rem;
    margin-bottom: 15px;
}

.success-message p {
    color: var(--text-light);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 10px;
}

.booking-reference {
    background: #f9fafb;
    padding: 20px;
    border-radius: 8px;
    margin: 30px 0;
    display: inline-block;
}

.booking-reference strong {
    color: var(--primary-color);
    font-size: 1.3rem;
    font-family: 'Courier New', monospace;
}

.success-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.success-actions .btn {
    padding: 14px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

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

.success-actions .btn-primary:hover {
    background: #0891b2;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 187, 221, 0.3);
}

.success-actions .btn-secondary {
    background: #f3f4f6;
    color: var(--secondary-color);
}

.success-actions .btn-secondary:hover {
    background: #e5e7eb;
}

/* ===== FAQ SECTION ===== */
.faq-section {
    margin-top: 60px;
    padding: 50px 0;
    background: white;
}

.faq-section h2 {
    text-align: center;
    color: var(--secondary-color);
    font-size: 2.2rem;
    margin-bottom: 40px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: var(--primary-color);
}

.faq-question {
    padding: 20px 25px;
    background: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f9fafb;
}

.faq-question h4 {
    color: var(--secondary-color);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 600;
}

.faq-icon {
    color: var(--primary-color);
    font-size: 1.2rem;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
    background: #f9fafb;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 20px 25px;
}

.faq-answer p {
    color: var(--text-color);
    line-height: 1.8;
    margin: 0;
}

/* ===== FLATPICKR CALENDAR CUSTOMIZATION ===== */
/* Style the Flatpickr input to match other inputs */
.flatpickr-input {
    cursor: pointer;
}

.flatpickr-input[readonly] {
    cursor: pointer;
    background: white !important;
}

.dark-mode .flatpickr-input[readonly] {
    background: var(--background-color) !important;
}

.flatpickr-calendar {
    font-family: 'Poppins', sans-serif;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    border: none;
    z-index: 1000;
}

.flatpickr-months {
    background: var(--primary-color);
    border-radius: 12px 12px 0 0;
}

.flatpickr-months .flatpickr-month {
    color: white;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: transparent;
    color: white;
    font-weight: 600;
}

.flatpickr-current-month .flatpickr-monthDropdown-months:hover {
    background: rgba(255, 255, 255, 0.1);
}

.flatpickr-current-month input.cur-year {
    color: white;
    font-weight: 600;
}

.flatpickr-prev-month:hover svg,
.flatpickr-next-month:hover svg {
    fill: white !important;
}

.flatpickr-prev-month svg,
.flatpickr-next-month svg {
    fill: rgba(255, 255, 255, 0.8) !important;
}

.flatpickr-weekdays {
    background: #f9fafb;
}

.flatpickr-weekday {
    color: var(--primary-color);
    font-weight: 600;
}

.flatpickr-day {
    color: var(--text-color);
    border-radius: 8px;
    font-weight: 500;
}

.flatpickr-day:hover:not(.flatpickr-disabled) {
    background: rgba(26, 187, 221, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.flatpickr-day.today {
    border-color: var(--primary-color);
    background: rgba(26, 187, 221, 0.1);
    color: var(--primary-color);
}

.flatpickr-day.today:hover {
    background: rgba(26, 187, 221, 0.2);
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.flatpickr-day.disabled,
.flatpickr-day.disabled:hover {
    color: #e5e7eb;
    background: transparent;
    cursor: not-allowed;
}

.saturday-limited {
    background: rgba(255, 193, 7, 0.1);
    border-color: #ffc107;
}

.flatpickr-day.saturday-limited:hover:not(.flatpickr-disabled) {
    background: rgba(255, 193, 7, 0.2);
    border-color: #ffc107;
}

/* Info Message Styling */
.date-info-message {
    margin-top: 10px;
    padding: 12px 16px;
    background: rgba(26, 187, 221, 0.1);
    border-left: 4px solid var(--primary-color);
    border-radius: 6px;
    color: var(--text-color);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.3s ease;
}

.date-info-message i {
    color: var(--primary-color);
    font-size: 1rem;
}

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

/* Dark Mode Flatpickr Styling */
.dark-mode .flatpickr-calendar {
    background: var(--background-light);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.dark-mode .flatpickr-weekdays {
    background: var(--background-color);
}

.dark-mode .flatpickr-day {
    color: var(--text-color);
}

.dark-mode .flatpickr-day:hover:not(.flatpickr-disabled) {
    background: rgba(26, 187, 221, 0.2);
}

.dark-mode .flatpickr-day.disabled {
    color: #4b5563;
}

.dark-mode .date-info-message {
    background: rgba(26, 187, 221, 0.15);
    color: var(--text-color);
}

/* ===== DARK MODE SUPPORT ===== */
.dark-mode .appointment-header {
    background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
}

.dark-mode .booking-container {
    background: var(--background-color);
}

.dark-mode .booking-form-wrapper,
.dark-mode .info-card,
.dark-mode .faq-section {
    background: var(--background-light);
}

.dark-mode .form-group input,
.dark-mode .form-group select,
.dark-mode .form-group textarea {
    background: var(--background-color);
    border-color: #374151;
    color: var(--text-color);
}

.dark-mode .form-group input:focus,
.dark-mode .form-group select:focus,
.dark-mode .form-group textarea:focus {
    border-color: var(--primary-color);
}

.dark-mode .confirmation-summary,
.dark-mode #insuranceDetails,
.dark-mode .booking-reference {
    background: var(--background-color);
}

.dark-mode .faq-item {
    border-color: #374151;
    background: var(--background-light);
}

.dark-mode .faq-question {
    background: var(--background-light);
}

.dark-mode .faq-question:hover {
    background: var(--background-color);
}

.dark-mode .faq-answer {
    background: var(--background-color);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
    .booking-content {
        grid-template-columns: 1fr;
    }

    .booking-layout {
        grid-template-columns: 1fr;
    }

    .booking-sidebar {
        position: static;
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .appointment-header {
        padding: 60px 0 40px;
    }

    .appointment-header h1 {
        font-size: 2rem;
    }

    .appointment-header p {
        font-size: 1rem;
    }

    .booking-form-wrapper {
        padding: 25px 20px;
    }

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

    .progress-steps {
        padding: 0 20px;
    }

    .progress-steps::before {
        left: 20px;
        right: 20px;
    }

    .step-label {
        font-size: 0.8rem;
    }

    .step-number {
        width: 40px;
        height: 40px;
        font-size: 0.95rem;
    }

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

    .btn-prev,
    .btn-next,
    .btn-submit {
        width: 100%;
        justify-content: center;
    }

    .booking-sidebar {
        grid-template-columns: 1fr;
    }

    .success-actions {
        flex-direction: column;
    }

    .success-actions .btn {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .appointment-header h1 {
        font-size: 1.6rem;
    }

    .form-step h3 {
        font-size: 1.4rem;
    }

    .info-card h3 {
        font-size: 1.1rem;
    }

    .faq-section h2 {
        font-size: 1.8rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .footer,
    .btn-prev,
    .btn-next,
    .btn-submit,
    .booking-sidebar,
    .faq-section {
        display: none !important;
    }

    .appointment-header {
        background: white;
        color: black;
        margin-top: 0;
    }

    .booking-form-wrapper {
        box-shadow: none;
        border: 1px solid #e5e7eb;
    }

    .confirmation-summary {
        page-break-inside: avoid;
    }
}
