/* Manage bookings page ([msf_reschedule]). Builds on the booking form styles
   (.msf-form / .ctm_booking_* in the child theme + plugin inline CSS). */

.msf-rs-hidden {
    display: none !important;
}

/* Footer stays at the bottom of the screen even when there is little content
   (e.g. "You have no upcoming bookings"). Scoped to this page via the body class. */
body.msf-rs-body #page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px));
}

body.msf-rs-body #page > .msf-rs-page {
    flex: 1 0 auto;
    width: 100%;
}

body.msf-rs-body #page > #colophon {
    flex-shrink: 0;
}

/* Page wrapper + heading: mirrors the "Book a Consultation" Elementor container/heading. */
.msf-rs-page {
    max-width: 1400px;
    margin: 50px auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.msf-rs-page .msf-rs-page-title {
    margin: 0;
    padding: 0 15px;
    text-align: center;
    font-family: var(--e-global-typography-primary-font-family, "sf-pro-display-medium"), sans-serif;
    font-size: 28px;
    font-weight: 600;
    line-height: 1;
    color: #174728;
}

.msf-rs-page > .msf-form,
.msf-rs-page > .msf-rs-notice {
    width: 100%;
}

/* The booking form CSS sets ".msf-form { margin: auto }", which centres it vertically
   inside the full-height page; keep it at the top, centred horizontally. */
.msf-rs-page > .msf-form {
    margin: 0 auto !important;
}

@media (max-width: 1024px) {
    .msf-rs-page .msf-rs-page-title {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .msf-rs-page {
        margin: 20px auto 30px;
    }

    .msf-rs-page .msf-rs-page-title {
        font-size: 22px;
    }
}

.msf-rs-message {
    margin: 0 !important;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #f5c2c7;
    background: #fdf2f4;
    color: #801535;
    font-family: var(--sf_pro_display);
    font-size: 14px;
    line-height: 1.4;
}

.msf-rs-message.is-success {
    border-color: #cbe3d5;
    background: #eaf3ee;
    color: #123f25;
}

.msf-rs .msf-rs-code-input {
    font-size: 24px !important;
    letter-spacing: 10px;
    text-align: center;
    font-weight: 600;
}

.msf-rs-resend {
    margin: 0 !important;
    font-family: var(--sf_pro_display);
    font-size: 13px;
    color: #606060;
}

.msf-rs-link {
    background: none !important;
    border: 0 !important;
    padding: 0 !important;
    color: #801535 !important;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.msf-rs-link[disabled] {
    color: #a4a4a4 !important;
    cursor: not-allowed;
    text-decoration: none;
}

.msf-rs .ctm_booking_desc a {
    color: #801535;
    font-weight: 600;
    text-decoration: underline;
}

.msf-rs-countdown {
    color: #a4a4a4;
}

.msf-rs .ctm_booking_review_data .msf-rs-sub {
    color: #606060;
    font-weight: 400;
}

.msf-rs .msf-rs-strike {
    text-decoration: line-through;
    color: #8a8a8a !important;
}

.msf-rs .msf-rs-highlight {
    border-color: #123f25;
    background: #eaf3ee;
}

.msf-rs .calendar .arrow.disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* Marks the day of the current appointment */
.msf-rs .calendar .day.msf-rs-current-day:not(.selected) {
    box-shadow: inset 0 0 0 1px #801535;
}

.msf-rs .msf-time {
    cursor: pointer;
}

.msf-rs-loading {
    display: flex;
    justify-content: center;
    padding: 10px 0;
}

.msf-rs-spinner {
    width: 28px;
    height: 28px;
    border: 3px solid #e5e7eb;
    border-top-color: #123f25;
    border-radius: 50%;
    animation: msf-rs-spin 0.8s linear infinite;
}

@keyframes msf-rs-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ---------- Upcoming bookings list ---------- */

.msf-rs .msf-rs-list-summary {
    margin: 0 0 12px !important;
    font-family: var(--sf_pro_display);
    font-size: 13px;
    color: #606060;
}

.msf-rs .msf-rs-cards {
    list-style: none;
    margin: 0 !important;
    padding: 0 !important;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.msf-rs .msf-rs-card {
    display: flex;
    gap: 14px;
    margin: 0;
    padding: 16px;
    border: 1px solid #e3e6e4;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(18, 63, 37, 0.06);
    font-family: var(--sf_pro_display);
}

.msf-rs .msf-rs-card.is-link {
    border-color: #123f25;
    box-shadow: 0 0 0 1px #123f25, 0 4px 14px rgba(18, 63, 37, 0.08);
}

/* Calendar-style date tile */
.msf-rs-date {
    flex: 0 0 58px;
    align-self: flex-start;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow: hidden;
    border-radius: 10px;
    background: #eaf3ee;
    color: #123f25;
    text-align: center;
    line-height: 1;
}

.msf-rs-date-dow {
    width: 100%;
    padding: 5px 0;
    background: #123f25;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.msf-rs-date-day {
    padding: 7px 0 2px;
    font-size: 24px;
    font-weight: 700;
}

.msf-rs-date-mon {
    padding-bottom: 7px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.msf-rs-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.msf-rs-card-top {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 10px;
}

.msf-rs .msf-rs-card-title {
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--sf_pro_display);
    font-size: 16px !important;
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0;
    text-transform: none !important;
    color: #1b1b1b;
}

.msf-rs-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.msf-rs-badge {
    display: inline-block;
    padding: 3px 9px;
    border-radius: 999px;
    background: #eaf3ee;
    color: #123f25;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    white-space: nowrap;
}

.msf-rs-badge.is-soon {
    background: #fff4dc;
    color: #7a5200;
}

.msf-rs-card-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.msf-rs-card-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    line-height: 1.35;
    color: #4a4a4a;
}

.msf-rs-ico {
    display: inline-flex;
    flex: 0 0 auto;
    color: #123f25;
}

.msf-rs-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    border-top: 1px solid #f0f1f0;
}

.msf-rs .msf-rs-btn {
    flex: 1 1 130px;
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 8px;
    font-family: var(--sf_pro_display);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.msf-rs .msf-rs-btn-primary {
    border: 1px solid #123f25;
    background: #123f25;
    color: #fff;
}

.msf-rs .msf-rs-btn-primary:hover,
.msf-rs .msf-rs-btn-primary:focus-visible {
    background: #0c2c1a;
}

.msf-rs .msf-rs-btn-danger {
    border: 1px solid #801535;
    background: #fff;
    color: #801535;
}

.msf-rs .msf-rs-btn-danger:hover,
.msf-rs .msf-rs-btn-danger:focus-visible {
    background: #801535;
    color: #fff;
}

.msf-rs .msf-rs-card-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 8px;
    background: #f6f6f4;
    font-size: 12.5px;
    line-height: 1.45;
    color: #555;
}

.msf-rs .msf-rs-card-note .msf-rs-ico {
    margin-top: 1px;
    color: #8a8a8a;
}

.msf-rs .msf-rs-card-note a {
    color: #801535;
    font-weight: 600;
    text-decoration: underline;
    white-space: nowrap;
}

@media (max-width: 480px) {
    .msf-rs .msf-rs-card {
        padding: 14px;
        gap: 12px;
    }

    .msf-rs-date {
        flex-basis: 50px;
    }

    .msf-rs-date-day {
        font-size: 20px;
    }
}

.msf-rs-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 32px 24px;
    border: 1px dashed #cfd8d2;
    border-radius: 14px;
    background: #fafbfa;
    text-align: center;
    font-family: var(--sf_pro_display);
}

.msf-rs-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: #eaf3ee;
    color: #123f25;
}

.msf-rs .msf-rs-empty-title {
    margin: 0 !important;
    padding: 0 !important;
    font-family: var(--sf_pro_display);
    font-size: 18px !important;
    font-weight: 600;
    line-height: 1.3;
    text-transform: none !important;
    color: #1b1b1b;
}

.msf-rs .msf-rs-empty p {
    margin: 0 !important;
    max-width: 320px;
    font-size: 14px;
    line-height: 1.5;
    color: #555;
}

.msf-rs .msf-rs-empty .msf-rs-link {
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
}

.msf-rs .msf-rs-highlight-cancel {
    border-color: #f5c2c7;
    background: #fdf2f4;
}

.msf-rs-success .msf-rs-back-list {
    cursor: pointer;
    border: 0;
    font: inherit;
}

.msf-rs-notice {
    max-width: 420px;
    margin: 20px auto 0;
}

.msf-rs-success {
    margin: 50px 0 0;
}
