/* JM Bookings — public booking page styles
   media/com_jmbookings/css/site.css
   Version 1.0.13
*/

/* ===================================================================
   PAGE WRAPPER
=================================================================== */
.jmb-page {
    max-width: 880px;
    margin: 0 auto;
    padding: 1.5rem 1rem;
    box-sizing: border-box;
    font-family: 'Noto Serif', sans-serif;
}

/* ===================================================================
   SHARED CARD BASE
=================================================================== */
.jmb-hero,
.jmb-calendar-nav,
.jmb-calendar-grid,
.jmb-form-card {
    background: #ffffff;
    border: 1px solid #d4c07a;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
}

/* ===================================================================
   HERO
=================================================================== */
.jmb-hero {
    padding: 1.75rem 2rem;
    margin-bottom: 1rem;
}

.jmb-page .jmb-page-heading {
    font-size: 1.75rem !important;
    font-weight: 700 !important;
    color: #000000 !important;
    margin: 0 0 0.5rem 0 !important;
    padding: 0 !important;
    line-height: 1.25 !important;
    border: none !important;
    border-bottom: none !important;
    font-family: 'Noto Serif', sans-serif !important;
}

.jmb-page .jmb-intro {
    color: #3d3010;
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    line-height: 1.5;
}

.jmb-page .jmb-phone {
    color: #3d3010;
    margin: 0;
    font-size: 0.95rem;
}

/* ===================================================================
   CALENDAR NAVIGATION
=================================================================== */
.jmb-calendar-nav {
    display: flex !important;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding: 0.875rem 1.25rem;
    margin-bottom: 1rem;
}

/* Previous / Next — primary button style, consistent with submit */
.jmb-page .jmb-nav-btn {
    display: inline-flex !important;
    align-items: center;
    padding: 0.5rem 1.1rem;
    font-size: 0.875rem;
    font-weight: 700;
    color: #ffffff !important;
    background: #7d6a28 !important;
    border: 1.5px solid #5e4f1e;
    border-radius: 6px;
    text-decoration: none !important;
    white-space: nowrap;
    line-height: 1.4;
    cursor: pointer;
    font-family: 'Noto Serif', sans-serif;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 1px 4px rgba(125,106,40,0.18);
}

.jmb-page .jmb-nav-btn:hover {
    background: #5e4f1e !important;
    border-color: #3d3010;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 2px 8px rgba(125,106,40,0.28);
}

/* Disabled state — intentionally muted, not broken */
.jmb-page .jmb-nav-btn--disabled {
    color: #ffffff !important;
    border-color: #b8a870 !important;
    background: #b8a870 !important;
    cursor: default;
    pointer-events: none;
    opacity: 0.55;
    box-shadow: none;
}

/* Date jump — inline: label left of input */
.jmb-date-jump {
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 200px;
}

/* Visible label: "Grid Start Date" */
.jmb-page .jmb-date-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #7d6a28;
    white-space: nowrap;
    font-family: 'Noto Serif', sans-serif;
    line-height: 1.2;
}

.jmb-page .jmb-date-jump input[type="date"] {
    flex: 1;
    min-width: 100px;
    max-width: 155px;
    width: auto;
    padding: 0.45rem 0.75rem;
    font-size: 0.9rem;
    border: 1.5px solid #d4c07a !important;
    border-radius: 6px;
    background: #fff !important;
    color: #000000;
    line-height: 1.4;
    box-sizing: border-box;
    font-family: 'Noto Serif', sans-serif;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
}

.jmb-page .jmb-date-jump input[type="date"]:focus {
    outline: none !important;
    border-color: #7d6a28 !important;
    box-shadow: 0 0 0 3px rgba(125,106,40,0.18) !important;
}

/* Go button — hidden by default (JS auto-submits on change).
   noscript style override makes it visible when JS is disabled. */
