/* 1RR Book Tour widget — modal on desktop, bottom sheet on mobile.
 * Brand colors mirror /assets/css/1rr-forms.css:
 *   Red   #F54343  (CTA)
 *   Navy  #004274  (text/labels)
 *   Cyan  #00aeff  (focus)
 *   Slate #f5f7fa  (surface)
 * Namespace: .rr-book-*
 */

/* ----- modal shell ----- */
.rr-book-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 30, 60, 0.6);
    z-index: 9998;
    display: none;
    opacity: 0;
    transition: opacity 180ms ease;
}
.rr-book-overlay.is-open { display: block; opacity: 1; }

.rr-book-modal {
    position: fixed;
    z-index: 9999;
    display: none;
    background: #fff;
    color: #004274;
    box-shadow: 0 12px 40px rgba(0, 30, 60, 0.25);
    overflow: hidden;
    font-family: inherit;
}
.rr-book-modal.is-open { display: flex; flex-direction: column; }

/* desktop: centered modal */
@media (min-width: 761px) {
    .rr-book-modal {
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 480px;
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 64px);
        border-radius: 12px;
    }
}

/* mobile: bottom sheet */
@media (max-width: 760px) {
    .rr-book-modal {
        left: 0;
        right: 0;
        bottom: 0;
        width: 100%;
        max-height: 92vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        transition: transform 220ms ease;
    }
    .rr-book-modal.is-open { transform: translateY(0); }
}

