/* Pasabuy — reusable components: filters, avatars/badges/chips, hero, tabs, stepper, "what happens next",
   offers, photos, contact rows, misc. Ported from the prototype. */

/* the browse pages' filter panel (find/travelers/pabili): below lg it's a real Bootstrap offcanvas-bottom
   sheet (its own header with a close button + a sticky "Apply Filters" footer), triggered by a "Filters"
   button — needs Bootstrap's own `position: fixed` left completely alone here, which is why this no longer
   sets `position: static` on narrow screens the way the old `.filter-card` rule it replaces used to (that
   was fighting the offcanvas for control of `position` and pinning it to the page instead of the viewport).
   At lg+ this same markup — same fields, nothing duplicated — is forced back into the normal sticky sidebar
   card it always was: no fixed position, no backdrop, no close/apply chrome. */
.filter-sheet { border-radius: 20px 20px 0 0; }
/* the richer mobile-only filter sheet (Find Padala): section headers, route pickers, tile/pill quick picks */
.fsheet { --bs-offcanvas-height: 92vh; --bs-offcanvas-bg: #fff; border-radius: 22px 22px 0 0; }
.fsheet .offcanvas-header { justify-content: space-between; }
.fsheet .grab { width: 44px; height: 5px; border-radius: 3px; background: #d5deee; margin: 10px auto 0; }
.fsec { padding: 1.1rem 0; border-bottom: 1px solid var(--pb-border); }
.fsec-title { display: flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; color: var(--pb-navy); margin-bottom: .8rem; }
.fsec-title i { font-size: 1.15rem; }
.fpick { position: relative; display: flex; align-items: center; gap: .85rem; border: 1px solid #d5deee; border-radius: 14px; background: #fff; padding: .6rem 1rem; margin: 0; cursor: pointer; }
.fpick > .bi { color: var(--pb-muted); font-size: 1.15rem; }
.fpick small { display: block; color: var(--pb-muted); font-size: .75rem; line-height: 1.2; }
.fpick-val { font-weight: 500; color: var(--pb-text); }
.fpick select { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.ftiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.ftile, .fpill { border: 1px solid transparent; background: var(--pb-bg); color: var(--pb-text); transition: background .12s, border-color .12s; }
.ftile { border-radius: 14px; padding: .75rem .25rem; font-size: .76rem; line-height: 1.2; display: flex; flex-direction: column; align-items: center; gap: .4rem; }
.ftile i { font-size: 1.3rem; color: var(--pb-muted); }
.fpills { display: flex; flex-wrap: wrap; gap: .5rem; }
.fpill { border-radius: 12px; padding: .5rem .85rem; font-size: .88rem; }
.ftile.active, .fpill.active { background: var(--pb-primary-soft); border-color: var(--pb-primary); color: var(--pb-primary); }
.ftile.active i { color: var(--pb-primary); }
.fdate { display: flex; align-items: center; gap: .55rem; border: 1px solid #d5deee; border-radius: 14px; background: #fff; padding: .6rem .85rem; }
.fdate i { color: var(--pb-muted); }
.fdate input { border: 0; outline: 0; background: transparent; width: 100%; min-width: 0; font-size: .92rem; color: var(--pb-text); }
.fswitch { display: flex; align-items: center; gap: .8rem; padding-left: 0; }
.fswitch .form-check-input { width: 3rem; height: 1.65rem; margin: 0; float: none; }
@media (min-width: 992px) {
  .filter-sheet.offcanvas.offcanvas-bottom { position: sticky; top: 84px; right: auto; bottom: auto; left: auto; width: auto; height: auto; max-height: none; visibility: visible; transform: none; box-shadow: none; border-radius: var(--pb-radius); }
  .filter-sheet .offcanvas-header .btn-close, .filter-sheet > .p-3.border-top { display: none; }
}

/* avatars, badges, chips */
.pb-avatar { width: var(--sz); height: var(--sz); border-radius: 50%; color: #fff; display: inline-grid; place-items: center; font-weight: 700; font-size: calc(var(--sz) * .38); flex: none; box-shadow: 0 0 0 3px #fff, 0 0 0 4px var(--pb-border); }
.pb-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .6rem; border-radius: 999px; font-size: .74rem; font-weight: 700; white-space: nowrap; }
.pb-badge.upper { text-transform: uppercase; letter-spacing: .03em; font-size: .68rem; }
.tone-primary { background: var(--pb-primary-soft); color: var(--pb-primary-dark); }
.tone-success { background: var(--pb-success-soft); color: #15803d; }
.tone-warning { background: var(--pb-warning-soft); color: var(--pb-warning); }
.tone-danger { background: var(--pb-danger-soft); color: #b91c1c; }
.tone-info { background: var(--pb-info-soft); color: var(--pb-info); }
.tone-secondary { background: #eef1f6; color: #475569; }
.vchip { display: inline-flex; align-items: center; gap: .25rem; font-size: .74rem; font-weight: 600; padding: .15rem .5rem; border-radius: 8px; }
.vchip.ok { background: var(--pb-success-soft); color: #15803d; }
.vchip.pending { background: var(--pb-warning-soft); color: var(--pb-warning); }
.vchip.no { background: #eef1f6; color: #64748b; }
.vchip.brand { background: linear-gradient(90deg, #dbeafe, #cffafe); color: #0b4a8f; }
.rating { font-weight: 700; color: var(--pb-navy); }
.rating i { color: #f59e0b; }
.tag { display: inline-block; background: var(--pb-bg); border: 1px solid var(--pb-border); border-radius: 8px; padding: .12rem .5rem; font-size: .75rem; margin: 0 .25rem .25rem 0; color: var(--pb-text); }

/* hero */
.hero { background: radial-gradient(1000px 500px at 85% -10%, #3b82f6 0%, transparent 60%), linear-gradient(135deg, #0b1f44 0%, #123a7a 100%); color: #fff; padding: 4.5rem 0 5rem; position: relative; overflow: hidden; }
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.4rem); font-weight: 800; line-height: 1.08; }
.hero p.lead { color: #c9d9f7; max-width: 34rem; }
.hero .btn-light { color: var(--pb-navy); }
.hero-card { background: rgba(255, 255, 255, .97); border-radius: 22px; color: var(--pb-text); box-shadow: 0 30px 60px rgba(0, 0, 0, .28); padding: 1.25rem; max-width: 380px; margin-left: auto; transform: rotate(1.5deg); }
.hero-plane { position: absolute; right: -40px; top: 30px; font-size: 14rem; color: rgba(255, 255, 255, .05); transform: rotate(-12deg); }
.stat-strip { margin-top: -2.4rem; position: relative; z-index: 2; }
.stat-strip .pb-card { padding: 1.1rem 1.25rem; }
.stat-num { font-size: 1.7rem; font-weight: 800; color: var(--pb-navy); line-height: 1; }
.route-pill { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .9rem 1rem; }
.route-pill .ico { width: 38px; height: 38px; border-radius: 12px; background: var(--pb-primary-soft); color: var(--pb-primary); display: grid; place-items: center; }
.how-step { text-align: center; padding: 1.1rem .75rem; height: 100%; }
.how-step .n { width: 46px; height: 46px; border-radius: 14px; margin: 0 auto .6rem; background: var(--pb-primary-soft); color: var(--pb-primary); display: grid; place-items: center; font-size: 1.3rem; }
.how-step h6 { margin-bottom: .2rem; }
.quote { font-size: 1.02rem; color: var(--pb-navy); font-weight: 500; }

/* filters: positioning now lives on .filter-sheet above (superseded the old .filter-card rules, which were
   fighting the offcanvas-bottom sheet for control of `position` on narrow screens) */
.chip-check { display: inline-flex; margin: 0 .3rem .3rem 0; }
.chip-check input { display: none; }
.chip-check span { border: 1px solid #d5deee; border-radius: 999px; padding: .2rem .7rem; font-size: .8rem; cursor: pointer; user-select: none; background: #fff; }
.chip-check input:checked + span { background: var(--pb-primary); border-color: var(--pb-primary); color: #fff; }

/* tabs */
.pb-tabs { display: flex; gap: .35rem; overflow-x: auto; padding-bottom: .25rem; scrollbar-width: none; margin-bottom: 1.25rem; border-bottom: 1px solid var(--pb-border); }
.pb-tabs button, .pb-tabs a { border: 0; background: transparent; padding: .6rem .95rem; font-weight: 600; color: var(--pb-muted); white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.pb-tabs button.active, .pb-tabs a.active { color: var(--pb-primary); border-color: var(--pb-primary); }
.pb-tabs .n { background: #eef1f6; color: #475569; border-radius: 999px; font-size: .7rem; padding: .05rem .45rem; margin-left: .3rem; }
.pb-tabs button.active .n { background: var(--pb-primary-soft); color: var(--pb-primary); }

/* transaction: stepper */
.pb-steps { list-style: none; margin: 0; padding: 0; }
.pb-steps li { position: relative; display: flex; gap: .85rem; padding-bottom: 1.1rem; }
.pb-steps li:last-child { padding-bottom: 0; }
.pb-steps li::before { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--pb-border); }
.pb-steps li:last-child::before { display: none; }
.pb-steps li.done::before { background: var(--pb-success); }
.pb-steps .dot { width: 32px; height: 32px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--pb-border); color: #a3b0c7; font-size: .9rem; z-index: 1; }
.pb-steps li.done .dot { background: var(--pb-success); border-color: var(--pb-success); color: #fff; }
.pb-steps li.current .dot { background: var(--pb-primary); border-color: var(--pb-primary); color: #fff; box-shadow: 0 0 0 5px rgba(37, 99, 235, .18); animation: pulse 1.8s infinite; }
.pb-steps li.stop .dot { background: var(--pb-danger); border-color: var(--pb-danger); color: #fff; }
.pb-steps .lbl { padding-top: .25rem; font-weight: 600; color: var(--pb-navy); }
.pb-steps li.todo .lbl { color: #94a3b8; font-weight: 500; }
.pb-steps .lbl small { display: block; font-weight: 400; color: var(--pb-muted); font-size: .76rem; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 4px rgba(37, 99, 235, .2); } 50% { box-shadow: 0 0 0 8px rgba(37, 99, 235, .06); } }
.mini-progress { height: 6px; border-radius: 99px; background: #e8edf6; overflow: hidden; }
.mini-progress > div { height: 100%; background: linear-gradient(90deg, #2563eb, #38bdf8); border-radius: 99px; }
.mini-progress.done > div { background: var(--pb-success); }

/* "what happens next" */
.next-head { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--pb-muted); margin-bottom: .4rem; }
.next-card { display: flex; gap: 1rem; padding: 1.25rem 1.35rem; border-radius: var(--pb-radius); border: 1px solid; align-items: flex-start; }
.next-card .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 1.4rem; flex: none; background: #fff; }
.next-card .lab { font-size: .72rem; font-weight: 800; letter-spacing: .1em; }
.next-card h5 { margin: .1rem 0 .2rem; font-size: 1.15rem; }
.next-card.action { background: #eef4ff; border-color: #b9d0fb; } .next-card.action .ico, .next-card.action .lab { color: var(--pb-primary); }
.next-card.waiting { background: var(--pb-warning-soft); border-color: #f6d8ac; } .next-card.waiting .ico, .next-card.waiting .lab { color: var(--pb-warning); }
.next-card.info { background: var(--pb-info-soft); border-color: #b5e2ec; } .next-card.info .ico, .next-card.info .lab { color: var(--pb-info); }
.next-card.success { background: var(--pb-success-soft); border-color: #b9e5c8; } .next-card.success .ico, .next-card.success .lab { color: var(--pb-success); }
.next-card.danger { background: var(--pb-danger-soft); border-color: #f5bcbc; } .next-card.danger .ico, .next-card.danger .lab { color: var(--pb-danger); }

/* offer-detail.js: one card per traveler offer, left accent shows status at a glance */
.offer-item { border: 1px solid var(--pb-border); border-left: 4px solid var(--pb-border); border-radius: 14px; padding: 1.1rem 1.25rem; margin-bottom: .75rem; background: #fff; transition: border-color .15s, box-shadow .15s; }
.offer-item:last-child { margin-bottom: 0; }
.offer-item.needs-action { border-left-color: var(--pb-warning); box-shadow: 0 2px 10px rgba(194, 97, 12, .08); }
.offer-item.is-accepted { border-left-color: var(--pb-success); }
.offer-item.is-resolved { border-left-color: var(--pb-border); background: var(--pb-bg); }
.offer-item .fee { font-size: 1.3rem; }

/* photos */
.photo-tile { aspect-ratio: 4/3; border-radius: 12px; background: linear-gradient(135deg, #dbeafe, #f0f9ff); border: 1px solid var(--pb-border); display: grid; place-items: center; color: #7c93bd; font-size: 1.6rem; position: relative; overflow: hidden; }
.photo-tile span { position: absolute; bottom: 4px; left: 8px; font-size: .62rem; color: #64748b; max-width: 90%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-drop { border: 2px dashed #c3cde2; border-radius: 14px; padding: 1.25rem; text-align: center; background: #fafbfe; cursor: pointer; display: block; }
.upload-drop:hover { border-color: var(--pb-primary); background: var(--pb-primary-soft); }

/* contact & social: locked rows show a blurred mask (never the real value) until the viewer's tier allows it */
.contact-row .blur-val { filter: blur(4.5px); user-select: none; pointer-events: none; }
.contact-row.is-locked > .flex-grow-1 { color: var(--pb-muted, #64748b); }
.view-toggle .btn { padding: .35rem .6rem; }
.stat-tile { text-align: center; padding: 1rem .5rem; }
.stat-tile .num { font-size: 1.6rem; font-weight: 800; color: var(--pb-navy); line-height: 1.1; }
.stat-tile .lbl { font-size: .75rem; color: var(--pb-muted); font-weight: 600; }
.star-input { display: inline-flex; flex-direction: row-reverse; gap: .1rem; }
.star-input input { display: none; }
.star-input label { font-size: 1.6rem; color: #d3dbe9; cursor: pointer; line-height: 1; }
.star-input input:checked ~ label, .star-input label:hover, .star-input label:hover ~ label { color: #f59e0b; }
.verified-review { font-size: .72rem; font-weight: 700; color: #15803d; display: inline-flex; gap: .25rem; align-items: center; }

.copy-code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--pb-bg); border: 1px solid var(--pb-border); border-radius: 8px; padding: .1rem .5rem; font-weight: 700; color: var(--pb-navy); }

.route-pill { flex-wrap: wrap; }
.route-pill > span:first-child { min-width: 0; flex: 1 1 auto; }

.flow-row { row-gap: .25rem; }
.flow-arrow { color: var(--pb-primary); font-size: 1.3rem; display: flex; align-items: center; justify-content: center; }

/* register: role pick cards */
.role-pick { cursor: pointer; }
.role-pick .form-check-input { width: 1.25rem; height: 1.25rem; margin: 0; }
.role-pick:has(.form-check-input:checked) { border-color: var(--pb-primary); box-shadow: 0 0 0 3px var(--pb-primary-soft); }

/* whole-card links (data-href, see app.js) */
[data-href] { cursor: pointer; }