.jmb-page .jmb-date-go {
    display: none !important;
    padding: 0.45rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #ffffff !important;
    background: #7d6a28 !important;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.4;
    font-family: 'Noto Serif', sans-serif;
    transition: background 0.15s;
}

.jmb-page .jmb-date-go:hover {
    background: #5e4f1e !important;
}

/* ===================================================================
   14-DAY CALENDAR GRID
=================================================================== */
.jmb-calendar-grid {
    margin-bottom: 1rem;
    overflow: hidden;
}

.jmb-page .jmb-day-row {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    flex-wrap: nowrap !important;
    gap: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border-bottom: 1px solid #e8d890;
    min-height: 46px;
    box-sizing: border-box;
}

.jmb-page .jmb-day-row:last-child {
    border-bottom: none;
}

.jmb-page .jmb-day-row:nth-child(even) {
    background: #faf8f2;
}

.jmb-page .jmb-day-label {
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-end !important;
    justify-content: center !important;
    flex: 0 0 100px !important;
    width: 100px !important;
    min-width: 100px !important;
    padding: 0.5rem 0.875rem 0.5rem 0.5rem;
    background: #fdf7e6;
    border-right: 2px solid #d4c07a;
    box-sizing: border-box;
}

.jmb-page .jmb-day-name {
    display: block !important;
    font-size: 0.72rem;
    font-weight: 700;
    color: #7d6a28;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.2;
}

.jmb-page .jmb-day-date {
    display: block !important;
    font-size: 0.78rem;
    color: #3d3010;
    white-space: nowrap;
    line-height: 1.3;
    margin-top: 1px;
    font-weight: 500;
}

.jmb-page .jmb-day-times {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap;
    gap: 0.4rem;
    flex: 1 1 auto;
    padding: 0.5rem 0.75rem;
    align-items: center;
    min-height: 46px;
    box-sizing: border-box;
}

/* ===================================================================
   TIME SLOT — NO TIMES
=================================================================== */
.jmb-page .jmb-no-times {
    font-size: 0.8rem;
    color: #b8a870;
    font-style: italic;
}

