/* RateHub Widget Styles — v2 (RateParity-inspired redesign) — Bold layout unified */

/* Base */
.rhw-root {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
.rhw-root *, .rhw-root *::before, .rhw-root *::after {
    box-sizing: inherit;
}

/* ─── PRICE WIDGET ──────────────────────────────────────────── */
.rhw-price {
    border-radius: 16px;
    overflow: visible;
    margin: 16px 0;
    max-width: 340px;
    position: relative;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Theme: Bold 1 — single page, all info visible (prices + reviews inline) */
.rhw-bold1 {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    overflow: hidden;
}
.rhw-bold1 .rhw-header { display: none; }
.rhw-bold1 .rhw-direct-hero {
    background: linear-gradient(135deg, var(--rhw-primary, #6C3CE0), color-mix(in srgb, var(--rhw-primary, #6C3CE0) 60%, #3B82F6));
    padding: 14px 16px 10px;
    border-radius: 16px 16px 0 0;
}
.rhw-bold1 .rhw-direct-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.rhw-bold1 .rhw-direct-main-price { font-size: 28px; font-weight: 800; }
.rhw-bold1 .rhw-direct-compare-price { font-size: 12px; }
.rhw-bold1 .rhw-direct-badge { background: var(--rhw-secondary, #16a34a); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 700; margin-right: 6px; }
.rhw-bold1 .rhw-ota-row { padding: 6px 16px; min-height: 32px; }
.rhw-bold1 .rhw-ota-name { font-size: 12px; font-weight: 500; color: #374151; }
.rhw-bold1 .rhw-ota-price { font-size: 13px; font-weight: 700; color: #111827; }
.rhw-bold1 .rhw-cta {
    margin: 4px 16px 6px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 16px;
    background: var(--rhw-primary, #1f2937) !important;
}
.rhw-bold1 .rhw-savings { margin: 0 16px 4px; border-radius: 8px; font-size: 12px; padding: 4px 10px; background: #fefce8; color: var(--rhw-secondary, #16a34a); }
.rhw-bold1 .rhw-powered { padding-bottom: 6px; font-size: 10px; }
.rhw-bold1 .rhw-date-line { font-size: 10px; padding: 2px 16px; }
/* Bold 1: no pages — show compact reviews inline, no slide */
.rhw-bold1 .rhw-pages-container { display: block; overflow: visible; }
.rhw-bold1 .rhw-page { min-width: unset; width: auto; }
.rhw-bold1 .rhw-pages-container.rhw-show-reviews .rhw-page { transform: none; }
.rhw-bold1 .rhw-reviews-teaser { display: none; }
.rhw-bold1 .rhw-page-reviews { display: block; }
.rhw-bold1 .rhw-reviews-back { display: none; }
/* Compact aggregate: inline row */
.rhw-bold1 .rhw-reviews-aggregate { padding: 6px 16px 2px; gap: 5px; flex-direction: row; align-items: center; }
.rhw-bold1 .rhw-reviews-big-score { width: 30px; height: 30px; font-size: 11px; border-radius: 8px; flex-shrink: 0; }
.rhw-bold1 .rhw-reviews-big-label { font-size: 12px; font-weight: 600; }
.rhw-bold1 .rhw-reviews-big-count { font-size: 10px; color: #9ca3af; }
/* Compact breakdown: with progress bars, tight rows */
.rhw-bold1 .rhw-reviews-breakdown { padding: 0 16px 4px; }
.rhw-bold1 .rhw-review-row { padding: 1px 0; }
.rhw-bold1 .rhw-review-row-bar { height: 4px; }
.rhw-bold1 .rhw-reviews-platform-icon { width: 16px; height: 16px; font-size: 9px; }
.rhw-bold1 .rhw-review-row-name { font-size: 10px; }
.rhw-bold1 .rhw-review-row-score { font-size: 10px; font-weight: 600; }
/* Bold 1: hide powered/cta from page 2 */
.rhw-bold1 .rhw-page-prices .rhw-powered { display: none; }
.rhw-bold1 .rhw-page-reviews .rhw-cta { display: none; }

/* Premium body label */
.rhw-premium .rhw-body::before {
    content: attr(data-platforms-label);
    display: block;
    text-align: center;
    font-size: 12px;
    color: #9ca3af;
    padding: 8px 0 4px;
}
.rhw-premium .rhw-body:not([data-platforms-label])::before { content: none; }

/* Theme: Prestige — refined dark navy + gold accents, luxury feel */
.rhw-premium {
    background: #fafaf9;
    border-radius: 16px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.10), 0 0 0 1px rgba(180,163,120,0.15);
    overflow: hidden;
}
.rhw-premium .rhw-header {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    border-bottom: 2px solid #c9a96e;
    padding: 7px 16px;
}
.rhw-premium .rhw-header-title { color: #c9a96e; font-size: 11px; font-weight: 600; letter-spacing: 0.1em; }
.rhw-premium .rhw-header-title::before { content: '\2605 '; }
.rhw-premium .rhw-header-icon { display: none !important; }
.rhw-premium .rhw-close-btn { color: rgba(201,169,110,0.6); }
.rhw-premium .rhw-close-btn:hover { color: #c9a96e; }
.rhw-premium .rhw-direct-hero {
    background: linear-gradient(135deg, var(--rhw-primary, #1a1a2e), color-mix(in srgb, var(--rhw-primary, #1a1a2e) 70%, #16213e));
    padding: 14px 16px 10px;
    color: #fff;
}
.rhw-premium .rhw-direct-label { font-size: 14px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 700; color: #c9a96e; }
.rhw-premium .rhw-direct-badge { background: var(--rhw-secondary, #c9a96e); color: #fff; font-size: 12px; padding: 3px 10px; border-radius: 20px; font-weight: 700; margin-right: 8px; }
.rhw-premium .rhw-direct-main-price { font-size: 28px; font-weight: 800; color: #fff; }
.rhw-premium .rhw-direct-compare-price { font-size: 13px; color: rgba(255,255,255,0.45); }
.rhw-premium .rhw-cta {
    margin: 4px 16px 8px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 16px;
    background: linear-gradient(135deg, var(--rhw-primary, #1a1a2e), color-mix(in srgb, var(--rhw-primary, #1a1a2e) 70%, #16213e)) !important;
    border: 1px solid rgba(201,169,110,0.3);
}
.rhw-premium .rhw-cta:hover { opacity: 0.9; border-color: #c9a96e; }
.rhw-premium .rhw-body { border-top: none; }
.rhw-premium .rhw-ota-row { padding: 7px 16px; border-bottom: 1px solid #f0ebe3; }
.rhw-premium .rhw-ota-row:last-child { border-bottom: none; }
.rhw-premium .rhw-ota-name { font-size: 13px; font-weight: 600; color: #44403c; }
.rhw-premium .rhw-ota-price { font-size: 15px; font-weight: 700; color: #1c1917; }
.rhw-premium .rhw-savings { margin: 0 16px 4px; border-radius: 8px; background: #fef9e7; border: 1px solid #fde68a; color: var(--rhw-secondary, #c9a96e); font-size: 11px; padding: 4px 10px; }
.rhw-premium .rhw-powered { padding-bottom: 12px; color: #a8a29e; }

/* ─── Theme: Minimal — Clean & discreet, RateParity-inspired ───
   White card, no colored hero, bold typography. Direct rate sits as a
   simple "label + price" row at top with OTA rows in muted gray below.
   CTA is a single dark indigo pill. Designed to be unobtrusive on
   any site — no gradients, no badges, no colored fills. */
.rhw-float {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.10), 0 1px 2px rgba(15, 23, 42, 0.04);
    border: none;
    overflow: hidden;
}
.rhw-float .rhw-header { display: none; }
.rhw-float:has(.rhw-direct-hero) .rhw-header { display: none; }

/* Hero: NO gradient — clean white, bold black title + price */
.rhw-float .rhw-direct-hero {
    background: #ffffff;
    color: #0f172a;
    padding: 16px 18px 4px;
    border-bottom: none;
}
.rhw-float .rhw-direct-info {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    width: 100%;
}
.rhw-float .rhw-direct-badge { display: none; }
.rhw-float .rhw-direct-label {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.01em;
    text-transform: none;
    line-height: 1.2;
}
.rhw-float .rhw-direct-row {
    flex-direction: row-reverse;
    justify-content: flex-end;
    margin-left: auto;
}
.rhw-float .rhw-direct-prices {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 8px;
}
.rhw-float .rhw-direct-main-price {
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
}
.rhw-float .rhw-direct-compare-price {
    font-size: 13px;
    color: #94a3b8;
    text-decoration: line-through;
}
.rhw-float .rhw-direct-features { display: none; }

/* OTA rows: minimal — no icons, gray text, tight spacing */
.rhw-float .rhw-ota-row {
    padding: 4px 18px;
    min-height: 26px;
    border-bottom: none;
    background: transparent;
}
.rhw-float .rhw-ota-row:hover { background: transparent; }
.rhw-float .rhw-ota-icon,
.rhw-float .rhw-ota-icon-placeholder { display: none; }
.rhw-float .rhw-ota-name {
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}
.rhw-float .rhw-ota-price {
    font-size: 14px;
    font-weight: 600;
    color: #94a3b8;
}

/* Date line: centered gray, with subtle top border separator */
.rhw-float .rhw-date-line {
    font-size: 12px;
    color: #64748b;
    padding: 12px 18px 12px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
    margin-top: 8px;
    letter-spacing: 0;
}

/* CTA: full-width dark indigo rounded pill */
.rhw-float .rhw-cta {
    margin: 0 14px 10px;
    padding: 12px 16px;
    background: var(--rhw-primary, #3D3DCC) !important;
    color: #fff !important;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    box-shadow: none;
    letter-spacing: 0.01em;
    transition: opacity 0.15s, box-shadow 0.15s;
    width: calc(100% - 28px);
}
.rhw-float .rhw-cta:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(61, 61, 204, 0.20);
    opacity: 0.95;
}

/* Savings: hidden — too noisy for the minimal aesthetic */
.rhw-float .rhw-savings { display: none; }

/* Reviews teaser: subtle outlined pill with star + chevron */
.rhw-float .rhw-reviews-teaser {
    margin: 0 14px 10px;
    padding: 10px 14px;
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 12px;
    box-shadow: none;
}
.rhw-float .rhw-reviews-teaser:hover {
    background: #f8fafc;
    box-shadow: none;
}
.rhw-float .rhw-reviews-teaser-score {
    width: 18px;
    height: 18px;
    background: transparent !important;
    color: #475569;
    font-size: 0;
    border-radius: 0;
    position: relative;
}
.rhw-float .rhw-reviews-teaser-score::before {
    content: '\2606';
    font-size: 16px;
    color: #475569;
    line-height: 1;
}
.rhw-float .rhw-reviews-teaser-label {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    letter-spacing: 0.05em;
}
.rhw-float .rhw-reviews-teaser-count {
    font-size: 12px;
    font-weight: 600;
    color: #475569;
}
.rhw-float .rhw-reviews-arrow { color: #94a3b8; }

.rhw-float .rhw-reviews-back { color: #475569; }
.rhw-float .rhw-reviews-big-score { border-radius: 12px; background: var(--rhw-primary, #3D3DCC); }
.rhw-float .rhw-review-row-bar { background: #f1f5f9; border-radius: 3px; }
.rhw-float .rhw-review-row-fill { background: var(--rhw-secondary, #3D3DCC); }

/* Powered by: tiny, bottom */
.rhw-float .rhw-powered {
    text-align: left;
    padding: 0 18px 10px;
    font-size: 10px;
    color: #cbd5e1;
    letter-spacing: 0.04em;
}

/* Close button: subtle gray, top-right */
.rhw-float .rhw-close-btn {
    top: 10px;
    right: 10px;
    background: rgba(15, 23, 42, 0.06);
    color: #475569;
    border: none;
    z-index: 10;
}
.rhw-float .rhw-close-btn:hover { background: rgba(15, 23, 42, 0.12); color: #0f172a; }

/* Animation: gentle fade-up only — no bounce */
@keyframes rhw-float-fade-up {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
.rhw-float.rhw-animate-in { animation: rhw-float-fade-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* ─── Theme: Breeze — Fresh, coastal, airy for seaside/island hotels ─── */
.rhw-breeze {
    background: #F5F9FC;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(27,107,147,0.08), 0 1px 2px rgba(0,0,0,0.03);
    border: 1px solid #D4E8F0;
    overflow: hidden;
}
.rhw-breeze .rhw-header { display: none; }
.rhw-breeze:has(.rhw-direct-hero) .rhw-header { display: none; }
.rhw-breeze .rhw-direct-hero {
    background: linear-gradient(135deg, var(--rhw-primary, #1B6B93), color-mix(in srgb, var(--rhw-primary, #1B6B93) 70%, #3AA6D0));
    padding: 14px 16px 10px;
    border-bottom: none;
    color: #fff;
}
.rhw-breeze .rhw-direct-badge { background: var(--rhw-secondary, #0D9488); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 700; margin-right: 6px; }
.rhw-breeze .rhw-direct-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; color: rgba(255,255,255,0.9); }
.rhw-breeze .rhw-direct-main-price { font-size: 28px; font-weight: 800; color: #fff; letter-spacing: -0.02em; }
.rhw-breeze .rhw-direct-compare-price { font-size: 13px; color: rgba(255,255,255,0.5); }
.rhw-breeze .rhw-ota-row { padding: 6px 16px; min-height: 32px; border-bottom: 1px solid #D4E8F0; }
.rhw-breeze .rhw-ota-row:last-child { border-bottom: none; }
.rhw-breeze .rhw-ota-row:hover { background: #EAF4F9; }
.rhw-breeze .rhw-ota-name { font-size: 12px; font-weight: 500; color: #5A8A9A; }
.rhw-breeze .rhw-ota-price { font-size: 13px; font-weight: 700; color: #1A3A4A; }
.rhw-breeze .rhw-cta {
    margin: 4px 16px 6px;
    border-radius: 24px;
    font-weight: 700;
    font-size: 13px;
    padding: 8px 16px;
    background: var(--rhw-primary, #2BA5C7) !important;
    color: #fff !important;
    box-shadow: 0 2px 8px rgba(43,165,199,0.22);
    transition: transform 0.2s, box-shadow 0.2s;
}
.rhw-breeze .rhw-cta:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(43,165,199,0.32); }
.rhw-breeze .rhw-savings { margin: 0 16px 4px; border-radius: 8px; background: #ECFDF5; border: 1px solid #D1FAE5; color: var(--rhw-secondary, #0D9488); font-size: 12px; padding: 4px 10px; }
.rhw-breeze .rhw-powered { padding-bottom: 6px; font-size: 10px; color: #8BB8C9; }
.rhw-breeze .rhw-date-line { color: #8BB8C9; font-size: 10px; padding: 2px 16px; }
/* Breeze reviews */
.rhw-breeze .rhw-reviews-teaser { background: #EAF4F9; border: 1px solid #D4E8F0; border-radius: 12px; }
.rhw-breeze .rhw-reviews-teaser:hover { background: #D4E8F0; box-shadow: 0 2px 6px rgba(27,107,147,0.06); }
.rhw-breeze .rhw-reviews-back { color: #1B6B93; }
.rhw-breeze .rhw-reviews-big-score { border-radius: 12px; }
.rhw-breeze .rhw-close-btn { top: 12px; right: 12px; z-index: 10; color: rgba(255,255,255,0.6); }
.rhw-breeze .rhw-close-btn:hover { color: #fff; }
.rhw-breeze .rhw-review-row-bar { background: #D4E8F0; border-radius: 3px; }
.rhw-breeze .rhw-reviews-teaser-score { background: var(--rhw-secondary, #0D9488); }
.rhw-breeze .rhw-review-row-fill { background: var(--rhw-secondary, #0D9488); }
/* Breeze animation: gentle fade-in */
@keyframes rhw-breeze-bounce {
    0% { transform: translateY(0); }
    40% { transform: translateY(-4px); }
    60% { transform: translateY(-2px); }
    100% { transform: translateY(0); }
}
.rhw-breeze.rhw-animate-in .rhw-cta { animation: rhw-breeze-bounce 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) 0.3s; }
@keyframes rhw-breeze-fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.rhw-breeze.rhw-animate-in { animation: rhw-breeze-fade-up 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards; }

/* ─── Header ──────────────────────────────────────────────── */
.rhw-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px dashed #eef0f2;
}
.rhw-header-title {
    font-size: 10px;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    flex: 1;
    justify-content: center;
    line-height: 1.4;
}
.rhw-header-icon {
    width: 13px;
    height: 13px;
    opacity: 0.6;
}

/* ─── Direct Rate (hero section — prominent, like RateParity) ─── */
.rhw-direct-hero {
    padding: 12px 40px 12px 16px;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, var(--rhw-primary, #2563EB), color-mix(in srgb, var(--rhw-primary, #2563EB) 80%, #000));
    color: #fff;
    margin: 0;
    position: relative;
}
.rhw-direct-info {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rhw-direct-badge {
    background: var(--rhw-secondary, #16a34a);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.03em;
    font-variant-numeric: tabular-nums;
    display: inline-block;
    align-self: flex-start;
    margin-bottom: 6px;
}
.rhw-direct-label {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    line-height: 1.3;
}
.rhw-direct-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}
.rhw-direct-prices {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-shrink: 0;
}
.rhw-direct-main-price {
    font-size: 28px;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
}
.rhw-direct-compare-price {
    font-size: 12px;
    color: rgba(255,255,255,0.55);
    text-decoration: line-through;
    font-weight: 500;
    margin-top: 2px;
}

/* Featured text / selling points */
.rhw-direct-features {
    width: 100%;
    margin-top: 6px;
    font-size: 11px;
    color: rgba(255,255,255,0.75);
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
}
.rhw-direct-features span {
    display: inline;
}

/* Date line */
.rhw-date-line {
    text-align: center;
    font-size: 11px;
    color: #9ca3af;
    padding: 2px 16px 4px;
    letter-spacing: 0.01em;
}
/* ─── CTA Button ──────────────────────────────────────────── */
.rhw-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 32px);
    margin: 4px 16px 6px;
    padding: 10px 16px;
    background: var(--rhw-secondary, #16A34A);
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
    letter-spacing: 0.01em;
    line-height: 1.4;
    min-height: 44px;
}
.rhw-cta:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
/* Static CTA (no booking URL) — looks like button but not clickable */
.rhw-cta-static { cursor: default; }
.rhw-cta-static:hover { transform: none; box-shadow: none; opacity: 1; }

/* ─── OTA Rows ──────────────────────────────────────────── */
.rhw-body {
    padding: 0;
}
.rhw-ota-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    border-bottom: 1px dashed #eef0f2;
    transition: background 0.15s;
    min-height: 38px;
}
a.rhw-ota-row {
    text-decoration: none;
    cursor: pointer;
}
a.rhw-ota-row:hover {
    background: #f8f9fb;
}
/* Non-link OTA rows: subtle hover for visual feedback */
.rhw-ota-row:not(a):hover {
    background: #fafbfc;
}
.rhw-ota-row:last-child { border-bottom: none; }
.rhw-ota-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;
}
.rhw-ota-icon {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
    object-fit: contain;
}
.rhw-ota-icon-placeholder {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #9ca3af;
}
.rhw-ota-name {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
    line-height: 1.4;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rhw-ota-price {
    font-size: 16px;
    font-weight: 700;
    color: #1f2937;
    white-space: nowrap;
}

/* ─── Savings badge ──────────────────────────────────────── */
.rhw-savings {
    background: #fefce8;
    border: none;
    color: var(--rhw-secondary, #16a34a);
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    padding: 6px 16px;
}

/* ─── Pages Container (2-page tabbed layout) ──────────── */
.rhw-pages-container {
    overflow: hidden;
    display: flex;
    width: 100%;
}
.rhw-page {
    min-width: 100%;
    width: 100%;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}
.rhw-pages-container.rhw-show-reviews .rhw-page {
    transform: translateX(-100%);
}


/* ─── Reviews Teaser (Page 1 — compact clickable row) ──── */
.rhw-reviews-teaser {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    margin: 4px 12px 4px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
}
.rhw-reviews-teaser:hover {
    background: #f0f1f3;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.rhw-reviews-teaser-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rhw-reviews-teaser-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
}
.rhw-reviews-teaser-text {
    display: flex;
    flex-direction: column;
}
.rhw-reviews-teaser-label {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.3;
}
.rhw-reviews-teaser-count {
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.3;
}
.rhw-reviews-arrow {
    color: #9ca3af;
    flex-shrink: 0;
    transition: transform 0.15s;
}
.rhw-reviews-teaser:hover .rhw-reviews-arrow {
    transform: translateX(2px);
    color: #6b7280;
}

/* ─── Reviews Page (Page 2 — full breakdown) ──────────── */
.rhw-reviews-back {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 12px 16px 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--rhw-primary, #2563EB);
    cursor: pointer;
    transition: opacity 0.15s;
}
.rhw-reviews-back:hover { opacity: 0.7; }
.rhw-reviews-aggregate {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 8px 16px 16px;
    gap: 4px;
}
.rhw-reviews-big-score {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 56px;
    height: 56px;
    border-radius: 14px;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    padding: 0 14px;
    margin-bottom: 4px;
}
.rhw-reviews-big-label {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
}
.rhw-reviews-big-count {
    font-size: 12px;
    color: #9ca3af;
}

.rhw-reviews-breakdown {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 0 16px 12px;
}
.rhw-review-row {
    display: flex;
    align-items: center;
    gap: 8px;
}
.rhw-review-row-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 110px;
    flex-shrink: 0;
}
.rhw-reviews-platform-icon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.rhw-review-row-name {
    font-size: 12px;
    font-weight: 500;
    color: #6b7280;
}
.rhw-review-row-bar {
    flex: 1;
    height: 6px;
    background: #f3f4f6;
    border-radius: 3px;
    overflow: hidden;
}
.rhw-review-row-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}
.rhw-review-row-score {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    min-width: 38px;
    text-align: right;
}
/* ─── Cache notice ──────────────────────────────────────── */
.rhw-cache-notice {
    font-size: 10px;
    color: #b0b5bf;
    text-align: center;
    padding: 4px 16px 6px;
}

/* ─── N/A state ──────────────────────────────────────────── */
.rhw-unavailable {
    padding: 24px 20px;
    text-align: center;
    color: #9ca3af;
    font-size: 13px;
}

/* ─── Loading skeleton ──────────────────────────────────── */
.rhw-skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: rhw-shimmer 1.5s infinite;
    border-radius: 6px;
    height: 16px;
    margin: 8px 20px;
}
@keyframes rhw-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ─── Close button ──────────────────────────────────────── */
.rhw-close-btn {
    background: rgba(0,0,0,0.35);
    border: 2px solid rgba(255,255,255,0.9);
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    opacity: 1;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.15s, transform 0.15s;
    flex-shrink: 0;
    position: absolute;
    top: -12px;
    right: -12px;
    z-index: 20;
    border-radius: 50%;
}
/* Invisible touch-target expansion to 44px */
.rhw-close-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
}
.rhw-close-btn:hover {
    background: rgba(0,0,0,0.45);
    transform: scale(1.1);
}

/* Bold 1: gradient hero bg, white close btn */
.rhw-bold1 .rhw-close-btn { background: rgba(0,0,0,0.15); color: rgba(255,255,255,0.9); top: 12px; right: 12px; z-index: 10; }
.rhw-bold1 .rhw-close-btn:hover { background: rgba(0,0,0,0.3); color: #fff; }

/* Premium: close button sits inside the header row */
.rhw-premium .rhw-close-btn { position: absolute; top: 0; right: 0; height: 28px; border: none; background: transparent; border-radius: 0; color: rgba(201,169,110,0.7); }
.rhw-premium .rhw-close-btn:hover { background: rgba(255,255,255,0.1); color: #c9a96e; }

/* ─── Collapsed FAB — themed pill ─────────────────────── */
.rhw-collapsed-fab {
    display: none; /* hidden by default, shown via JS */
    align-items: center;
    justify-content: center;
    width: fit-content;
    height: 34px;
    padding: 0 14px;
    background: var(--rhw-primary, #2563EB);
    color: #fff;
    border-radius: 17px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15), 0 0 0 1px rgba(0,0,0,0.04);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s, opacity 0.25s;
    position: fixed;
    z-index: 999999;
    animation: rhw-fab-in 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes rhw-fab-in {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}
.rhw-collapsed-fab:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 24px rgba(0,0,0,0.2), 0 0 0 1px rgba(0,0,0,0.06);
}
.rhw-collapsed-fab .rhw-fab-icon {
    width: 22px;
    height: 22px;
    opacity: 0.95;
    stroke: #fff;
    color: #fff;
}
.rhw-collapsed-fab:hover .rhw-fab-icon {
    opacity: 1;
}
.rhw-collapsed-fab .rhw-fab-price {
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    white-space: nowrap;
}
.rhw-collapsed-fab .rhw-fab-badge { display: none; }
.rhw-collapsed-fab .rhw-fab-text {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    letter-spacing: 0.01em;
}

/* ─── Powered by ──────────────────────────────────────────── */
.rhw-powered {
    text-align: center;
    padding: 4px 16px 8px;
    font-size: 10px;
    color: #c4c8cf;
    letter-spacing: 0.03em;
}
.rhw-powered a {
    color: #b0b5bf;
    text-decoration: none;
    transition: color 0.15s;
}
.rhw-powered a:hover {
    color: #9ca3af;
    text-decoration: underline;
}

/* ─── CHAT WIDGET ──────────────────────────────────────────── */

/* Floating button */
.rhw-chat-fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--rhw-primary, #2563EB);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    transition: transform 0.2s, box-shadow 0.2s;
    z-index: 999998;
    font-size: 22px;
}
.rhw-chat-fab:hover { transform: scale(1.06); box-shadow: 0 6px 24px rgba(0,0,0,0.22); }

/* Chat window */
.rhw-chat-window {
    position: fixed;
    bottom: 88px;
    right: 24px;
    width: 360px;
    max-width: calc(100vw - 48px);
    height: 520px;
    max-height: calc(100vh - 120px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.16);
    display: flex;
    flex-direction: column;
    z-index: 999999;
    overflow: hidden;
    transition: opacity 0.2s, transform 0.2s;
}
.rhw-chat-window.rhw-hidden {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
    pointer-events: none;
}
.rhw-chat-header {
    padding: 14px 16px;
    background: var(--rhw-primary, #2563EB);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}
.rhw-chat-header-name { font-weight: 600; font-size: 14px; }
.rhw-chat-header-sub { font-size: 11px; opacity: 0.8; }
.rhw-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    line-height: 1;
    padding: 8px;
    margin: -8px;
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.rhw-chat-close:hover { opacity: 1; }
.rhw-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}
.rhw-msg {
    max-width: 82%;
    padding: 10px 14px;
    border-radius: 14px;
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}
.rhw-msg-user {
    align-self: flex-end;
    background: var(--rhw-primary, #2563EB);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.rhw-msg-assistant {
    align-self: flex-start;
    background: #f3f4f6;
    color: #1f2937;
    border-bottom-left-radius: 4px;
}
.rhw-msg-typing {
    align-self: flex-start;
    background: #f3f4f6;
    color: #9ca3af;
    padding: 10px 16px;
    border-radius: 14px;
    border-bottom-left-radius: 4px;
    font-size: 13px;
}
.rhw-chat-input-area {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}
.rhw-chat-input {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 14px;
    resize: none;
    outline: none;
    font-family: inherit;
    line-height: 1.4;
    min-height: 44px;
}
.rhw-chat-input:focus { border-color: var(--rhw-primary, #2563EB); }
.rhw-chat-send {
    width: 44px;
    height: 44px;
    background: var(--rhw-primary, #2563EB);
    color: #fff;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: flex-end;
    transition: opacity 0.15s;
}
.rhw-chat-send:hover { opacity: 0.85; }
.rhw-chat-send:disabled { opacity: 0.4; cursor: default; }

/* ─── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
    .rhw-chat-window { width: calc(100vw - 24px); right: 12px; bottom: 80px; }
    .rhw-chat-fab { right: 16px; bottom: 16px; }
    .rhw-price { max-width: 100%; }
    .rhw-direct-hero { padding: 14px 16px 12px; }
    .rhw-direct-main-price { font-size: 20px; }
    .rhw-ota-name { font-size: 12px; }
    .rhw-ota-price { font-size: 13px; }
    .rhw-ota-row { padding: 10px 16px; min-height: 44px; }
    .rhw-header { padding: 10px 16px; }
    .rhw-cta { font-size: 13px; padding: 12px 12px; width: calc(100% - 32px); margin: 4px 16px 14px; }
    .rhw-savings { font-size: 11px; padding: 4px 8px; white-space: normal; word-wrap: break-word; }
    /* Scale down large hero prices for mobile */
    .rhw-bold1 .rhw-direct-main-price,
    .rhw-float .rhw-direct-main-price,
    .rhw-premium .rhw-direct-main-price { font-size: 28px; }
}

/* Narrow containers (300px) */
@media (max-width: 320px) {
    .rhw-price { max-width: 100%; }
    .rhw-direct-hero { padding: 12px 14px 10px; }
    .rhw-direct-main-price { font-size: 18px; }
    .rhw-bold1 .rhw-direct-main-price { font-size: 24px; }
    .rhw-ota-row { padding: 10px 14px; }
    .rhw-cta { width: calc(100% - 28px); margin-left: 14px; margin-right: 14px; }
}
