/* =============================================================
   review.css — styles for the opt-in review widget. Scoped under
   .sa-rv-* selectors so nothing leaks into the rest of the page.
   ============================================================= */

/* Hide out-of-group links when review mode is active */
.sa-rv-hidden-link {
    display: none !important;
}

/* Body padding so the group-nav strip below the main nav doesn't overlap
   the page hero. The actual height is set via JS after layout. */
body.sa-rv-active {
    padding-top: var(--sa-rv-groupnav-h, 48px);
}

/* Group-nav strip — sits flush under the existing site nav and lists
   every page in the active review group as a clickable tab. */
.sa-rv-groupnav {
    position: fixed;
    top: 64px;       /* JS overrides with the actual nav height */
    left: 0; right: 0;
    z-index: 99996;
    background: #1a1a1a;
    border-top: 1px solid rgba(194, 160, 86, 0.35);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    color: #f8f5ef;
    font-family: 'Figtree', system-ui, sans-serif;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.sa-rv-groupnav-inner {
    max-width: 1320px;
    margin: 0 auto;
    padding: 8px 24px;
    display: flex;
    align-items: center;
    gap: 24px;
    overflow-x: auto;
}
.sa-rv-groupnav-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(248, 245, 239, 0.5);
    flex-shrink: 0;
    white-space: nowrap;
}
.sa-rv-groupnav-label strong {
    color: #c2a056;
    font-weight: 700;
    margin-left: 4px;
}
.sa-rv-groupnav-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: nowrap;
}
.sa-rv-groupnav-tab {
    color: rgba(248, 245, 239, 0.7);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 4px;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.15s ease, background 0.15s ease;
}
.sa-rv-groupnav-tab:hover {
    color: #f8f5ef;
    background: rgba(255, 255, 255, 0.06);
}
.sa-rv-groupnav-tab.is-active {
    color: #c2a056;
    background: rgba(194, 160, 86, 0.12);
}

/* The fixed pill needs to sit BELOW the group-nav strip when it's active */
body.sa-rv-active .sa-rv-pill {
    top: calc(var(--sa-rv-groupnav-h, 48px) + 80px);
}
body.sa-rv-active .sa-rv-help {
    top: calc(var(--sa-rv-groupnav-h, 48px) + 124px);
}

/* Top-right "Review mode" pill */
.sa-rv-pill {
    position: fixed;
    top: 80px;
    right: 16px;
    z-index: 99998;
    background: #0a0a0a;
    color: #f8f5ef;
    border: 1px solid rgba(194, 160, 86, 0.5);
    font-family: 'Figtree', system-ui, sans-serif;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.06em;
    padding: 8px 14px;
    border-radius: 999px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    user-select: none;
    transition: transform 0.15s ease;
}
.sa-rv-pill:hover { transform: translateY(-1px); }
.sa-rv-pill strong { color: #c2a056; font-weight: 700; letter-spacing: 0.04em; }
.sa-rv-pill-dot {
    width: 8px; height: 8px;
    background: #c2a056;
    border-radius: 50%;
    animation: sa-rv-pulse 1.6s ease-in-out infinite;
}
@keyframes sa-rv-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.45; transform: scale(0.85); }
}

/* Highlight rendering on comments — kept subtle so headers and large
   type don't look "overlay-ed" by a heavy yellow-marker stripe. The
   underline alone is enough to mark the phrase; hover reveals more. */
