/* ==========================================================================
   Jackpot Hunting – shared styles for /jackpot-hunting, /jackpot-hunting/{key}
   and /admin/jackpot-hunting. Mobile first; everything is prefixed "jh-".
   Loaded only by those pages via <HeadContent>.
   ========================================================================== */

.jh-page {
    --jh-navy: #052767;
    --jh-purple: #6f42c1;
    --jh-text: #0f172a;
    --jh-muted: #64748b;
    --jh-border: #e2e8f0;
    --jh-bg-card: #ffffff;
    --jh-green: #16a34a;
    --jh-orange: #f59e0b;
    --jh-red: #dc2626;
    --jh-grey: #94a3b8;
    --jh-radius: 16px;

    max-width: 640px;
    margin: 0 auto;
    padding: 0 0 2.5rem;
    color: var(--jh-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ---------- Hero ---------- */
.jh-hero {
    background: linear-gradient(135deg, var(--jh-navy) 0%, #3a0647 55%, var(--jh-purple) 100%);
    color: #fff;
    text-align: center;
    padding: 1.4rem 1rem 1.3rem;
    border-radius: 0 0 var(--jh-radius) var(--jh-radius);
    margin-bottom: 1rem;
}

.jh-hero h1 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0.3rem 0 0.2rem;
    letter-spacing: -0.01em;
}

.jh-hero p {
    margin: 0;
    font-size: 0.92rem;
    opacity: 0.85;
}

.jh-hero-icon {
    width: 2.6rem;
    height: 2.6rem;
    margin: 0 auto;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.15);
    font-size: 1.3rem;
}

/* ---------- Generic building blocks ---------- */
.jh-card {
    background: var(--jh-bg-card);
    border: 1px solid var(--jh-border);
    border-radius: var(--jh-radius);
    padding: 1rem;
    margin: 0 0.75rem 0.9rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.jh-label {
    display: block;
    font-weight: 700;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.jh-muted { color: var(--jh-muted); }

.jh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 48px;
    padding: 0.7rem 1.4rem;
    border: 0;
    border-radius: 12px;
    background: var(--jh-navy);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.08s ease, opacity 0.15s ease;
}

.jh-btn:active { transform: scale(0.98); }
.jh-btn:disabled { opacity: 0.55; cursor: default; }
.jh-btn.block { width: 100%; }
.jh-btn.ghost { background: transparent; color: var(--jh-navy); border: 1px solid var(--jh-border); }
.jh-btn.danger { background: var(--jh-red); }
.jh-btn.small { min-height: 38px; padding: 0.4rem 0.9rem; font-size: 0.88rem; }

.jh-hint {
    font-size: 0.82rem;
    color: var(--jh-muted);
    margin-top: 0.45rem;
}

.jh-hint.error { color: var(--jh-red); font-weight: 600; }

.jh-loading {
    display: flex;
    justify-content: center;
    padding: 3rem 0;
}

.jh-loading.small { padding: 1.5rem 0; }

.jh-empty {
    text-align: center;
    color: var(--jh-muted);
}

.jh-empty p { margin: 0.25rem 0 0.75rem; }
.jh-empty-icon { font-size: 1.8rem; color: var(--jh-purple); }

/* Jackpot name pill, colour comes from --jp */
.jh-pill {
    --jp: #64748b;
    display: inline-block;
    padding: 0.08rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #fff;
    background: var(--jp);
    vertical-align: middle;
    margin-left: 0.25rem;
}

.jh-dot {
    --jp: #64748b;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--jp);
    display: inline-block;
}

/* ---------- Search ---------- */
.jh-search {
    position: relative;
    display: flex;
    align-items: center;
}

.jh-search > .bi-search {
    position: absolute;
    left: 0.9rem;
    color: var(--jh-muted);
    pointer-events: none;
}

.jh-search input {
    width: 100%;
    min-height: 52px;
    padding: 0.75rem 2.6rem 0.75rem 2.5rem;
    font-size: 1.05rem; /* ≥16px stops iOS from zooming in */
    border: 2px solid var(--jh-border);
    border-radius: 12px;
    outline: none;
    background: #f8fafc;
    -webkit-appearance: none;
    appearance: none;
}

.jh-search input:focus {
    border-color: var(--jh-purple);
    background: #fff;
}

.jh-search input::-webkit-search-cancel-button { display: none; }

.jh-search-clear {
    position: absolute;
    right: 0.4rem;
    border: 0;
    background: transparent;
    color: var(--jh-grey);
    font-size: 1.15rem;
    padding: 0.5rem;
}

.jh-search-empty {
    padding: 0.9rem 0.25rem 0.1rem;
    font-size: 0.88rem;
    color: var(--jh-muted);
    text-align: center;
}

.jh-search-empty p { margin: 0 0 0.6rem; }

.jh-results {
    list-style: none;
    margin: 0.6rem 0 0;
    padding: 0;
    max-height: 55vh;
    overflow-y: auto;
}

.jh-result {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    min-height: 52px;
    padding: 0.6rem 0.4rem;
    border-bottom: 1px solid var(--jh-border);
    color: var(--jh-text);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.jh-results li:last-child .jh-result { border-bottom: 0; }
.jh-result:active { background: #f1f5f9; }

.jh-result-name {
    flex: 1;
    font-weight: 600;
}

.jh-result-dots {
    display: inline-flex;
    gap: 0.25rem;
}

.jh-result .bi-chevron-right { color: var(--jh-grey); }

/* ---------- Tabs ---------- */
.jh-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.3rem;
    margin: 0 0.75rem 0.75rem;
    padding: 0.3rem;
    border-radius: 14px;
    background: #e2e8f0;
    position: sticky;
    top: 0.5rem;
    z-index: 5;
}

.jh-tabs button {
    min-height: 42px;
    padding: 0 0.2rem;
    white-space: nowrap;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #334155;
    font-weight: 600;
    font-size: 0.9rem;
    -webkit-tap-highlight-color: transparent;
}

.jh-tabs button.active {
    background: #fff;
    color: var(--jh-navy);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

/* ---------- Feed rows ---------- */
.jh-feed { padding: 0 0.75rem; }

.jh-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 64px;
    padding: 0.7rem 0.9rem 0.7rem 1rem;
    margin-bottom: 0.55rem;
    background: #fff;
    border: 1px solid var(--jh-border);
    border-left: 6px solid var(--jh-grey);
    border-radius: 14px;
    color: var(--jh-text);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.jh-row:active { background: #f8fafc; }

.jh-row.grade-green { border-left-color: var(--jh-green); }
.jh-row.grade-orange { border-left-color: var(--jh-orange); }
.jh-row.grade-red { border-left-color: var(--jh-red); }

.jh-row-main { flex: 1; min-width: 0; }

.jh-row-title {
    font-weight: 700;
    font-size: 0.98rem;
    line-height: 1.25;
}

.jh-row-sub {
    font-size: 0.78rem;
    color: var(--jh-muted);
    margin-top: 0.15rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jh-row-sub .jh-pill { margin: 0.1rem 0.25rem 0 0; }

.jh-row-value {
    text-align: right;
    font-weight: 800;
    font-size: 1.1rem;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
}

.jh-row-value small {
    display: block;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--jh-muted);
}

.jh-row.grade-green .jh-row-value small { color: var(--jh-green); }
.jh-row.grade-orange .jh-row-value small { color: #b45309; }
.jh-row.grade-red .jh-row-value small { color: var(--jh-red); }

.jh-top { list-style: none; padding: 0; margin: 0; }

.jh-rank {
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #eef2ff;
    color: var(--jh-navy);
    font-weight: 800;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.jh-top li:nth-child(1) .jh-rank { background: #fde68a; }
.jh-top li:nth-child(2) .jh-rank { background: #e5e7eb; }
.jh-top li:nth-child(3) .jh-rank { background: #fed7aa; }

/* ---------- Legend ---------- */
.jh-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.9rem;
    font-size: 0.75rem;
    color: var(--jh-muted);
    padding: 0 0.25rem 0.6rem;
}

.jh-legend span { display: inline-flex; align-items: center; gap: 0.3rem; }
.jh-legend .lg { width: 0.65rem; height: 0.65rem; border-radius: 50%; display: inline-block; }
.jh-legend .lg.green { background: var(--jh-green); }
.jh-legend .lg.orange { background: var(--jh-orange); }
.jh-legend .lg.red { background: var(--jh-red); }
.jh-legend-note { margin-left: auto; font-style: italic; }

/* ---------- Locked (not subscribed) ---------- */
.jh-locked {
    position: relative;
    padding: 0 0.75rem;
    min-height: 340px;
}

.jh-locked-preview {
    filter: blur(3px);
    opacity: 0.7;
    pointer-events: none;
    user-select: none;
}

.jh-locked .auth-overlay-content-box {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 1.5rem);
    max-width: 420px;
    padding: 1.5rem 1.25rem !important;
}

/* ==========================================================================
   Machine page
   ========================================================================== */
.jh-machine-head {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.9rem 0.75rem 0.6rem;
}

.jh-back {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--jh-border);
    color: var(--jh-navy);
    font-size: 1.2rem;
    text-decoration: none;
}

.jh-machine-title { flex: 1; min-width: 0; }

.jh-machine-title h1 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
}

.jh-machine-title div {
    font-size: 0.82rem;
    color: var(--jh-muted);
}

.jh-change {
    border: 0;
    background: transparent;
    color: var(--jh-purple);
    font-weight: 700;
    font-size: 0.88rem;
    padding: 0.5rem 0.25rem;
    text-decoration: none;
}

/* ---- Jackpot panel, colour comes from --jp ---- */
.jh-jackpot {
    --jp: #1f9d55;
    margin: 0 0.75rem 1rem;
    border-radius: 18px;
    overflow: hidden;
    background: #fff;
    border: 2px solid var(--jp);
    box-shadow: 0 6px 18px -10px var(--jp);
}

.jh-jackpot-head {
    background: var(--jp);
    color: #fff;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.jh-jackpot-head h2 {
    font-size: 1.35rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

.jh-jackpot-tag {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: rgba(255, 255, 255, 0.22);
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
}

.jh-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid var(--jh-border);
}

.jh-stat {
    padding: 0.75rem 0.4rem;
    text-align: center;
}

.jh-stat + .jh-stat { border-left: 1px solid var(--jh-border); }

.jh-stat-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--jh-muted);
}

.jh-stat-value {
    font-size: 1.05rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    margin-top: 0.15rem;
    line-height: 1.2;
}

.jh-stat-value.small { font-size: 0.85rem; }

.jh-stat-sub {
    font-size: 0.68rem;
    color: var(--jh-muted);
    margin-top: 0.1rem;
}

.jh-jackpot-body { padding: 1rem; }

.jh-amount {
    display: flex;
    align-items: center;
    border: 2px solid var(--jh-border);
    border-radius: 14px;
    background: #f8fafc;
    overflow: hidden;
}

.jh-amount:focus-within {
    border-color: var(--jp);
    background: #fff;
}

.jh-amount.invalid { border-color: var(--jh-red); }

.jh-amount span {
    padding: 0 0.2rem 0 0.9rem;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--jh-muted);
}

.jh-amount input {
    flex: 1;
    min-width: 0;
    min-height: 60px;
    border: 0;
    outline: none;
    background: transparent;
    font-size: 1.6rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    padding: 0.4rem 0.75rem 0.4rem 0.2rem;
}

.jh-range {
    font-size: 0.78rem;
    color: var(--jh-muted);
    margin: 0.45rem 0 0.8rem;
}

.jh-validate {
    width: 100%;
    background: var(--jp);
    min-height: 54px;
    font-size: 1.08rem;
}

/* ---- Result ---- */
.jh-result-card {
    margin-top: 1rem;
    border-radius: 14px;
    padding: 1rem;
    text-align: center;
    background: #f1f5f9;
    border: 1px solid var(--jh-border);
    animation: jh-pop 0.25s ease-out;
}

.jh-result-card.grade-green { background: #f0fdf4; border-color: #86efac; }
.jh-result-card.grade-orange { background: #fffbeb; border-color: #fcd34d; }
.jh-result-card.grade-red { background: #fef2f2; border-color: #fca5a5; }

.jh-result-label {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--jh-muted);
}

.jh-boost {
    font-size: 2.4rem;
    font-weight: 900;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    margin: 0.2rem 0;
}

.grade-green .jh-boost { color: var(--jh-green); }
.grade-orange .jh-boost { color: #d97706; }
.grade-red .jh-boost { color: var(--jh-red); }

.jh-verdict {
    display: inline-block;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.2rem 0.7rem;
    border-radius: 999px;
    color: #fff;
    background: var(--jh-grey);
    margin-bottom: 0.4rem;
}

.grade-green .jh-verdict { background: var(--jh-green); }
.grade-orange .jh-verdict { background: var(--jh-orange); }
.grade-red .jh-verdict { background: var(--jh-red); }

.jh-rtp-line { font-size: 0.95rem; font-weight: 600; }

.jh-note {
    font-size: 0.74rem;
    color: var(--jh-muted);
    margin-top: 0.6rem;
    line-height: 1.4;
}

.jh-saved {
    font-size: 0.8rem;
    color: var(--jh-green);
    font-weight: 700;
    margin-top: 0.5rem;
}

@keyframes jh-pop {
    from { transform: scale(0.97); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ---- Location switch ---- */
.jh-switch {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
}

.jh-switch input {
    appearance: none;
    -webkit-appearance: none;
    flex-shrink: 0;
    width: 46px;
    height: 28px;
    border-radius: 999px;
    background: #cbd5e1;
    position: relative;
    transition: background 0.15s ease;
    margin-top: 0.1rem;
}

.jh-switch input::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease;
}

.jh-switch input:checked { background: var(--jh-green); }
.jh-switch input:checked::after { transform: translateX(18px); }

.jh-switch-text strong { display: block; font-size: 0.92rem; }
.jh-switch-text span { font-size: 0.78rem; color: var(--jh-muted); }

.jh-section-title {
    font-size: 0.85rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--jh-muted);
    margin: 1.2rem 1rem 0.6rem;
}

.jh-machine-notes {
    font-size: 0.85rem;
    color: #334155;
}

/* ==========================================================================
   Admin
   ========================================================================== */
.jh-admin .jh-card h3 { font-size: 1.05rem; font-weight: 800; margin: 0 0 0.75rem; }

.jh-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem 0.75rem;
}

.jh-grid .full { grid-column: 1 / -1; }

.jh-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--jh-muted);
    margin-bottom: 0.2rem;
}

.jh-field input,
.jh-field select,
.jh-field textarea {
    width: 100%;
    min-height: 44px;
    padding: 0.5rem 0.65rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1rem;
    background: #fff;
}

.jh-field input[type=color] { padding: 0.2rem; }
.jh-field input[type=checkbox] { width: auto; min-height: 0; transform: scale(1.3); margin: 0.6rem 0 0 0.2rem; }

.jh-admin-jackpot {
    --jp: #64748b;
    border: 2px solid var(--jp);
    border-radius: 14px;
    padding: 0.8rem;
    margin-top: 0.8rem;
}

.jh-admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.9rem;
}

.jh-admin-list .jh-row { cursor: pointer; }

.jh-alert {
    margin: 0 0.75rem 0.9rem;
    padding: 0.7rem 0.9rem;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
}

.jh-alert.ok { background: #f0fdf4; color: #166534; border: 1px solid #86efac; }
.jh-alert.err { background: #fef2f2; color: #991b1b; border: 1px solid #fca5a5; }

@media (min-width: 768px) {
    .jh-hero { border-radius: var(--jh-radius); margin-top: 1rem; }
    .jh-page { padding-top: 0.5rem; }
}

/* ==========================================================================
   "Request to add a machine"
   ========================================================================== */
.jh-request-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    min-height: 48px;
    margin-top: 0.4rem;
    padding: 0.6rem 0.5rem;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    background: #f8fafc;
    color: var(--jh-muted);
    font-size: 0.88rem;
    text-align: left;
    -webkit-tap-highlight-color: transparent;
}

.jh-request-link .bi { color: var(--jh-purple); font-size: 1.1rem; }
.jh-request-link strong { color: var(--jh-purple); }
.jh-request-link:active { background: #eef2ff; }

.jh-sheet-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1060;
    animation: jh-fade 0.15s ease-out;
}

.jh-sheet {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1061;
    max-height: 92vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.2);
    padding-bottom: env(safe-area-inset-bottom);
    animation: jh-slide-up 0.2s ease-out;
    color: #0f172a;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --jh-navy: #052767;
    --jh-purple: #6f42c1;
    --jh-muted: #64748b;
    --jh-border: #e2e8f0;
    --jh-red: #dc2626;
    --jh-green: #16a34a;
}

.jh-sheet-grip {
    width: 40px;
    height: 4px;
    border-radius: 999px;
    background: #cbd5e1;
    margin: 0.5rem auto 0;
}

.jh-sheet-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 1rem 0.3rem;
}

.jh-sheet-head h2 { font-size: 1.15rem; font-weight: 800; margin: 0; }

.jh-sheet-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
}

