/* VIP Trustpilot Badge v4 - CLEAN */
:root {
    --tp-green: #00b74a;
    --vip-blue: #29ABE2;
}

/* TOP BAR */
#tpb-bar {
    position: fixed !important;
    top: 0 !important; left: 0 !important; right: 0 !important;
    z-index: 9999 !important;
    background: #fff !important;
    border-bottom: 2px solid var(--vip-blue) !important;
    box-shadow: 0 2px 10px rgba(41,171,226,0.15) !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    min-height: 46px !important;
    height: auto !important;
    padding: 4px 8px !important;
    overflow: hidden !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}
body { padding-top: 46px !important; }

#tpb-trigger {
    display: inline-flex !important;
    align-items: center !important;
    gap: 6px !important;
    background: none !important;
    border: none !important;
    cursor: pointer !important;
    padding: 3px 6px !important;
    border-radius: 6px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    max-width: 100% !important;
    flex-shrink: 1 !important;
}
#tpb-trigger:hover { background: #e8f7fd !important; }
.tpb-star  { color: var(--tp-green); display: flex; align-items: center; flex-shrink: 0; }
.tpb-word  { font-size: 14px; font-weight: 700; color: #191919; flex-shrink: 0; }
.tpb-sep   { width: 1px; height: 16px; background: #ddd; flex-shrink: 0; }
.tpb-label { font-size: 12px; font-weight: 700; color: #111; flex-shrink: 0; }
.tpb-stars { height: 16px; width: auto; flex-shrink: 0; max-width: 90px; }
.tpb-meta  { font-size: 11px; color: #666; flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpb-meta strong { color: #111; }

/* ================================================================
   OVERLAY — dark background with 60px gap at the TOP.
   The X button lives in that gap. This is EXACTLY how barvati works.
   Works on iOS Safari AND Android Chrome with no JS needed.
   ================================================================ */
#tpb-overlay {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 0 !important;
    z-index: 100000 !important;
    background: rgba(0,0,0,0.75) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
}
#tpb-overlay[hidden] { display: none !important; }

/* ================================================================
   X CLOSE BUTTON
   Lives at the TOP of the overlay, in the dark gap.
   position:fixed, top:8px right:12px — ALWAYS visible.
   No JS positioning. No parent clipping. Works on every device.
   ================================================================ */
#tpb-close {
    position: fixed !important;
    top: 8px !important;
    right: 12px !important;
    z-index: 100002 !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    border: none !important;
    background: #1a1a1a !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 16px rgba(0,0,0,0.8) !important;
    padding: 0 !important;
    margin: 0 !important;
    outline: none !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}
#tpb-close svg {
    display: block !important;
    width: 24px !important;
    height: 24px !important;
    flex-shrink: 0 !important;
    pointer-events: none !important;
}
#tpb-close line {
    stroke: #ffffff !important;
    stroke-width: 3 !important;
    stroke-linecap: round !important;
}

/* ================================================================
   MODAL — fills screen below the 60px dark gap
   ================================================================ */
#tpb-modal {
    position: relative !important;
    width: 100% !important;
    max-width: 1100px !important;
    margin: 60px auto 0 !important;
    height: calc(100vh - 60px) !important;
    border-radius: 14px 14px 0 0 !important;
    background: #f5f7fa !important;
    box-shadow: 0 -4px 30px rgba(0,0,0,0.3) !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    animation: tpb-up 0.25s ease !important;
}
@keyframes tpb-up {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* LOADING SCREEN */
#tpb-loader {
    position: absolute !important;
    inset: 0 !important;
    background: #fff !important;
    z-index: 20 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 20px !important;
    padding: 40px !important;
    text-align: center !important;
    transition: opacity 0.4s ease !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    border-radius: 14px 14px 0 0 !important;
}
#tpb-loader.hide { opacity: 0 !important; pointer-events: none !important; }
#tpb-ring {
    width: 56px; height: 56px;
    border: 5px solid #e0e0e0;
    border-top-color: var(--tp-green);
    border-radius: 50%;
    animation: tpb-spin 0.9s linear infinite;
    flex-shrink: 0;
}
@keyframes tpb-spin { to { transform: rotate(360deg); } }
#tpb-loader-title { font-size: 20px; font-weight: 700; color: #191919; max-width: 280px; margin: 0; }
#tpb-loader-sub   { font-size: 14px; color: #888; max-width: 280px; margin: 0; line-height: 1.5; }

/* POPUP CONTENT */
#tpb-content {
    flex: 1 !important;
    overflow-y: auto !important;
    min-height: 0 !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* NAV */
