/* =====================================================================
   Boosts, plans, payments and ad slots (billing.js)
   ===================================================================== */

/* ---------- pricing page ---------- */
.bill-note { background: #fef3c7; color: #92400e; border-radius: 12px; padding: .8rem 1.1rem; margin-bottom: 1.4rem; font-weight: 600; }
html[data-theme="dark"] .bill-note { background: #3b2f12; color: #fcd34d; }
.bill-current { background: var(--brand-soft); border-radius: 12px; padding: .8rem 1.1rem; margin-bottom: 1.4rem; }
.bill-plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; align-items: stretch; }
.bill-plan { position: relative; padding: 1.6rem; display: flex; flex-direction: column; gap: .7rem; }
.bill-plan.popular { border: 2px solid var(--brand); }
.bill-plan.current { outline: 3px solid var(--success); outline-offset: -1px; }
.bill-plan h2 { font-size: 1.3rem; }
.bill-plan .btn { margin-top: auto; }
.bill-tag { position: absolute; top: -.75rem; left: 1.4rem; background: var(--brand); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem .7rem; border-radius: 99px; }
.bill-price strong { font-size: 1.8rem; font-weight: 800; }
.bill-list { list-style: none; display: grid; gap: .45rem; margin: .3rem 0 .6rem; }
.bill-list li { padding-left: 1.5rem; position: relative; color: var(--ink-soft); }
.bill-list li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 800; }
.btn-block { width: 100%; justify-content: center; }
.bill-boost { margin-top: 1.6rem; padding: 1.6rem; display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.4rem; align-items: center; }
.bill-boost h2 { font-size: 1.25rem; margin-bottom: .4rem; }
.bill-boost p + p { margin-top: .5rem; }
.bill-packs { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.bill-pack { background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; padding: .8rem; text-align: center; display: grid; gap: .2rem; }
.bill-pack span { color: var(--brand); font-weight: 700; }

/* ---------- modals (boost, upgrade) ---------- */
body.bill-open { overflow: hidden; }
.bill-modal { z-index: 350; }
.bill-box { position: relative; width: min(520px, 100%); max-height: 92vh; overflow-y: auto; }
.bill-box h3 { font-size: 1.25rem; margin-bottom: .4rem; padding-right: 2rem; }
.bill-box > p { margin-bottom: .6rem; }
.bill-x { position: absolute; top: .8rem; right: .8rem; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--bg-alt); color: var(--ink-soft); cursor: pointer; font-size: .95rem; }
.bill-item { font-weight: 600; }
.bill-until { background: #fef3c7; color: #92400e; border-radius: 10px; padding: .55rem .8rem; font-size: .9rem; }
html[data-theme="dark"] .bill-until { background: #3b2f12; color: #fcd34d; }
.bill-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin: 1rem 0 .6rem; }
.bill-options.plans { grid-template-columns: 1fr; }
.bill-option { display: flex; align-items: center; gap: .7rem; border: 2px solid var(--line); border-radius: 12px; padding: .8rem; cursor: pointer; background: var(--surface); }
.bill-option input { position: absolute; opacity: 0; pointer-events: none; }
.bill-option:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.bill-option:has(input:focus-visible) { outline: 3px solid var(--brand); outline-offset: 2px; }
.bill-options:not(.plans) .bill-option { justify-content: center; text-align: center; }
.bill-option-body { display: grid; gap: .15rem; flex: 1; }
.bill-option-body span { color: var(--ink-soft); font-size: .9rem; }
.bill-option-body strong { font-size: 1.05rem; }
.bill-options:not(.plans) .bill-option-body span { color: var(--brand); font-weight: 700; font-size: 1rem; }
.bill-option-price { color: var(--ink) !important; font-weight: 700; }
.bill-option.plan { cursor: default; }
.bill-option.plan.current { border-color: var(--success); }
.bill-sandbox { font-size: .85rem; color: #92400e; background: #fef3c7; border-radius: 10px; padding: .45rem .7rem; }
html[data-theme="dark"] .bill-sandbox { background: #3b2f12; color: #fcd34d; }
.btn.is-busy { opacity: .7; cursor: progress; }

/* ---------- boost button, notes and badges in the apps ---------- */
.bill-boost-btn { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; border: 0; }
.bill-boost-btn:hover { filter: brightness(1.06); color: #fff; }
.bill-feat-note { display: inline-block; font-size: .78rem; font-weight: 700; color: #b45309; background: #fef3c7; border-radius: 99px; padding: .1rem .55rem; margin: .2rem 0; }
html[data-theme="dark"] .bill-feat-note { background: #3b2f12; color: #fcd34d; }
.svc-ribbon.featured, .lf-ribbon { background: linear-gradient(135deg, #f59e0b, #f97316); }
.lf-card { position: relative; }
.lf-ribbon { position: absolute; top: .7rem; left: .7rem; z-index: 2; color: #fff; font-size: .72rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; padding: .2rem .6rem; border-radius: 99px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); }
.lf-card.is-featured, .svc-card.is-featured, .svc-person.is-featured { border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245, 158, 11, .35), var(--shadow); }
.bass-feat { display: inline-block; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; color: #fff; background: linear-gradient(135deg, #f59e0b, #f97316); border-radius: 99px; padding: .1rem .5rem; vertical-align: middle; margin-left: .3rem; }

/* ---------- posting pages: limit warning ---------- */
.bill-banner { display: flex; align-items: center; gap: .8rem; justify-content: space-between; flex-wrap: wrap; background: #fef3c7; color: #92400e; border-radius: 12px; padding: .8rem 1.1rem; margin-top: 1rem; font-weight: 600; }
html[data-theme="dark"] .bill-banner { background: #3b2f12; color: #fcd34d; }

/* ---------- /payment ---------- */
.bill-result { text-align: center; display: grid; gap: .6rem; justify-items: center; }
.bill-result h1 { font-size: 1.5rem; }
.bill-big { font-size: 3rem; line-height: 1; }
.bill-result-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; margin-top: .6rem; }
.bill-spinner { width: 42px; height: 42px; border-radius: 50%; border: 4px solid var(--line); border-top-color: var(--brand); animation: bill-spin .8s linear infinite; }
@keyframes bill-spin { to { transform: rotate(360deg); } }

/* ---------- profile: my plan ---------- */
.bill-mine h3 { margin-bottom: .8rem; }
.bill-mine h4 { margin: 1.2rem 0 .5rem; font-size: 1rem; }
.bill-mine-head { display: flex; align-items: center; gap: .7rem; flex-wrap: wrap; margin-bottom: .7rem; }
.bill-mine-head .btn { margin-left: auto; }
.bill-plan-name { font-weight: 800; font-size: 1.1rem; padding: .15rem .8rem; border-radius: 99px; background: var(--bg-alt); border: 1px solid var(--line); }
.bill-plan-name.standard { background: var(--brand-soft); color: var(--brand); border-color: transparent; }
.bill-plan-name.pro { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; border-color: transparent; }
.bill-meter { height: 10px; border-radius: 99px; background: var(--bg-alt); border: 1px solid var(--line); overflow: hidden; margin-bottom: .35rem; }
.bill-meter span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.bill-pays { display: grid; gap: .5rem; }
.bill-pay { display: flex; gap: .8rem; align-items: center; padding: .6rem .8rem; border: 1px solid var(--line); border-radius: 10px; font-size: .92rem; }
.bill-pay .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.bill-pay-amt { text-align: right; font-weight: 700; white-space: nowrap; }
.bill-st { font-size: .72rem; font-weight: 800; text-transform: uppercase; color: var(--ink-soft); }
.bill-st.paid { color: var(--success); }
.bill-st.pending { color: #b45309; }
.bill-st.failed, .bill-st.chargedback { color: var(--danger); }

/* ---------- Google AdSense ---------- */
.ad-label { display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); margin-bottom: .3rem; }
.ad-rail { display: none; }
body.ad-rail-on .site-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 1.2rem; max-width: 1640px; margin: 0 auto; padding-right: 1rem; }
body.ad-rail-on .ad-rail { display: block; padding-top: 1.5rem; }
body.ad-rail-on .ad-rail-inner { position: sticky; top: 84px; min-height: 250px; }
.ad-feed { grid-column: 1 / -1; padding: .6rem 0; min-height: 0; }
/* An ad Google had nothing for takes no space */
.ad-feed:has(ins[data-ad-status="unfilled"]), .ad-rail-inner:has(ins[data-ad-status="unfilled"]) { display: none; }

@media (max-width: 860px) {
    .bill-plans { grid-template-columns: 1fr; }
    .bill-boost { grid-template-columns: 1fr; padding: 1.2rem; }
    .bill-options { grid-template-columns: 1fr; }
    .bill-options:not(.plans) .bill-option { justify-content: flex-start; text-align: left; }
}
@media (max-width: 560px) {
    .bill-modal { align-items: end; padding: 0; }
    .bill-box { border-radius: 18px 18px 0 0; width: 100%; }
    .bill-option.plan { flex-wrap: wrap; }
    .bill-option.plan .btn { width: 100%; justify-content: center; }
}

/* "I agree to the Terms & Conditions and the Refund Policy" before paying */
.bill-terms { display: flex; justify-content: center; margin: 0 auto 1.2rem; max-width: 640px; }
.bill-box .terms-field { margin: .9rem 0 .4rem; }

/* ---------- checkout: PayHere or bank transfer (migration 017) ---------- */
.bill-checkout .bill-box { width: min(620px, 100%); }
.bill-summary { display: flex; justify-content: space-between; gap: .8rem; align-items: baseline; background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px; padding: .7rem .9rem; margin: .6rem 0 .9rem; }
.bill-summary strong { white-space: nowrap; color: var(--brand); font-size: 1.1rem; }
.bill-methods { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; margin-bottom: .9rem; }
.bill-method { display: flex; gap: .6rem; align-items: flex-start; border: 2px solid var(--line); border-radius: 12px; padding: .75rem .8rem; cursor: pointer; background: var(--surface); }
.bill-method input { margin-top: .25rem; accent-color: var(--brand); }
.bill-method span { display: grid; gap: .2rem; }
.bill-method small { color: var(--ink-soft); font-size: .82rem; line-height: 1.35; }
.bill-method:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.bill-bank { border: 2px dashed var(--brand); border-radius: 12px; padding: .7rem .9rem; margin: .5rem 0 1rem; display: grid; gap: .35rem; }
.bill-bank-row { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr) auto; gap: .6rem; align-items: center; }
.bill-bank-row span { color: var(--ink-soft); font-size: .88rem; }
.bill-bank-row strong { overflow-wrap: anywhere; }
.bill-copy { border: 1px solid var(--line); background: var(--surface); color: var(--brand); border-radius: 99px; padding: .15rem .65rem; font-size: .78rem; font-weight: 700; cursor: pointer; }
.bill-copy:hover { border-color: var(--brand); }
.bill-bank-note { font-size: .86rem; color: var(--ink-soft); border-top: 1px solid var(--line); padding-top: .45rem; margin-top: .2rem; white-space: pre-line; }
.bill-checkout .field { margin-bottom: .75rem; }
.bill-checkout .field small { display: block; margin-top: .25rem; font-size: .8rem; }
.bill-checkout input[type=file].input { padding: .45rem; }
.bill-admin-note { background: var(--bg-alt); border-radius: 10px; padding: .6rem .9rem; max-width: 560px; }
.bill-st.rejected { color: var(--danger); }
@media (max-width: 560px) {
    .bill-methods { grid-template-columns: 1fr; }
    .bill-bank-row { grid-template-columns: minmax(0, 1fr) auto; }
    .bill-bank-row span { grid-column: 1 / -1; margin-bottom: -.3rem; }
}