.jh-sheet-body { padding: 0.5rem 1rem 1.25rem; }
.jh-sheet-body > .jh-field { margin-bottom: 0.9rem; }

.jh-sheet .jh-field label {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--jh-muted);
    margin-bottom: 0.2rem;
}

.jh-sheet .jh-field input {
    width: 100%;
    min-height: 46px;
    padding: 0.5rem 0.7rem;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    font-size: 1rem; /* no iOS zoom */
    background: #fff;
}

.jh-sheet .jh-field input:focus { outline: none; border-color: var(--jh-purple); }

.jh-request-jp-head {
    font-weight: 700;
    font-size: 0.92rem;
    margin: 0.2rem 0 0.5rem;
}

.jh-request-jp-head small { color: var(--jh-muted); font-weight: 500; }

.jh-request-jp {
    border: 1px solid var(--jh-border);
    border-radius: 14px;
    padding: 0.7rem;
    margin-bottom: 0.6rem;
    background: #f8fafc;
}

.jh-request-jp-top {
    display: flex;
    align-items: flex-end;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.jh-request-jp-top .grow { flex: 1; }

.jh-request-remove {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fff;
    color: var(--jh-red);
}

.jh-grid.three { grid-template-columns: repeat(3, 1fr); gap: 0.5rem; }

.jh-request-submit { margin-top: 0.9rem; min-height: 52px; }

.jh-request-done { text-align: center; padding-top: 1rem; }
.jh-request-done > .bi { font-size: 2.6rem; color: var(--jh-green); }
.jh-request-done h3 { font-size: 1.15rem; font-weight: 800; margin: 0.4rem 0; }
.jh-request-done p { color: #334155; font-size: 0.92rem; margin-bottom: 1rem; }

@keyframes jh-slide-up {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

@keyframes jh-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (min-width: 768px) {
    .jh-sheet {
        left: 50%;
        right: auto;
        bottom: auto;
        top: 50%;
        width: 480px;
        transform: translate(-50%, -50%);
        border-radius: 20px;
        animation: jh-fade 0.15s ease-out;
    }

    .jh-sheet-grip { display: none; }
}

.jh-admin-request {
    border: 1px solid var(--jh-border);
    border-radius: 12px;
    padding: 0.7rem 0.8rem;
    margin-bottom: 0.6rem;
}

.jh-admin-request-jps {
    margin: 0.4rem 0 0;
    padding-left: 1.1rem;
    font-size: 0.85rem;
}

/* ---- "Are you at <casino>?" prompt ---- */
.jh-casino-ask {
    margin-top: 0.9rem;
    padding: 0.9rem;
    border-radius: 14px;
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    animation: jh-pop 0.2s ease-out;
}

.jh-casino-ask-q {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 1rem;
}

.jh-casino-ask-q .bi { color: var(--jh-purple); margin-top: 0.15rem; }

.jh-casino-ask-sub {
    font-size: 0.78rem;
    color: var(--jh-muted);
    margin: 0.2rem 0 0.7rem 1.5rem;
}

.jh-casino-ask-actions {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 0.5rem;
}

.jh-noloc { font-style: italic; color: #94a3b8; }

.jh-day {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--jh-muted);
    margin: 0.9rem 0.25rem 0.4rem;
}

@media (max-width: 380px) {
    .jh-tabs button { font-size: 0.8rem; }
    .jh-tabs button .bi { display: none; }
}

/* ---- Machine banner (picture behind name / provider) ---- */
.jh-banner {
    position: relative;
    height: 84px;
    margin: 0.75rem 0.75rem 1rem;
    border-radius: 18px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #052767 0%, #3a0647 55%, #6f42c1 100%);
    box-shadow: 0 8px 22px -14px rgba(15, 23, 42, 0.6);
}

.jh-banner-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;          /* same frame for every picture, cropped from the center */
    object-position: center;
    display: block;
}

.jh-banner-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(2, 6, 23, 0.85) 0%, rgba(2, 6, 23, 0.6) 55%, rgba(2, 6, 23, 0.25) 100%);
    pointer-events: none;
}