/* ===================================================================
   NO AVAILABLE SLOTS NOTICE (below grid)
=================================================================== */
.jmb-page .jmb-no-slots {
    background: #fdf8e6;
    border: 1px solid #d4c07a;
    border-radius: 8px;
    color: #7d6a28;
    text-align: center;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* ===================================================================
   TIME SLOT PILL WRAPPER
=================================================================== */
.jmb-page .jmb-time-option {
    position: relative;
    display: inline-block;
}

/* Visually hidden — stays in tab order and screen-reader accessible */
.jmb-page .jmb-time-radio {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* Shared pill base */
.jmb-page .jmb-time-label {
    display: inline-block !important;
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 30px;
    border: 2px solid transparent;
    user-select: none;
    white-space: nowrap;
    line-height: 1.4;
    cursor: default;
    font-family: 'Noto Serif', sans-serif;
}

/* ===================================================================
   AVAILABLE SLOT — GREEN (keep for functional clarity)
=================================================================== */
.jmb-page .jmb-time-label--available {
    color: #155e34 !important;
    background: #d0f0e0 !important;
    border-color: #52b87a !important;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, color 0.12s;
}

.jmb-page .jmb-time-label--available:hover {
    background: #b0e4c8 !important;
    border-color: #2ea35c !important;
    color: #0e4423 !important;
}

/* Selected state — CSS only */
.jmb-page .jmb-time-radio:checked + .jmb-time-label--available {
    background: #17693c !important;
    border-color: #0d4827 !important;
    color: #ffffff !important;
    font-weight: 700;
    box-shadow: 0 0 0 3px rgba(23,105,60,0.22);
}

/* Keyboard focus ring */
.jmb-page .jmb-time-radio:focus + .jmb-time-label--available {
    outline: 2px solid #17693c;
    outline-offset: 2px;
}

/* ===================================================================
   RESERVED SLOT — RED (not interactive)
=================================================================== */
.jmb-page .jmb-time-label--reserved {
    color: #7a1825 !important;
    background: #fce8eb !important;
    border-color: #e0909a !important;
    cursor: not-allowed;
    opacity: 0.82;
}

/* ===================================================================
   BOOKED-OFF SLOT — YELLOW (not interactive; lower priority than red)
=================================================================== */
.jmb-page .jmb-time-label--bookoff {
    color: #7a5a00 !important;
    background: #fff8d0 !important;
    border-color: #e8c840 !important;
    cursor: not-allowed;
    opacity: 0.90;
}

/* ===================================================================
   FULL-DAY BOOK-OFF NOTICE (replaces slot row contents)
=================================================================== */
.jmb-page .jmb-bookoff-notice {
    display: inline-block;
    font-size: 0.82rem;
    font-style: italic;
    color: #7a5a00;
    background: #fff8d0;
    border: 1px solid #e8c840;
    border-radius: 6px;
    padding: 0.25rem 0.65rem;
}

/* ===================================================================
   CUSTOMER FORM CARD
=================================================================== */
.jmb-form-card {
    padding: 1.75rem;
    margin-bottom: 1.5rem;
}

.jmb-page .jmb-section-heading {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    color: #000000 !important;
    border-bottom: 2px solid #d4c07a !important;
    padding-bottom: 0.5rem !important;
    margin: 0 0 1.25rem 0 !important;
    font-family: 'Noto Serif', sans-serif !important;
    border-top: none !important;
    border-left: none !important;
    border-right: none !important;
}

/* 2-column grid: name + phone side by side; email + message full width */
.jmb-page .jmb-fields {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.jmb-page .jmb-field--full {
    grid-column: 1 / -1;
}

.jmb-page .jmb-field {
    display: block;
    margin: 0;
}

.jmb-page .jmb-field label {
    display: block !important;
    font-size: 0.875rem;
    font-weight: 600;
    color: #3d3010;
    margin-bottom: 0.35rem;
    font-family: 'Noto Serif', sans-serif;
}

.jmb-page .jmb-field input[type="text"],
.jmb-page .jmb-field input[type="tel"],
.jmb-page .jmb-field input[type="email"] {
    display: block !important;
    width: 100% !important;
    padding: 0.55rem 0.75rem !important;
    font-size: 0.95rem !important;
    color: #000000 !important;
    background: #ffffff !important;
    border: 1.5px solid #d4c07a !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    line-height: 1.5;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
    font-family: 'Noto Serif', sans-serif;
}

.jmb-page .jmb-field input[type="text"]:focus,
.jmb-page .jmb-field input[type="tel"]:focus,
.jmb-page .jmb-field input[type="email"]:focus {
    outline: none !important;
    border-color: #7d6a28 !important;
    box-shadow: 0 0 0 3px rgba(125,106,40,0.18) !important;
}

.jmb-page .jmb-field textarea {
    display: block !important;
    width: 100% !important;
    padding: 0.55rem 0.75rem !important;
    font-size: 0.95rem !important;
    color: #000000 !important;
    background: #ffffff !important;
    border: 1.5px solid #d4c07a !important;
    border-radius: 6px !important;
    box-sizing: border-box !important;
    resize: vertical;
    min-height: 110px;
    line-height: 1.5;
    font-family: 'Noto Serif', sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: none !important;
}

.jmb-page .jmb-field textarea:focus {
    outline: none !important;
    border-color: #7d6a28 !important;
    box-shadow: 0 0 0 3px rgba(125,106,40,0.18) !important;
}

.jmb-page .jmb-required {
    color: #c0392b;
    margin-left: 2px;
    font-weight: 700;
}

/* ===================================================================
   REVIEW BLOCK
=================================================================== */
.jmb-page .jmb-review {
    background: #fdf9ee;
    border: 1.5px solid #c8b05a;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 0 0 1.25rem 0;
}

.jmb-page .jmb-review-heading {
    font-size: 0.82rem;
    font-weight: 700;
    color: #7d6a28;
    margin: 0 0 0.6rem 0;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-family: 'Noto Serif', sans-serif;
}

.jmb-page .jmb-review-row {
    display: flex !important;
    flex-direction: row;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: #3d3010;
    margin-bottom: 0.3rem;
    align-items: baseline;
}

.jmb-page .jmb-review-label {
    font-weight: 600;
    min-width: 110px;
    color: #3d3010;
    flex-shrink: 0;
}

/* ===================================================================
   SUBMIT BUTTON
=================================================================== */
.jmb-page .jmb-btn-submit {
    display: block !important;
    width: 100% !important;
    padding: 0.875rem 2rem !important;
    font-size: 1.05rem !important;
    font-weight: 700 !important;
    color: #ffffff !important;
    background: #7d6a28 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer;
    text-align: center;
    line-height: 1.4;
    letter-spacing: 0.01em;
    font-family: 'Noto Serif', sans-serif;
    transition: background 0.15s, box-shadow 0.15s;
    -webkit-appearance: none;
    appearance: none;
    box-shadow: 0 2px 8px rgba(125,106,40,0.22) !important;
    box-sizing: border-box;
}

.jmb-page .jmb-btn-submit:hover {
    background: #5e4f1e !important;
    box-shadow: 0 4px 12px rgba(125,106,40,0.32) !important;
}

.jmb-page .jmb-btn-submit:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(125,106,40,0.38) !important;
}

/* ===================================================================
   THANK YOU PAGE
=================================================================== */
.jmb-page.jmb-thankyou {
    text-align: center;
    padding: 3rem 1.5rem;
}

.jmb-page.jmb-thankyou h1 {
    color: #17693c;
    margin-bottom: 1rem;
    font-family: 'Noto Serif', sans-serif;
}

.jmb-page.jmb-thankyou p {
    font-size: 1.05rem;
    color: #3d3010;
    margin-bottom: 1.5rem;
}

/* "Book Another Appointment" — primary style, matches submit and nav buttons */
.jmb-page .jmb-btn-back {
    display: inline-block;
    padding: 0.75rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff !important;
    background: #7d6a28 !important;
    border: none;
    border-radius: 8px;
    text-decoration: none !important;
    font-family: 'Noto Serif', sans-serif;
    transition: background 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(125,106,40,0.22);
}

.jmb-page .jmb-btn-back:hover {
    background: #5e4f1e !important;
    color: #ffffff !important;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(125,106,40,0.32);
}

/* ===================================================================
   VISUALLY HIDDEN (accessible radio labels etc.)
=================================================================== */
.jmb-visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0,0,0,0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ===================================================================
   RESPONSIVE — MOBILE
=================================================================== */
@media (max-width: 580px) {
    .jmb-hero {
        padding: 1.25rem;
    }

    .jmb-form-card {
        padding: 1.25rem;
    }

    .jmb-page .jmb-fields {
        grid-template-columns: 1fr !important;
    }

    .jmb-page .jmb-day-label {
        flex: 0 0 84px !important;
        width: 84px !important;
        min-width: 84px !important;
        padding: 0.5rem 0.4rem;
    }

    .jmb-page .jmb-day-date {
        font-size: 0.7rem;
    }

    .jmb-page .jmb-day-name {
        font-size: 0.68rem;
    }

    .jmb-calendar-nav {
        gap: 0.5rem;
    }

    .jmb-date-jump {
        flex: 1 1 100%;
        min-width: 0;
        order: 3;
    }

    .jmb-page .jmb-page-heading {
        font-size: 1.45rem !important;
    }

    .jmb-page .jmb-btn-submit {
        padding: 0.875rem 1rem !important;
    }

    .jmb-page .jmb-btn-back {
        padding: 0.75rem 1.25rem;
    }
}
