/* =========================================================
   Offers — floating button (bottom-right) and plan popup.
   ========================================================= */

/* ── Floating button ─────────────────────────────────── */
.of-fab-wrap {
    position: fixed; right: 24px; bottom: 28px; z-index: 900;
    display: flex; flex-direction: column; align-items: flex-end; gap: 12px;
    pointer-events: none;
}
.of-fab-wrap > * { pointer-events: auto; }

.of-fab {
    position: relative; width: 84px; height: 84px; border-radius: 50%;
    border: 3px solid #fff; cursor: pointer; color: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    background: radial-gradient(circle at 35% 30%, #FF9A3C, #E8590C 60%, #C2410C);
    box-shadow: 0 10px 28px rgba(232, 89, 12, .45);
    font-family: var(--font-display, inherit);
    transition: transform .2s ease;
}
.of-fab:hover { transform: scale(1.06); }
.of-fab:focus-visible { outline: 3px solid #1B4DB3; outline-offset: 4px; }
.of-fab i { font-size: 1.55rem; }
.of-fab-tx { font-size: .74rem; font-weight: 800; letter-spacing: .04em; }
.of-fab::before, .of-fab::after {
    content: ""; position: absolute; inset: -14px; border-radius: 50%;
    border: 2px solid rgba(232, 89, 12, .25); pointer-events: none;
    animation: of-ring 2.4s ease-out infinite;
}
.of-fab::after { animation-delay: 1.2s; }
@keyframes of-ring { from { transform: scale(.85); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
.of-fab-new {
    position: absolute; top: -8px; right: -14px;
    background: #EF4444; color: #fff; font-size: .66rem; font-weight: 800; letter-spacing: .04em;
    padding: 3px 8px; border-radius: 999px; border: 2px solid #fff;
    box-shadow: 0 3px 8px rgba(239, 68, 68, .4);
}

.of-teaser {
    display: flex; align-items: center; gap: 2px;
    background: #111B2E; color: #fff; border-radius: 999px;
    box-shadow: 0 10px 26px rgba(10, 22, 40, .35);
    animation: of-pop .35s cubic-bezier(.16, 1, .3, 1);
}
.of-teaser[hidden] { display: none; }
.of-teaser-go {
    display: inline-flex; align-items: center; gap: 10px;
    background: none; border: 0; color: inherit; cursor: pointer;
    padding: 10px 6px 10px 16px; font-weight: 700; font-size: .92rem;
    font-family: var(--font-display, inherit);
}
.of-teaser-go i { color: #FB923C; }
.of-teaser-x {
    background: none; border: 0; color: rgba(255,255,255,.6); cursor: pointer;
    font-size: 1.15rem; line-height: 1; padding: 8px 14px 8px 6px;
}
.of-teaser-x:hover { color: #fff; }
@keyframes of-pop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }

/* ── Modal ───────────────────────────────────────────── */
.of-modal { position: fixed; inset: 0; z-index: 1200; display: grid; place-items: center; padding: 16px; }
.of-modal[hidden] { display: none; }
.of-backdrop { position: absolute; inset: 0; background: rgba(8, 15, 30, .62); backdrop-filter: blur(2px); }
.of-box {
    position: relative; width: min(1180px, 100%); max-height: calc(100vh - 32px);
    display: flex; flex-direction: column; overflow: hidden;
    background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
    animation: of-pop .3s cubic-bezier(.16, 1, .3, 1);
    color: #1A2332;
}
body.of-lock { overflow: hidden; }

.of-head {
    display: flex; align-items: center; gap: 16px; padding: 18px 24px;
    background: linear-gradient(100deg, #0B2C52, #11477D 55%, #1C6AA8);
    color: #fff; flex: 0 0 auto;
}
.of-head-ic { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: rgba(255,255,255,.14); font-size: 1.25rem; }
.of-head h2 { margin: 0; color: #fff; font-family: var(--font-display, inherit); font-weight: 800; font-size: clamp(1.1rem, 2.2vw, 1.45rem); }
.of-head p { margin: 2px 0 0; color: rgba(255,255,255,.85); font-size: .95rem; }
.of-x {
    margin-left: auto; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
    background: rgba(255,255,255,.14); color: #fff; font-size: 1.2rem;
}
.of-x:hover { background: rgba(255,255,255,.26); }

/* Plan selector — stays pinned while the details scroll. */
.of-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; padding: 18px 24px 14px; flex: 0 0 auto; background: #fff; box-shadow: 0 6px 12px -10px rgba(0,0,0,.25); position: relative; z-index: 1; }
.of-opt {
    --c: #EA580C; --cb: #FFF4EC; --ct: #9A3412; --cs: #FFE2CC;
    text-align: left; cursor: pointer; padding: 14px 16px; border-radius: 14px;
    border: 2px solid #E2E8F0; background: #fff; color: #1A2332;
    display: flex; flex-direction: column; gap: 4px; font: inherit;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.of-opt.c-green  { --c: #16A34A; --cb: #F0FDF4; --ct: #166534; --cs: #DCFCE7; }
.of-opt.c-blue   { --c: #1B4DB3; --cb: #EFF5FF; --ct: #153E92; --cs: #DBE7FF; }
.of-opt.c-violet { --c: #7C3AED; --cb: #F5F0FF; --ct: #5B21B6; --cs: #EDE4FF; }
.of-opt:hover { border-color: color-mix(in srgb, var(--c) 45%, #E2E8F0); }
.of-opt:focus-visible { outline: 3px solid color-mix(in srgb, var(--c) 45%, transparent); outline-offset: 2px; }
.of-opt.is-on { border-color: var(--c); background: var(--cb); box-shadow: 0 6px 18px color-mix(in srgb, var(--c) 18%, transparent); }
.of-opt-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.of-save { background: var(--cs); color: var(--ct); font-weight: 800; font-size: .78rem; padding: 4px 10px; border-radius: 999px; }
.of-opt.is-on .of-save { background: var(--c); color: #fff; }
.of-opt-state { font-size: .82rem; font-weight: 700; }
.of-opt-state .on { display: none; color: var(--c); }
.of-opt-state .off { color: #94A3B8; }
.of-opt.is-on .of-opt-state .on { display: inline; }
.of-opt.is-on .of-opt-state .off { display: none; }
.of-opt-name { font-family: var(--font-display, inherit); font-size: 1.18rem; color: #1E293B; }
.of-opt.is-on .of-opt-name { color: var(--ct); }
.of-opt-sub { font-size: .9rem; color: #64748B; }
.of-opt.is-on .of-opt-sub { color: var(--c); }
.of-opt-price { font-family: var(--font-display, inherit); font-weight: 800; font-size: 1.6rem; color: #0F172A; margin-top: 4px; }
.of-opt.is-on .of-opt-price { color: var(--c); }
.of-opt-price small { font-size: .85rem; font-weight: 500; color: #64748B; }

/* Scrolling body */
.of-body {
    overflow-y: auto; padding: 18px 24px 24px; flex: 1 1 auto;
    display: grid; grid-template-columns: minmax(0, 46%) minmax(0, 1fr); column-gap: 28px; align-items: start;
}
.of-plan { display: contents; }
.of-plan[hidden] { display: none; }
.of-plan {
    --c: #EA580C; --cb: #FFF7F0; --ct: #9A3412; --cs: #FFE7D6;
}
.of-plan.c-green  { --c: #16A34A; --cb: #F2FCF5; --ct: #166534; --cs: #DCFCE7; }
.of-plan.c-blue   { --c: #1B4DB3; --cb: #F2F7FF; --ct: #153E92; --cs: #DBE7FF; }
.of-plan.c-violet { --c: #7C3AED; --cb: #F7F2FF; --ct: #5B21B6; --cs: #EDE4FF; }
.of-art { grid-column: 1; grid-row: 1 / span 2; position: sticky; top: 0; }
.of-art img { width: 100%; height: auto; display: block; border-radius: 12px; border: 1px solid #E2E8F0; box-shadow: 0 6px 18px rgba(15, 23, 42, .08); }
.of-detail { grid-column: 2; grid-row: 1; }
.of-form { grid-column: 2; grid-row: 2; margin-top: 16px; }

/* Value card shown when no poster is uploaded */
.of-card {
    border-radius: 14px; padding: 22px; color: #fff;
    background:
        radial-gradient(500px 220px at 100% 0%, rgba(255,255,255,.12), transparent 60%),
        linear-gradient(150deg, #0B2C52, #12487F);
    border: 1px solid #DCE6F2;
}
.of-card-k { display: inline-block; margin: 0 0 10px; padding: 4px 10px; border-radius: 999px; background: var(--c); font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.of-card h3 { margin: 0 0 6px; color: #fff; font-family: var(--font-display, inherit); font-size: 1.5rem; font-weight: 800; line-height: 1.15; }
.of-card-price { margin: 0 0 14px; color: rgba(255,255,255,.9); }
.of-card-price b { font-size: 1.6rem; font-family: var(--font-display, inherit); color: #fff; }
.of-card-big { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font-weight: 700; line-height: 1.3; }
.of-card-big span { font-family: var(--font-display, inherit); font-size: 3.4rem; line-height: 1; color: #FDBA74; }
.of-break { width: 100%; border-collapse: collapse; background: #fff; color: #1E293B; border-radius: 10px; overflow: hidden; font-size: .92rem; }
.of-break td { padding: 9px 12px; border-bottom: 1px solid #EEF2F7; }
.of-break td:last-child { text-align: right; font-weight: 700; }
.of-break-save td { background: var(--cs); color: var(--ct); font-weight: 800; font-size: 1.02rem; border-bottom: 0; }

/* Details */
.of-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 8px; }
.of-tag { background: var(--cs); color: var(--ct); font-weight: 800; font-size: .86rem; padding: 6px 12px; border-radius: 999px; }
.of-valid { color: #64748B; font-weight: 600; font-size: .92rem; }
.of-name { margin: 4px 0 2px; font-family: var(--font-display, inherit); font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 800; color: #0F172A; }
.of-tagline { margin: 0 0 14px; color: #64748B; font-size: 1.02rem; }
.of-fee {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 16px 20px; border-radius: 14px; border: 2px solid var(--c); background: var(--cb);
}
.of-fee p { margin: 0; }
.of-fee-k { font-weight: 600; color: var(--ct); }
.of-fee-v { font-family: var(--font-display, inherit); font-weight: 800; font-size: 2.2rem; color: var(--c); line-height: 1.2; }
.of-fee-v s { font-size: 1.05rem; color: #94A3B8; font-weight: 600; }
.of-fee-save { color: #15803D; font-weight: 700; margin-top: 4px !important; }
.of-fee-calls {
    flex: 0 0 auto; text-align: center; background: #fff; border: 1px solid #E2E8F0; border-radius: 12px;
    padding: 10px 16px; color: #64748B; font-size: .9rem; display: flex; flex-direction: column;
}
.of-fee-calls b { color: var(--c); font-family: var(--font-display, inherit); font-size: 1.4rem; }
.of-fee-calls small { color: #15803D; font-weight: 700; }
.of-perks { margin-top: 16px; border: 1px solid #E8EEF5; border-radius: 14px; padding: 16px 18px; }
.of-perks h4 { margin: 0 0 10px; font-size: .98rem; font-weight: 800; letter-spacing: .02em; color: #0F172A; }
.of-perks ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.of-perks li { display: flex; gap: 12px; align-items: flex-start; color: #334155; line-height: 1.4; }
.of-perks li i { color: #16A34A; margin-top: 3px; }

/* Form */
.of-fields { border: 1px solid #E8EEF5; background: #F8FAFC; border-radius: 14px; padding: 16px 18px; }
.of-fields h4 { margin: 0 0 12px; font-size: 1rem; font-weight: 800; color: #0F172A; }
.of-f { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-weight: 600; color: #334155; font-size: .93rem; }
.of-f:last-child { margin-bottom: 0; }
.of-f input {
    height: 48px; border: 1px solid #CBD5E1; border-radius: 10px; padding: 0 14px;
    font: inherit; font-weight: 400; font-size: 1rem; background: #fff; color: #0F172A;
}
.of-f input:focus { outline: none; border-color: #1B4DB3; box-shadow: 0 0 0 3px rgba(27, 77, 179, .15); }
.of-f input[aria-invalid="true"] { border-color: #DC2626; box-shadow: 0 0 0 3px rgba(220, 38, 38, .12); }
.of-members[hidden] { display: none; }
.of-members-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.of-pay {
    --c: #EA580C;
    width: 100%; margin-top: 16px; padding: 16px 20px; border: 0; border-radius: 14px; cursor: pointer;
    background: var(--c); color: #fff; font-family: var(--font-display, inherit); font-weight: 800; font-size: 1.2rem;
    display: flex; align-items: center; justify-content: center; gap: 12px;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--c) 35%, transparent);
}
.of-pay.c-green  { --c: #16A34A; }
.of-pay.c-blue   { --c: #1B4DB3; }
.of-pay.c-violet { --c: #7C3AED; }
.of-pay[hidden] { display: none; }
.of-pay:hover { filter: brightness(1.05); }
.of-pay[disabled] { opacity: .7; cursor: progress; }
.of-secure { margin: 10px 0 0; text-align: center; color: #64748B; font-size: .86rem; }
.of-secure i { color: #1B4DB3; margin-right: 4px; }
.of-note { margin-top: 12px; padding: 12px 14px; border-radius: 10px; background: #EFF5FF; color: #1E3A8A; font-size: .92rem; }
.of-note i { margin-right: 6px; }
.of-msg { margin-top: 12px; padding: 12px 14px; border-radius: 10px; font-size: .95rem; }
.of-msg.ok  { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.of-msg.err { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.of-msg a { font-weight: 700; }

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 860px) {
    .of-body { grid-template-columns: 1fr; }
    .of-art { grid-column: 1; grid-row: auto; position: static; margin-bottom: 16px; }
    .of-detail, .of-form { grid-column: 1; grid-row: auto; }
}
@media (max-width: 560px) {
    .of-fab-wrap { right: 14px; bottom: 14px; }
    .of-fab { width: 70px; height: 70px; }
    .of-fab i { font-size: 1.3rem; }
    .of-teaser-go { font-size: .82rem; padding: 8px 4px 8px 12px; }
    .of-modal { padding: 0; }
    .of-box { max-height: 100vh; height: 100%; border-radius: 0; }
    .of-head { padding: 14px 16px; }
    .of-head-ic { display: none; }
    .of-pick { grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 14px; }
    .of-opt { padding: 10px; }
    .of-opt-name { font-size: .98rem; }
    .of-opt-sub { font-size: .78rem; }
    .of-opt-price { font-size: 1.25rem; }
    .of-opt-state { display: none; }
    .of-body { padding: 14px; }
    .of-fee { flex-direction: column; align-items: flex-start; }
    .of-members-row { grid-template-columns: 1fr; }
    .of-pay { font-size: 1.02rem; }
}
@media (prefers-reduced-motion: reduce) {
    .of-fab::before, .of-fab::after, .of-teaser, .of-box { animation: none; }
}
@media print { .of-fab-wrap, .of-modal { display: none !important; } }