.jh-banner:not(.has-image) .jh-banner-shade { background: none; }

.jh-banner-text {
    position: absolute;
    left: 3.6rem;               /* room for the back button */
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.jh-banner-text h1 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.01em;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.jh-banner-sub {
    margin-top: 0.15rem;
    font-size: 0.82rem;
    font-weight: 600;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.jh-banner-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.55);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.jh-banner-btn:hover { color: #fff; background: rgba(15, 23, 42, 0.7); }
.jh-banner-btn.back { left: 0.6rem; width: 38px; font-size: 1.1rem; }

.jh-banner-zoom {
    position: absolute;
    right: 0.6rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.25);
    background: rgba(15, 23, 42, 0.55);
    color: #fff;
    font-size: 0.9rem;
    display: grid;
    place-items: center;
}

.jh-banner.has-image .jh-banner-text { right: 3.2rem; }

@media (min-width: 768px) {
    .jh-banner { height: 96px; }
    .jh-banner-text h1 { font-size: 1.45rem; }
}

/* Full-screen view when tapping the zoom button */
.jh-image-viewer {
    position: fixed;
    inset: 0;
    z-index: 1070;
    background: rgba(15, 23, 42, 0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    cursor: zoom-out;
    animation: jh-fade 0.15s ease-out;
}

.jh-image-viewer img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.jh-image-viewer-hint {
    margin-top: 0.8rem;
    color: #cbd5e1;
    font-size: 0.8rem;
}

/* Admin: preview with the same crop as the banner (wide, cover) */
.jh-admin-image {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.jh-admin-image-banner {
    width: 260px;
    max-width: 100%;
    aspect-ratio: 640 / 84;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid var(--jh-border, #e2e8f0);
}

.jh-admin-image-empty {
    width: 260px;
    max-width: 100%;
    aspect-ratio: 640 / 84;
    border-radius: 12px;
    border: 1px dashed #cbd5e1;
    display: grid;
    place-items: center;
    color: #94a3b8;
    font-size: 1.6rem;
}

/* ---- Delete report (admin: all, members: own) ---- */
.jh-row-wrap { position: relative; }
.jh-row-wrap.deletable > .jh-row { padding-right: 3.1rem; }

.jh-row-del {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    transform: translateY(-50%);
    min-width: 36px;
    height: 36px;
    padding: 0 0.5rem;
    border: 1px solid #fecaca;
    border-radius: 999px;
    background: #fff;
    color: #dc2626;
    font-size: 0.85rem;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    margin-top: -0.275rem; /* rows have a bottom margin; keep the button centred on the card */
}

.jh-row-del.confirm {
    background: #dc2626;
    border-color: #dc2626;
    color: #fff;
}

.jh-row-del:disabled { opacity: 0.5; }

/* ---- Recent reports: filter by jackpot ---- */
.jh-recent-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.4rem 0.75rem;
    margin: 1.2rem 1rem 0.6rem;
}

.jh-recent-head .jh-section-title { margin: 0; }

.jh-recent-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

/* Unselected: outlined in the jackpot colour. Selected: filled (like the normal pill). */
.jh-filter-pill {
    margin: 0;
    min-height: 30px;
    padding: 0.15rem 0.75rem;
    border: 1.5px solid var(--jp, #64748b);
    border-radius: 999px;
    background: #fff;
    color: var(--jp, #64748b);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.jh-filter-pill.active {
    background: var(--jp, #64748b);
    color: #fff;
}

.jh-filter-pill.all { --jp: #475569; }