.tp-nav {
    background: #111;
    height: 56px;
    min-height: 56px;
    padding: 0 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 3px solid var(--vip-blue);
    flex-shrink: 0;
}
.tp-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -0.3px;
}
.tp-nav-links { display: flex; gap: 18px; align-items: center; }
.tp-nav-links a { color: rgba(255,255,255,0.75); text-decoration: none; font-size: 13px; }
.tp-nav-links a.biz { background: var(--vip-blue); color: #fff; padding: 6px 14px; border-radius: 20px; font-weight: 600; }

/* Hamburger — 3 white lines, no box, exactly like barvati */
.tp-hamburger {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
    cursor: pointer;
    padding: 6px !important;
    flex-shrink: 0;
    -webkit-appearance: none !important;
    appearance: none !important;
}
.tp-hamburger span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    background: #ffffff !important;
    background-color: #ffffff !important;
    border-radius: 2px !important;
    opacity: 1 !important;
}

/* MERCHANT */
.tp-merchant { background: #fff; padding: 20px 24px; display: flex; align-items: center; gap: 24px; border-bottom: 1px solid #e2e8ed; flex-wrap: wrap; }
.tp-logo { height: 65px; width: auto; max-width: 180px; object-fit: contain; flex-shrink: 0; }
.tp-merchant-info { flex: 1; min-width: 160px; }
.tp-name     { font-size: 24px; font-weight: 900; color: #111; margin: 0 0 2px; }
.tp-tagline  { font-size: 13px; color: var(--vip-blue); font-style: italic; margin: 0 0 6px; }
.tp-sub      { font-size: 13px; color: #888; margin: 0 0 8px; }
.tp-score    { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.tp-score img { height: 24px; }
.tp-score-num { font-size: 20px; font-weight: 800; color: #111; }
.tp-verified  { display: inline-flex; align-items: center; gap: 5px; background: #e8f9ef; color: #00823d; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 4px; border: 1px solid #b3e6c8; }
.tp-visit-link { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border: 1.5px solid #e0e0e0; border-radius: 8px; text-decoration: none; color: #111; min-width: 180px; flex-shrink: 0; transition: border-color 0.15s; }
.tp-visit-link:hover { border-color: var(--vip-blue); }
.tp-visit-domain { font-size: 13px; color: #6366f1; font-weight: 600; display: flex; align-items: center; gap: 4px; }
.tp-visit-label  { font-size: 11px; color: #888; }

/* WRITE REVIEW */
.tp-write-review-wrap { background: #fff; padding: 10px 14px; border-bottom: 8px solid #f5f7fa; }
.tp-write-btn { display: block; width: 100%; padding: 13px; background: #1a51d4; color: #fff; text-align: center; border-radius: 8px; font-size: 15px; font-weight: 700; text-decoration: none; box-sizing: border-box; }

/* MAIN GRID */
.tp-main { display: grid; grid-template-columns: 1fr 290px; gap: 20px; padding: 20px 24px; }
.tp-reviews-col { display: flex; flex-direction: column; gap: 12px; }

/* RATING SUMMARY (mobile) */
.tp-rating-summary { display: none; background: #fff; border-radius: 10px; border: 1px solid #e2e8ed; padding: 16px 18px; }
.tp-rs-title { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.tp-rs-title strong { font-size: 17px; font-weight: 800; color: #111; }
.tp-rs-total { font-size: 12px; color: #888; margin-bottom: 12px; }

/* BARS */
.tp-bar-row   { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; font-size: 13px; color: #666; }
.tp-bar-label { width: 42px; flex-shrink: 0; }
.tp-bar-track { flex: 1; height: 8px; background: #eee; border-radius: 4px; overflow: hidden; }
.tp-bar-fill  { height: 100%; border-radius: 4px; }
.tp-bar-pct   { width: 32px; text-align: right; font-weight: 600; color: #333; flex-shrink: 0; }

/* REVIEW CARDS */
.tp-review { background: #fff; border-radius: 10px; border: 1px solid #e2e8ed; padding: 16px 18px; }
.tp-review-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.tp-av { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.c0{background:#29ABE2} .c1{background:#1a8abf} .c2{background:#0e6fa0}
.c3{background:#3bbde8} .c4{background:#111}    .c5{background:#4db8e8} .c6{background:#f59e0b}
.tp-rname  { font-size: 13px; font-weight: 700; color: #111; }
.tp-rmeta  { font-size: 11px; color: #888; }
.tp-rdate  { font-size: 11px; color: #888; }
.tp-rimg   { height: 20px; }
.tp-rtitle { font-size: 14px; font-weight: 700; color: #111; margin: 0 0 5px; }
.tp-rtext  { font-size: 13px; color: #444; line-height: 1.55; margin: 0; }
.tp-rverified { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #00823d; font-weight: 600; margin-top: 6px; }
.tp-raction { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; padding-top: 8px; border-top: 1px solid #f0f0f0; }
.tp-raction button { background: none; border: none; cursor: pointer; font-size: 12px; color: #555; display: flex; align-items: center; gap: 4px; padding: 3px 0; }

/* PAGINATION */
.tp-pagination { display: flex; gap: 3px; flex-wrap: wrap; }
.tp-pg { display: inline-flex; align-items: center; justify-content: center; min-width: 40px; height: 40px; padding: 0 8px; border-radius: 6px; border: 1px solid #e2e8ed; font-size: 13px; cursor: pointer; background: #fff; color: #444; }
.tp-pg.active   { background: var(--vip-blue); color: #fff; border-color: var(--vip-blue); font-weight: 700; }
.tp-pg.next-btn { color: var(--vip-blue); font-weight: 700; }

/* ABOUT CARD */
.tp-about-card { background: #fff; border-radius: 10px; border: 1px solid #e2e8ed; padding: 18px; }
.tp-about-title { font-size: 16px; font-weight: 800; color: #111; margin: 0 0 2px; }
.tp-about-sub   { font-size: 12px; color: #888; margin: 0 0 12px; }
.tp-about-row   { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; }
.tp-about-row svg { flex-shrink: 0; margin-top: 2px; }
.tp-about-row a   { color: var(--vip-blue); font-size: 13px; text-decoration: none; }
.tp-about-row span { font-size: 13px; color: #444; line-height: 1.4; }

/* TRANSPARENCY */
.tp-transparency { border-radius: 10px; overflow: hidden; background: linear-gradient(135deg,#1a3a2a,#0d2118); padding: 18px; display: flex; align-items: center; justify-content: space-between; gap: 14px; text-decoration: none; }
.tp-trans-text p { margin: 0 0 3px; }
.tp-trans-heading { font-size: 11px; color: rgba(255,255,255,0.5); }
.tp-trans-title   { font-size: 15px; font-weight: 700; color: #fff; }
.tp-trans-note    { font-size: 10px; color: rgba(255,255,255,0.4); margin-top: 5px !important; }
.tp-trans-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; flex-shrink: 0; }
.tp-trans-grid div { width: 38px; height: 38px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 900; }

/* SIDEBAR */
.tp-sidebar { display: flex; flex-direction: column; gap: 14px; }
.tp-sidebar-card { background: #fff; border-radius: 10px; border: 1px solid #e2e8ed; padding: 18px; }
.tp-sc-head { display: flex; align-items: center; gap: 8px; margin-bottom: 3px; }
.tp-sc-head strong { font-size: 28px; font-weight: 900; color: #111; line-height: 1; }
.tp-sc-total { font-size: 11px; color: #888; margin-bottom: 12px; }
.tp-sc-title { font-size: 10px; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.8px; margin: 0 0 10px; }
.tp-sc-row   { font-size: 12px; color: #555; display: flex; align-items: flex-start; gap: 6px; margin-bottom: 7px; line-height: 1.4; }
.tp-sc-row a { color: var(--vip-blue); text-decoration: none; }

/* FOOTER */
.tp-footer { background: #111; color: #fff; padding: 32px 20px 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.tp-footer-logo { display: inline-flex; align-items: center; gap: 7px; text-decoration: none; margin-bottom: 24px; }
.tp-footer-logo span { font-size: 17px; font-weight: 700; color: #fff; }
.tp-footer-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: 24px; margin-bottom: 28px; }
.tp-fcol-title { font-size: 12px; font-weight: 700; color: #aaa; margin: 0 0 12px; }
.tp-fcol ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tp-fcol ul li a { color: rgba(255,255,255,0.7); text-decoration: none; font-size: 13px; }
.tp-social-row { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.tp-social-row a { color: rgba(255,255,255,0.7); text-decoration: none; }
.tp-about-footer { display: flex; flex-direction: column; gap: 7px; margin-bottom: 18px; }
.tp-about-footer a   { color: var(--vip-blue); font-size: 12px; text-decoration: none; }
.tp-about-footer span { color: rgba(255,255,255,0.6); font-size: 12px; line-height: 1.4; }
.tp-country-title { font-size: 12px; font-weight: 700; color: #aaa; margin: 0 0 8px; }
.tp-lang-btn { background: #fff; color: #111; border: none; border-radius: 4px; padding: 7px 18px; font-size: 13px; cursor: pointer; margin-bottom: 7px; display: block; }
.tp-lang-note { font-size: 12px; color: rgba(255,255,255,0.35); margin: 0; }
.tp-legal { border-top: 1px solid rgba(255,255,255,0.1); padding: 12px 0; display: flex; flex-wrap: wrap; gap: 6px 14px; }
.tp-legal a { color: rgba(255,255,255,0.45); text-decoration: none; font-size: 11px; }
.tp-copy { font-size: 11px; color: rgba(255,255,255,0.25); padding: 8px 0 20px; margin: 0; }

/* =====================================================
   MOBILE ≤600px
   ===================================================== */
@media (max-width: 600px) {
    body { padding-top: 46px !important; }
    #tpb-bar { min-height: 46px; padding: 3px 4px; }
    #tpb-trigger { gap: 4px; padding: 2px 4px; }
    .tpb-word  { font-size: 12px; }
    .tpb-label { font-size: 10px; }
    .tpb-stars { height: 13px; max-width: 72px; }
    .tpb-star svg { width: 16px; height: 16px; }
    .tpb-meta  { font-size: 10px; }
    .tpb-sep   { display: none; }

    /* X stays fixed top:8px right:12px — same on mobile */
    #tpb-close { top: 8px !important; right: 12px !important; width: 46px !important; height: 46px !important; }
    #tpb-close svg { width: 22px !important; height: 22px !important; }

    /* Modal fills below the gap */
    #tpb-modal { margin-top: 56px !important; height: calc(100vh - 56px) !important; max-width: 100% !important; border-radius: 16px 16px 0 0 !important; }
    #tpb-loader { border-radius: 16px 16px 0 0; }

    .tp-nav { padding: 0 14px; height: 54px; min-height: 54px; }
    .tp-nav-links { display: none; }
    .tp-hamburger { display: flex; }
    .tp-merchant { flex-direction: column; padding: 14px; gap: 10px; }
    .tp-logo { height: 44px; }
    .tp-name { font-size: 18px; }
    .tp-visit-link { display: none; }    .tp-main { grid-template-columns: 1fr; padding: 10px 12px; gap: 10px; }
    .tp-sidebar { display: none; }
    .tp-rating-summary { display: block; }
    .tp-footer-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}

@media (min-width: 601px) and (max-width: 900px) {
    .tp-main { grid-template-columns: 1fr; }
    .tp-sidebar { display: none; }
    .tp-rating-summary { display: block; }
    .tp-footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ── PRODUCT BADGE (shortcode) ── */
.tpb-product-badge {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 18px 20px !important;
    background: #ffffff !important;
    border: 1.5px solid #00b74a !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    margin: 16px 0 !important;
    box-sizing: border-box !important;
    width: 100% !important;
    max-width: 100% !important;
    gap: 12px !important;
    text-decoration: none !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}
.tpb-pb-left {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
}
.tpb-pb-left span {
    font-size: 17px !important;
    font-weight: 700 !important;
    color: #191919 !important;
    white-space: nowrap !important;
}
.tpb-pb-center {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    padding: 0 8px !important;
    min-width: 0 !important;
}
.tpb-pb-center strong {
    font-size: 17px !important;
    font-weight: 800 !important;
    color: #191919 !important;
    white-space: nowrap !important;
    display: block !important;
}
.tpb-pb-center span {
    font-size: 13px !important;
    color: #555 !important;
    white-space: nowrap !important;
    display: block !important;
}
.tpb-pb-right {
    display: flex !important;
    align-items: center !important;
    gap: 4px !important;
    flex-shrink: 0 !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #00b74a !important;
    white-space: nowrap !important;
}

/* ── PRODUCT BADGE MOBILE FIX ── */
@media (max-width: 600px) {
    .tpb-product-badge {
        padding: 14px 12px !important;
        gap: 8px !important;
    }
    .tpb-pb-left span {
        font-size: 14px !important;
    }
    .tpb-pb-left svg {
        width: 24px !important;
        height: 24px !important;
    }
    .tpb-pb-center strong {
        font-size: 14px !important;
    }
    .tpb-pb-center span {
        font-size: 11px !important;
    }
    .tpb-pb-right {
        font-size: 13px !important;
    }
    .tpb-pb-right svg {
        width: 12px !important;
        height: 12px !important;
    }
    .tpb-pb-center {
        padding: 0 4px !important;
    }
}
