/* =========================================================================
 *  /css/feedback-popup.css
 *  Fujn — Trustpilot feedback pop-up.
 *
 *  Shown ONLY after the "No Payment Required" message, and only for
 *  transactions whose fee rate is comfortably above the marginal mempool
 *  fee (see calculate_price.php -> feedback_eligible).
 *
 *  Visual language matches the rest of the site: frosted glass over a dark
 *  navy tint, Montserrat headings, orange/green accents.
 * ========================================================================= */

/* =========================================================================
 *  TYPEFACES — same stack the rest of fujn.com uses
 *  -------------------------------------------------------------------------
 *  Display  : Montserrat        — as .banner-header.montserrat-extra-bold
 *  Body     : Gilroy-Semibold   — as .banner-para.gilroy-semi-bold / .fujn-slug
 *  Emphasis : Gilroy-ExtraBold  — a real heavier cut, not synthetic bold
 *  Data     : IBM Plex Mono     — as #selected_fee and the terminal console
 *
 *  The Gilroy faces are declared here as well as in index.php so this
 *  stylesheet stands on its own if the pop-up is ever used on another page.
 *  Paths are root-absolute because this file lives in /css/.
 * ========================================================================= */
@font-face {
    font-family: Gilroy-Semibold;
    src: url(/fonts/Gilroy-Semibold.ttf) format('truetype');
    font-display: swap;
}
@font-face {
    font-family: Gilroy-ExtraBold;
    src: url(/fonts/Gilroy-ExtraBold.otf) format('opentype');
    font-display: swap;
}

:root {
    --fujn-fb-display:  'Montserrat', 'Gilroy-ExtraBold', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fujn-fb-body:     'Gilroy-Semibold', 'Gilroy', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fujn-fb-emphasis: 'Gilroy-ExtraBold', 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --fujn-fb-mono:     'IBM Plex Mono', 'Courier New', monospace;
}

/* ============== BACKDROP (blurs the whole page) ============== */
.fujn-fb-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;                      /* above console (9999) + arrow (9998) */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;

    background: rgba(2, 12, 24, 0.58);
    backdrop-filter: blur(16px) saturate(120%);
    -webkit-backdrop-filter: blur(16px) saturate(120%);

    opacity: 0;
    visibility: hidden;
    transition: opacity 0.38s ease, visibility 0.38s ease;
    -webkit-overflow-scrolling: touch;
    overflow-y: auto;
}

.fujn-fb-overlay.is-open {
    opacity: 1;
    visibility: visible;
}

/* Browsers without backdrop-filter get a solid-ish scrim instead */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .fujn-fb-overlay { background: rgba(2, 12, 24, 0.90); }
}

/* Locks background scrolling while the pop-up is open */
body.fujn-fb-lock {
    overflow: hidden;
}

/* ============== CARD ============== */
.fujn-fb-card {
    position: relative;
    width: 100%;
    max-width: 470px;
    margin: auto;
    padding: 30px 30px 24px;
    box-sizing: border-box;
    text-align: center;

    background: rgba(10, 22, 38, 0.74);
    backdrop-filter: blur(24px) saturate(140%);
    -webkit-backdrop-filter: blur(24px) saturate(140%);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 22px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45),
                0 0 0 1px rgba(255, 255, 255, 0.04) inset;

    transform: translateY(18px) scale(0.97);
    opacity: 0;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.42s ease;
}

.fujn-fb-overlay.is-open .fujn-fb-card {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Soft green glow along the top edge — "good news" cue */
.fujn-fb-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 12%;
    right: 12%;
    height: 1px;
    background: linear-gradient(90deg,
                rgba(0, 182, 122, 0), rgba(0, 182, 122, 0.85), rgba(0, 182, 122, 0));
}

/* ============== CLOSE (X) ============== */
.fujn-fb-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.66);
    font-size: 17px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.fujn-fb-close:hover,
.fujn-fb-close:focus-visible {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transform: rotate(90deg);
    outline: none;
}

/* ============== EYEBROW BADGE ============== */
.fujn-fb-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 16px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(0, 182, 122, 0.14);
    border: 1px solid rgba(0, 182, 122, 0.36);
    color: #34d399;

    font-family: var(--fujn-fb-body);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}
.fujn-fb-badge svg { width: 13px; height: 13px; flex: 0 0 auto; }

/* ============== TRUSTPILOT LOCKUP ============== */
/*  The supplied artwork (star + "Trustpilot" + 5 stars + "Excellent") has a
 *  DARK wordmark, so it gets its own white panel rather than sitting on the
 *  dark glass — that is also how Trustpilot's own brand guidelines want it
 *  used, and it reads as an official badge instead of a pasted-on image.
 */
.fujn-fb-tp {
    width: 100%;
    max-width: 330px;
    margin: 0 auto 20px;
    padding: 13px 18px;
    box-sizing: border-box;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.30);
}
.fujn-fb-tp img {
    display: block;
    width: 100%;
    height: auto;
}

