/* ============================================================================
   PUBLIC APPOINTMENTS - Appointment Management Styles
   ============================================================================ */

/* Back Navigation */
.back-navigation {
    margin-bottom: 1.5rem;
}

.back-link {
    color: var(--link-text);
    text-decoration: none;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.back-link:hover,
.back-link:focus-visible {
    color: var(--link-hover-text);
    text-decoration: underline;
}

/* Appointments Container */
.appointments-container {
    margin-top: 0;
    padding-top: 0;
}

/* ============================================================================
   APPOINTMENT MANAGEMENT CARDS - Wider card layout for manage appointments page
   ============================================================================ */

.appointment-card {
    background: var(--card-background);
    border: 1px solid var(--table-border);
    border-radius: 8px;
    padding: 2rem;
    margin: -3rem auto 1.5rem auto;
    max-width: 800px;
    box-shadow: 0 2px 4px var(--hover-lift);
}

.appointment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--table-border);
}

.appointment-header h3 {
    margin: 0;
    color: var(--heading-text);
    font-size: 1.25rem;
}

/* Appointment Details */
.appointment-details {
    margin-bottom: 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.detail-row {
    display: flex;
    padding: 0.5rem 0;
}

/* Full width for therapist and notes */
.detail-row:nth-child(3),
.detail-row:nth-child(4) {
    grid-column: 1 / -1;
    border-top: 1px solid var(--soft-background, #f5f5f5);
    padding-top: 1rem;
    margin-top: 0.5rem;
}

.detail-label {
    font-weight: 600;
    color: var(--form-label);
    min-width: 120px;
    flex-shrink: 0;
}

.detail-value {
    color: var(--body-text);
    flex: 1;
}

/* Appointment Actions */
.appointment-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--table-border);
}

/* Actions Section */
.actions-section {
    margin-top: 2rem;
    text-align: center;
}

/* Status Badge Variants for Appointments */
.status-badge.status-booked {
    background: var(--success-message);
    color: var(--success-text);
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-badge.status-cancelled {
    background: var(--error-message);
    color: var(--error-text);
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-badge.status-completed {
    background: var(--info-background);
    color: var(--info-text);
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-badge.status-pending {
    background: var(--warning-background);
    color: var(--alert-warning-text);
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
}

/* CTA Button Variants */
.cta-button.danger {
    background: var(--error-message);
    color: var(--error-text);
    border-color: var(--error-message);
}

.cta-button.danger:hover,
.cta-button.danger:focus-visible {
    background: var(--button-delete-hover);
    border-color: #bd2130;
    color: var(--white-text);
}

/* Modal Actions */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

/* Cancellation Policy */
.cancellation-policy {
    background: var(--soft-background, #f8f9fa);
    padding: 1rem;
    border-radius: 4px;
    margin: 1rem 0;
}

.cancellation-policy h4 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: var(--heading-text);
    font-size: 1rem;
}

.cancellation-policy p {
    margin: 0.5rem 0;
    color: var(--body-text);
}

.refund-tiers {
    margin-top: 1rem;
}

.tier-item {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--table-border);
}

.tier-item:last-child {
    border-bottom: none;
}

.tier-days {
    font-weight: 600;
    color: var(--form-label);
    min-width: 120px;
}

.tier-refund {
    font-weight: 500;
    color: var(--button-background-color);
    min-width: 80px;
}

.tier-desc {
    color: var(--secondary-text);
    font-size: 0.9rem;
}

/* Modal Overlay (for cancel modal) */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--modal-overlay-background);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal-overlay[style*="display: block"],
.modal-overlay.active {
    display: flex !important;
}

.modal-overlay .modal-content {
    background: var(--card-background);
    padding: 2rem;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px var(--modal-shadow);
}

.modal-overlay .modal-content h3 {
    margin-top: 0;
    color: var(--heading-text);
}

/* Mobile Responsive */
@media (max-width: 767px) {
    .appointment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .appointment-details {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .detail-row {
        flex-direction: column;
    }
    
    .detail-label {
        min-width: auto;
        margin-bottom: 0.25rem;
    }
    
    /* All detail rows full width on mobile */
    .detail-row:nth-child(3),
    .detail-row:nth-child(4) {
        border-top: none;
        padding-top: 0.5rem;
        margin-top: 0;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
    }
    
    .tier-item {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .tier-days,
    .tier-refund {
        min-width: auto;
    }
}

/* ============================================================================
   APPOINTMENT SEARCH STYLES
   ============================================================================ */

/* Postcode Display */
.postcode-display {
    margin-bottom: 2rem;
}

.postcode-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--heading-text);
    padding: 0.75rem;
    background: var(--soft-background, #f8f9fa);
    border-radius: 4px;
    margin-bottom: 0.5rem;
}

/* Loading Section */
.loading-section {
    text-align: center;
    padding: 3rem 1rem;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--input-border);
    border-top-color: var(--button-background-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading-section p {
    color: var(--secondary-text);
    font-size: 1rem;
}

/* No Results Content */
.no-results-content {
    text-align: center;
    padding: 2rem 1rem;
}

.no-results-content h3 {
    color: var(--heading-text);
    margin-bottom: 1rem;
}

.no-results-content p {
    color: var(--body-text);
    margin-bottom: 1rem;
}

/* Contact Request Actions */
.contact-request-actions {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--soft-background, #f8f9fa);
    border-radius: 8px;
}

.contact-request-actions p {
    margin-bottom: 1rem;
    font-weight: 500;
}

/* Expectation Notice */
.expectation-notice {
    background: var(--soft-background, #f8f9fa);
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--button-background-color);
}

.expectation-notice p {
    margin: 0 0 0.5rem 0;
    color: var(--heading-text);
}

.expectation-notice ul {
    margin: 0.5rem 0 0 1.5rem;
    padding: 0;
}

.expectation-notice li {
    color: var(--body-text);
    margin-bottom: 0.5rem;
}

/* Modal Buttons */
.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1.5rem;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: var(--secondary-text);
    transition: color 0.3s ease;
}

.modal-close:hover,
.modal-close:focus-visible {
    color: var(--heading-text);
}

.cancel-button {
    padding: 0.75rem 1.5rem;
    background: var(--button-secondary-background);
    color: var(--button-secondary-text);
    border: 2px solid var(--button-secondary-background);
    border-radius: 4px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-button:hover,
.cancel-button:focus-visible {
    opacity: 0.8;
}

/* Coming Soon Section */
.coming-soon {
    text-align: center;
    padding: 3rem 1rem;
}

.coming-soon-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.coming-soon-text {
    font-size: 1.75rem;
    color: var(--heading-text);
    margin-bottom: 1rem;
}

.coming-soon-subtext {
    color: var(--secondary-text);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Appointments Container (for coming soon page) */
.appointments-container {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.appointments-content {
    background: var(--card-background);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--hover-lift);
    max-width: 700px;
    width: 100%;
}

.appointments-title {
    font-size: 2rem;
    color: var(--heading-text);
    margin-bottom: 0.5rem;
    text-align: center;
}

.appointments-subtitle {
    color: var(--secondary-text);
    margin-bottom: 2rem;
    text-align: center;
}

/* Mobile Responsive for Appointment Search */
@media (max-width: 767px) {
    .modal-buttons {
        flex-direction: column;
    }
    
    .modal-buttons button {
        width: 100%;
    }
    
    .appointments-content {
        padding: 2rem 1.5rem;
    }
    
    .coming-soon {
        padding: 2rem 1rem;
    }
    
    .coming-soon-icon {
        font-size: 3rem;
    }
    
    .coming-soon-text {
        font-size: 1.5rem;
    }
}