.sa-rv-hl {
    background: transparent;
    border-bottom: 1px solid color-mix(in srgb, var(--rv-color, #c2a056) 60%, transparent);
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease;
    padding-bottom: 1px;
}
.sa-rv-hl:hover {
    background: color-mix(in srgb, var(--rv-color, #c2a056) 14%, transparent);
    border-bottom-color: var(--rv-color, #c2a056);
}
.sa-rv-flash {
    animation: sa-rv-flash 1.2s ease;
}
@keyframes sa-rv-flash {
    0%, 100% { box-shadow: 0 0 0 0 transparent; }
    20% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--rv-color, #c2a056) 40%, transparent); }
}

/* Pin: a small dot dropped at click coords */
.sa-rv-pin {
    position: absolute;
    width: 22px;
    height: 22px;
    transform: translate(-50%, -50%);
    background: var(--rv-color, #c2a056);
    color: #fff;
    border: 2px solid #fff;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9000;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    padding: 0;
}
.sa-rv-pin::after {
    content: '';
    position: absolute;
    inset: 4px;
    border: 1px solid rgba(255,255,255,0.4);
    border-radius: 50%;
}
.sa-rv-pin:hover { transform: translate(-50%, -50%) scale(1.12); }

/* Composer popup */
.sa-rv-popup {
    position: absolute;
    z-index: 99999;
    width: 320px;
    background: #fff;
    border: 1px solid #e5e2db;
    border-radius: 10px;
    padding: 14px;
    box-shadow: 0 12px 28px rgba(10, 10, 10, 0.18);
    font-family: 'Figtree', system-ui, sans-serif;
}
.sa-rv-popup-head {
    display: flex; align-items: center; gap: 8px;
    margin-bottom: 8px;
}
.sa-rv-popup-mark {
    width: 26px; height: 26px;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sa-rv-popup-name {
    font-size: 13px;
    font-weight: 600;
    color: #0a0a0a;
}
.sa-rv-popup-quote {
    font-style: italic;
    font-size: 12px;
    color: #666;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 2px solid #c2a056;
    line-height: 1.4;
}
.sa-rv-popup-input {
    width: 100%;
    border: 1px solid #d8d3c8;
    background: #fff;
    color: #0a0a0a;
    font-family: inherit;
    font-size: 14px;
    padding: 10px;
    border-radius: 6px;
    resize: vertical;
    box-sizing: border-box;
}
.sa-rv-popup-input:focus {
    outline: none;
    border-color: #c2a056;
}
.sa-rv-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 10px;
}
.sa-rv-popup-cancel,
.sa-rv-popup-save {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease;
}
.sa-rv-popup-cancel {
    background: transparent;
    color: #666;
    border-color: #d8d3c8;
}
.sa-rv-popup-cancel:hover { background: #f5f1ea; }
.sa-rv-popup-save {
    background: #c2a056;
    color: #0a0a0a;
}
.sa-rv-popup-save:hover { background: #a07f36; }

/* Side panel */
.sa-rv-panel {
    position: fixed;
    top: 0; right: 0;
    width: 380px;
    max-width: 90vw;
    height: 100vh;
    background: #fff;
    border-left: 1px solid #e5e2db;
    z-index: 99997;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    font-family: 'Figtree', system-ui, sans-serif;
    box-shadow: -10px 0 30px rgba(10, 10, 10, 0.15);
}
.sa-rv-panel.open { transform: translateX(0); }
.sa-rv-panel-head {
    padding: 20px 22px 14px;
    border-bottom: 1px solid #eeeae2;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}
.sa-rv-panel-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #c2a056;
    margin-bottom: 4px;
}
.sa-rv-panel-head h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 500;
    color: #0a0a0a;
    margin: 0;
}
.sa-rv-panel-close {
    background: transparent;
    border: 1px solid #d8d3c8;
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    color: #666;
}
.sa-rv-panel-close:hover { color: #0a0a0a; border-color: #0a0a0a; }
.sa-rv-panel-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px 22px;
}
.sa-rv-panel-empty {
    color: #888;
    font-style: italic;
    font-size: 14px;
    text-align: center;
    padding: 40px 0;
}
.sa-rv-panel-foot {
    padding: 12px 22px 16px;
    border-top: 1px solid #eeeae2;
    color: #888;
    font-size: 12px;
}

/* Comment cards in the panel */
.sa-rv-card {
    border-left: 3px solid var(--rv-color, #c2a056);
    padding: 12px 14px;
    margin-bottom: 14px;
    background: #faf7f1;
    border-radius: 0 6px 6px 0;
}
.sa-rv-card-author {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    font-size: 12px;
    color: #0a0a0a;
}
.sa-rv-card-author strong { font-weight: 700; }
.sa-rv-mark {
    width: 22px; height: 22px;
    border-radius: 50%;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sa-rv-card-time { color: #888; font-size: 11px; }
.sa-rv-card-quote {
    font-family: 'Playfair Display', Georgia, serif;
    font-style: italic;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    margin: 4px 0 8px;
    padding-left: 10px;
    border-left: 2px solid var(--rv-color, #c2a056);
    cursor: pointer;
}
.sa-rv-card-quote:hover { color: #0a0a0a; }
.sa-rv-card-body {
    font-size: 14px;
    color: #0a0a0a;
    line-height: 1.5;
    white-space: pre-wrap;
}
.sa-rv-card-actions {
    margin-top: 8px;
    text-align: right;
}
.sa-rv-link-btn {
    background: transparent;
    border: 0;
    color: #c2a056;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 6px;
}
.sa-rv-link-btn:hover { color: #a07f36; }
.sa-rv-card-reply {
    margin-top: 10px;
    margin-left: 22px;
    padding: 8px 12px;
    background: #fff;
    border-left: 2px solid var(--rv-color, #c2a056);
    border-radius: 0 4px 4px 0;
}
.sa-rv-card-replybox {
    margin-top: 10px;
    background: #fff;
    padding: 10px;
    border: 1px solid #e5e2db;
    border-radius: 6px;
}
.sa-rv-card-replybox textarea {
    width: 100%;
    border: 1px solid #d8d3c8;
    border-radius: 4px;
    padding: 6px 8px;
    font-family: inherit;
    font-size: 13px;
    box-sizing: border-box;
    resize: vertical;
    min-height: 50px;
}
.sa-rv-card-replybox textarea:focus { outline: none; border-color: #c2a056; }
.sa-rv-card-replybox div {
    text-align: right;
    margin-top: 6px;
}
.sa-rv-replysave {
    background: #c2a056;
    color: #0a0a0a;
    border: 0;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}
.sa-rv-replysave:hover { background: #a07f36; }

/* Welcome / name modal */
.sa-rv-modal {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.7);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}
.sa-rv-modal-card {
    background: #fff;
    border-radius: 10px;
    padding: 32px 36px;
    max-width: 420px;
    width: 90vw;
    font-family: 'Figtree', system-ui, sans-serif;
    box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.sa-rv-modal-eyebrow {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #c2a056;
    margin-bottom: 14px;
}
.sa-rv-modal-card h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.6rem;
    font-weight: 500;
    color: #0a0a0a;
    margin: 0 0 12px;
}
.sa-rv-modal-card p {
    font-size: 14px;
    line-height: 1.55;
    color: #444;
    margin: 0 0 18px;
}
.sa-rv-modal-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d8d3c8;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
    color: #0a0a0a;
    box-sizing: border-box;
}
.sa-rv-modal-input:focus { outline: none; border-color: #c2a056; }
.sa-rv-modal-actions {
    margin-top: 18px;
    text-align: right;
}
.sa-rv-modal-btn {
    background: #c2a056;
    color: #0a0a0a;
    border: 0;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
}
.sa-rv-modal-btn:hover { background: #a07f36; }

/* Help banner — sits under the pill on first visit, dismissible */
.sa-rv-help {
    position: fixed;
    top: 124px;
    right: 16px;
    z-index: 99996;
    width: 320px;
    max-width: calc(100vw - 32px);
    background: #fff;
    color: #0a0a0a;
    border: 1px solid #e5e2db;
    border-radius: 8px;
    padding: 18px 18px 16px;
    box-shadow: 0 12px 28px rgba(10, 10, 10, 0.18);
    font-family: 'Figtree', system-ui, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    animation: sa-rv-help-in 0.4s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.sa-rv-help.sa-rv-help-out {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}
@keyframes sa-rv-help-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.sa-rv-help-title {
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #c2a056;
    margin-bottom: 10px;
}
.sa-rv-help-list {
    margin: 0 0 12px;
    padding-left: 0;
    list-style: none;
}
.sa-rv-help-list li {
    margin-bottom: 6px;
    color: #333;
    padding-left: 16px;
    position: relative;
}
.sa-rv-help-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    background: #c2a056;
    border-radius: 50%;
}
.sa-rv-help-list strong { color: #0a0a0a; font-weight: 700; }
.sa-rv-help-list em { font-style: normal; font-weight: 600; color: #c2a056; }
.sa-rv-key {
    display: inline-block;
    font-family: 'SF Mono', 'Menlo', monospace;
    font-size: 11px;
    font-weight: 600;
    background: #faf7f1;
    color: #0a0a0a;
    border: 1px solid #d8d3c8;
    border-bottom-width: 2px;
    border-radius: 4px;
    padding: 1px 6px;
    margin: 0 1px;
    line-height: 1.2;
    vertical-align: 1px;
}
.sa-rv-help-close {
    background: #0a0a0a;
    color: #fff;
    border: 0;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 14px;
    border-radius: 4px;
    cursor: pointer;
    width: 100%;
}
.sa-rv-help-close:hover { background: #2d2d2d; }

@media (max-width: 600px) {
    .sa-rv-pill { top: 64px; right: 8px; font-size: 11px; padding: 6px 10px; }
    .sa-rv-help { top: 108px; right: 8px; width: calc(100vw - 16px); }
    .sa-rv-panel { width: 100vw; }
}