/* Fallback lockup — drawn in CSS, shown only if the artwork fails to load */
.fujn-fb-tp-fallback {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.fujn-fb--nologo .fujn-fb-tp img        { display: none; }
.fujn-fb--nologo .fujn-fb-tp-fallback   { display: flex; }

.fujn-fb-tp-mark { display: flex; align-items: center; gap: 5px; }
.fujn-fb-tp-mark svg { width: 23px; height: 23px; fill: #00b67a; flex: 0 0 auto; }
.fujn-fb-tp-mark span {
    font-family: var(--fujn-fb-display);
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.7px;
    color: #191919;
}

.fujn-fb-tp-rating { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.fujn-fb-tp-stars { display: flex; gap: 2px; }
.fujn-fb-tp-stars span {
    width: 17px; height: 17px;
    display: flex; align-items: center; justify-content: center;
    background: #00b67a;
}
.fujn-fb-tp-stars svg { width: 12px; height: 12px; fill: #ffffff; }
.fujn-fb-tp-word {
    font-family: var(--fujn-fb-body);
    font-size: 11.5px;
    font-weight: 600;
    color: #191919;
    letter-spacing: -0.1px;
}

/* ============== TEXT ============== */
.fujn-fb-title {
    margin: 0 0 12px;
    font-family: var(--fujn-fb-display);
    font-size: 22px;
    font-weight: 800;
    line-height: 1.28;
    letter-spacing: -0.3px;
    color: #ffffff;
}

.fujn-fb-text {
    margin: 0 0 12px;
    font-family: var(--fujn-fb-body);
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.62;
    color: rgba(255, 255, 255, 0.80);
}
.fujn-fb-text strong {
    color: #ffffff;
    font-family: var(--fujn-fb-emphasis);
    font-weight: 400;
}

/* ============== FEE CHIP (data proof) ============== */
.fujn-fb-chip {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 2px 0 18px;
    padding: 8px 14px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);

    font-family: var(--fujn-fb-mono);
    font-size: 12.5px;
    color: rgba(255, 255, 255, 0.72);
}
.fujn-fb-chip b {
    color: #ffaa33;
    font-weight: 600;
}
.fujn-fb-chip i {
    font-style: normal;
    opacity: 0.35;
}

/* ============== BUTTONS ============== */
.fujn-fb-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fujn-fb-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    width: 100%;
    padding: 15px 20px;
    box-sizing: border-box;
    border: 0;
    border-radius: 12px;
    background: #00b67a;
    color: #ffffff !important;
    text-decoration: none !important;

    font-family: var(--fujn-fb-display);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.2px;
    cursor: pointer;
    box-shadow: 0 10px 26px rgba(0, 182, 122, 0.32);
    transition: background 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}
.fujn-fb-cta svg { width: 18px; height: 18px; fill: #ffffff; flex: 0 0 auto; }
.fujn-fb-cta:hover,
.fujn-fb-cta:focus-visible {
    background: #00a06c;
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(0, 182, 122, 0.42);
    outline: none;
}
.fujn-fb-cta:active { transform: translateY(0); }

.fujn-fb-skip {
    width: 100%;
    padding: 11px 20px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: rgba(255, 255, 255, 0.55);

    font-family: var(--fujn-fb-body);
    font-size: 13.5px;
    font-weight: 400;
    cursor: pointer;
    transition: color 0.2s ease, background 0.2s ease;
}
.fujn-fb-skip:hover,
.fujn-fb-skip:focus-visible {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.06);
    outline: none;
}

/* ============== FOOTNOTE ============== */
.fujn-fb-note {
    margin: 14px 0 0;
    font-family: var(--fujn-fb-body);
    font-size: 11.5px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.42);
}

/* ============== MOBILE ============== */
@media (max-width: 560px) {
    .fujn-fb-overlay { padding: 16px 14px; align-items: flex-end; }
    .fujn-fb-card {
        max-width: 100%;
        padding: 28px 20px 18px;
        border-radius: 20px;
        margin-bottom: max(14px, env(safe-area-inset-bottom));
    }
    .fujn-fb-title  { font-size: 19px; }
    .fujn-fb-text   { font-size: 13.5px; line-height: 1.58; }
    .fujn-fb-tp     { max-width: 290px; padding: 11px 15px; margin-bottom: 18px; }
    .fujn-fb-tp-mark svg  { width: 20px; height: 20px; }
    .fujn-fb-tp-mark span { font-size: 17px; }
    .fujn-fb-tp-stars span{ width: 15px; height: 15px; }
    .fujn-fb-tp-stars svg { width: 11px; height: 11px; }
    .fujn-fb-tp-word      { font-size: 10.5px; }
    .fujn-fb-chip   { font-size: 11.5px; margin-bottom: 18px; }
    .fujn-fb-cta    { padding: 14px 16px; font-size: 14.5px; }
}

/* Very short screens (landscape phones) — keep everything reachable */
@media (max-height: 620px) {
    .fujn-fb-overlay    { align-items: flex-start; }
    .fujn-fb-card       { padding-top: 26px; }
    .fujn-fb-tp         { margin-bottom: 14px; }
    .fujn-fb-chip       { margin-bottom: 14px; }
}

/* ============== REDUCED MOTION ============== */
@media (prefers-reduced-motion: reduce) {
    .fujn-fb-overlay,
    .fujn-fb-card,
    .fujn-fb-cta,
    .fujn-fb-close { transition: opacity 0.2s ease, visibility 0.2s ease; }
    .fujn-fb-card  { transform: none; }
    .fujn-fb-overlay.is-open .fujn-fb-card { transform: none; }
    .fujn-fb-close:hover { transform: none; }
    .fujn-fb-cta:hover   { transform: none; }
}