/* ----- header ----- */
.rr-book-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px 14px;
    border-bottom: 1px solid #e3e8ee;
    flex-shrink: 0;
}
.rr-book-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: #004274;
    margin: 0;
    line-height: 1.2;
}
.rr-book-header h2 .rr-book-sub {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #6b7e95;
    margin-top: 2px;
}
.rr-book-close {
    background: none;
    border: 0;
    font-size: 28px;
    line-height: 1;
    color: #6b7e95;
    cursor: pointer;
    padding: 4px 8px;
}
.rr-book-close:hover { color: #004274; }

/* ----- body ----- */
.rr-book-body {
    padding: 18px 20px 22px;
    overflow-y: auto;
    flex: 1 1 auto;
}

/* ----- panels ----- */
.rr-book-panel { display: none; }
.rr-book-panel.is-active { display: block; }

/* ----- date strip ----- */
.rr-book-dates {
    display: flex;
    overflow-x: auto;
    gap: 8px;
    margin: 0 -20px 16px;
    padding: 4px 20px 12px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.rr-book-date {
    flex: 0 0 auto;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 8px 10px 9px;
    cursor: pointer;
    text-align: center;
    min-width: 56px;
    transition: border-color 120ms, background 120ms;
}
.rr-book-date:hover { border-color: #00aeff; }
.rr-book-date.is-active {
    background: #004274;
    border-color: #004274;
    color: #fff;
}
.rr-book-date-dow {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    color: #6b7e95;
    letter-spacing: 0.05em;
}
.rr-book-date.is-active .rr-book-date-dow { color: rgba(255, 255, 255, 0.75); }
.rr-book-date-day {
    display: block;
    font-size: 18px;
    font-weight: 700;
    color: #004274;
    line-height: 1.1;
    margin-top: 2px;
}
.rr-book-date.is-active .rr-book-date-day { color: #fff; }

/* ----- slot grid ----- */
.rr-book-slots {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.rr-book-slot {
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 8px;
    padding: 10px 6px;
    font-size: 14px;
    color: #004274;
    cursor: pointer;
    transition: border-color 120ms, background 120ms, color 120ms;
    text-align: center;
}
.rr-book-slot:hover {
    border-color: #00aeff;
    color: #00aeff;
}
.rr-book-slot.is-active {
    background: #004274;
    color: #fff;
    border-color: #004274;
}
.rr-book-slots-empty {
    padding: 24px 0;
    color: #6b7e95;
    text-align: center;
    font-size: 14px;
    grid-column: 1 / -1;
}
.rr-book-slots-loading {
    padding: 24px 0;
    text-align: center;
    color: #6b7e95;
    grid-column: 1 / -1;
    font-size: 13px;
}
.rr-book-slots-more {
    grid-column: 1 / -1;
    background: none;
    border: 0;
    color: #00aeff;
    font-size: 13px;
    padding: 6px;
    cursor: pointer;
    text-align: center;
    margin-top: 4px;
}
.rr-book-slots-more:hover { text-decoration: underline; }

/* ----- form ----- */
.rr-book-selected-slot {
    background: #f5f7fa;
    border: 1px solid #e3e8ee;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #004274;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.rr-book-selected-slot strong { font-weight: 700; }
.rr-book-back {
    background: none;
    border: 0;
    color: #00aeff;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
}
.rr-book-back:hover { text-decoration: underline; }

.rr-book-field { margin-bottom: 12px; }
.rr-book-field label {
    display: block;
    font-size: 12px;
    text-transform: uppercase;
    color: #004274;
    font-weight: 600;
    letter-spacing: 0.04em;
    margin-bottom: 4px;
}
.rr-book-field input,
.rr-book-field textarea {
    width: 100%;
    border: 1px solid #e3e8ee;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    color: #004274;
    background: #fff;
    box-sizing: border-box;
    font-family: inherit;
}
.rr-book-field input:focus,
.rr-book-field textarea:focus {
    outline: none;
    border-color: #00aeff;
    box-shadow: 0 0 0 3px rgba(0, 174, 255, 0.15);
}
.rr-book-field textarea { resize: vertical; min-height: 64px; }

/* honeypot — hidden from humans, visible to bots */
.rr-book-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.rr-book-error {
    background: #fff5f5;
    border: 1px solid #f5c6c6;
    color: #b73838;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    margin-bottom: 12px;
}

/* ----- buttons ----- */
.rr-book-cta {
    display: block;
    width: 100%;
    background: #F54343;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 120ms;
    font-family: inherit;
}
.rr-book-cta:hover { background: #e23030; }
.rr-book-cta:disabled { background: #c9d2dc; cursor: not-allowed; }

/* ----- confirmation panel ----- */
.rr-book-confirm-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #e8f9ee;
    color: #2bba6e;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 4px auto 12px;
    font-size: 30px;
    line-height: 1;
}
.rr-book-confirm h3 {
    color: #004274;
    text-align: center;
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 700;
}
.rr-book-confirm-when {
    text-align: center;
    color: #2bba6e;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
}
.rr-book-confirm-email {
    text-align: center;
    color: #6b7e95;
    font-size: 13px;
    margin-bottom: 18px;
}
.rr-book-agent-card {
    background: #f5f7fa;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 14px;
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
}
.rr-book-agent-photo {
    flex: 0 0 auto;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #cfdce8;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 20px;
}
.rr-book-agent-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rr-book-agent-meta { flex: 1 1 auto; min-width: 0; }
.rr-book-agent-name {
    color: #004274;
    font-weight: 700;
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 2px;
}
.rr-book-agent-role {
    color: #6b7e95;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.rr-book-agent-phone {
    color: #00aeff;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.rr-book-agent-phone:hover { text-decoration: underline; }

.rr-book-cal-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 14px;
}
.rr-book-cal-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 10px 4px;
    color: #004274;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    transition: border-color 120ms, color 120ms;
    cursor: pointer;
}
.rr-book-cal-btn:hover {
    border-color: #00aeff;
    color: #00aeff;
}
.rr-book-cal-btn::before {
    content: '';
    display: block;
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10z'/%3E%3C/svg%3E") no-repeat center / contain;
            mask: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M19 4h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V10h14v10z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.rr-book-confirm-help {
    text-align: center;
    font-size: 12px;
    color: #6b7e95;
}
.rr-book-confirm-help a { color: #00aeff; text-decoration: none; }
.rr-book-confirm-help a:hover { text-decoration: underline; }

/* ----- trigger button (default styling for the [rr_book_tour] shortcode) ----- */
.rr-book-trigger {
    display: inline-block;
    background: #F54343;
    color: #fff;
    border: 0;
    border-radius: 10px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    cursor: pointer;
    transition: background 120ms;
    text-decoration: none;
    font-family: inherit;
}
.rr-book-trigger:hover { background: #e23030; }
