/* ==========================================================================
   Barlin Games — Report an Issue   ·   .rp
   --------------------------------------------------------------------------
   Light, typographic layout for /report-issues. No imagery: no url() and no
   background-image rule exists below, only the shared inline icon set.

   Self-contained — layouts/public has no @stack('styles'), so the sheet is
   linked from the view. Token names mirror game-ui.css's `.gd` namespace, and
   the contact page's `.ct`, so the forms read as one system.
   ========================================================================== */

.rp {
    --rp-red:       #E51B23;
    --rp-red-dark:  #C2151C;
    --rp-red-soft:  rgba(229, 27, 35, .07);
    --rp-red-ring:  rgba(229, 27, 35, .18);

    --rp-ink:       #0F1115;
    --rp-body:      #3A4048;
    --rp-muted:     #6B7280;
    --rp-faint:     #9CA3AF;

    --rp-canvas:    #F6F7F9;
    --rp-surface:   #FFFFFF;
    --rp-line:      #E7EAF0;
    --rp-line-soft: #F0F2F6;

    --rp-ok:        #17803D;
    --rp-ok-soft:   rgba(23, 128, 61, .08);

    --rp-r:         14px;
    --rp-ease:      cubic-bezier(.22, .61, .36, 1);

    max-width: var(--bg-w-1180, 1180px);
    margin-inline: auto;
    color: var(--rp-body);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
                 Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-align: left;
}
.rp, .rp *, .rp *::before, .rp *::after { box-sizing: border-box; }

@media (prefers-color-scheme: dark) {
    body:not(.theme-light) .rp {
        --rp-ink: #F3F5F8; --rp-body: #C3C8D2; --rp-muted: #8B93A2; --rp-faint: #6B7280;
        --rp-canvas: #0D0F13; --rp-surface: #14171E;
        --rp-line: #242936; --rp-line-soft: #1C212B;
        --rp-red-soft: rgba(229, 27, 35, .14);
        --rp-ok-soft: rgba(23, 128, 61, .16);
    }
}
body.theme-dark .rp {
    --rp-ink: #F3F5F8; --rp-body: #C3C8D2; --rp-muted: #8B93A2; --rp-faint: #6B7280;
    --rp-canvas: #0D0F13; --rp-surface: #14171E;
    --rp-line: #242936; --rp-line-soft: #1C212B;
    --rp-red-soft: rgba(229, 27, 35, .14);
    --rp-ok-soft: rgba(23, 128, 61, .16);
}

.rp :focus-visible:not(input):not(textarea):not(select) {
    outline: 2px solid var(--rp-red);
    outline-offset: 2px;
    border-radius: 8px;
}

/* ── Hero ───────────────────────────────────────────────────────────────── */

.rp-hero {
    padding: clamp(6px, 1.6vw, 16px) 0 clamp(26px, 3.6vw, 42px);
    border-bottom: 1px solid var(--rp-line);
    margin-bottom: clamp(24px, 3.4vw, 38px);
}
.rp-hero__grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}

.rp-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 14px;
    padding: 6px 13px;
    border-radius: 999px;
    background: var(--rp-red-soft);
    color: var(--rp-red);
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    line-height: 1.2;
}
.rp-eyebrow svg { flex: none; }

.rp-title {
    margin: 0 0 16px;
    color: var(--rp-ink);
    font-size: clamp(30px, 5.2vw, 54px);
    line-height: 1.05;
    letter-spacing: -.028em;
    font-weight: 800;
}
.rp-title__accent { color: var(--rp-red); }

.rp-lede {
    margin: 0;
    max-width: 62ch;
    color: var(--rp-body);
    font-size: clamp(15px, 1.2vw, 17px);
    line-height: 1.68;
}

.rp-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 22px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}
.rp-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--rp-body);
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.3;
}
.rp-badge__ic {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 9px;
    background: var(--rp-red-soft);
    color: var(--rp-red);
}

/* Typographic side element. Decoration only, gone below 1000px. */
.rp-hero__side { display: none; }
@media (min-width: 1000px) {
    .rp-hero__grid { grid-template-columns: minmax(0, 1fr) clamp(190px, 24%, 270px); }
    .rp-hero__side { display: block; padding-top: 6px; }
    .rp-side__words {
        display: flex;
        flex-direction: column;
        gap: 4px;
        margin: 0 0 14px;
        padding-bottom: 14px;
        border-bottom: 3px solid var(--rp-red);
        color: var(--rp-ink);
        font-size: 13px;
        font-weight: 800;
        letter-spacing: .14em;
        text-transform: uppercase;
        line-height: 1.5;
    }
    .rp-side__note {
        margin: 0;
        color: var(--rp-faint);
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .12em;
        text-transform: uppercase;
        line-height: 1.7;
    }
}

/* ── Main two-column area ───────────────────────────────────────────────── */

.rp-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    margin-bottom: clamp(16px, 2.2vw, 24px);
    align-items: start;
}
@media (min-width: 1024px) {
    /* ~68 / 32. minmax(0,…) so a long word cannot blow a track out and force
       a horizontal scrollbar. */
    .rp-main { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }
}

/* ── Form ───────────────────────────────────────────────────────────────── */

.rp-form {
    padding: clamp(20px, 2.6vw, 30px);
    /* Uniform hairline. The red top edge that used to sit here read as a
       stray rule above the card rather than as an accent on it. */
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-r);
    background: var(--rp-surface);
}
.rp-form__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 24px;
}
.rp-form__head p {
    margin: 5px 0 0;
    color: var(--rp-muted);
    font-size: 13.5px;
    line-height: 1.6;
}

.rp-form__ic,
.rp-panel__ic,
.rp-shot__ic {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    flex: none;
    border-radius: 11px;
    background: var(--rp-red-soft);
    color: var(--rp-red);
}

.rp-h2 {
    margin: 0;
    color: var(--rp-ink);
    font-size: clamp(19px, 2.1vw, 23px);
    font-weight: 800;
    line-height: 1.25;
    letter-spacing: -.02em;
}
.rp-h3 {
    margin: 0;
    color: var(--rp-ink);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
}

.rp-fields {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}
@media (min-width: 640px) {
    .rp-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .rp-field--wide { grid-column: 1 / -1; }
}

.rp-field { min-width: 0; }
.rp-field label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--rp-ink);
    font-size: 13.5px;
    font-weight: 700;
    line-height: 1.3;
}
.rp-field label svg { flex: none; color: var(--rp-red); }
.rp-req { color: var(--rp-red); font-weight: 800; }
.rp-opt {
    color: var(--rp-faint);
    font-size: 12px;
    font-style: normal;
    font-weight: 600;
}

.rp-field input,
.rp-field select,
.rp-field textarea,
/* :not([type=file]) because this rule is for text fields, and it was also
   matching the visually-hidden file input inside .rp-shot — where it beat
   `.rp-drop__input` on specificity, restoring width:100% and min-height:46px
   on an absolutely-positioned element and pushing the document 38px wider
   than the viewport. That is where the page's horizontal scrollbar came from. */
.rp-shot input:not([type="file"]) {
    display: block;
    width: 100%;
    /* 46px and 16px type: comfortable to tap, and iOS will not zoom on focus. */
    min-height: 46px;
    padding: 12px 14px;
    border: 1px solid var(--rp-line);
    border-radius: 10px;
    background: var(--rp-surface);
    color: var(--rp-ink);
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    transition: border-color .18s var(--rp-ease), box-shadow .18s var(--rp-ease);
}
.rp-field textarea { min-height: 175px; resize: vertical; }

.rp-field input::placeholder,
.rp-field textarea::placeholder,
.rp-shot input:not([type="file"])::placeholder { color: var(--rp-faint); }

.rp-field input:hover,
.rp-field select:hover,
.rp-field textarea:hover,
.rp-shot input:not([type="file"]):hover { border-color: #D3D8E2; }

.rp-field input:focus,
.rp-field select:focus,
.rp-field textarea:focus,
.rp-shot input:not([type="file"]):focus { outline: none; }
.rp [aria-invalid="true"] { border-color: var(--rp-red); }

/* Native arrow replaced; the element stays a real <select> so mobile
   keyboards and assistive tech behave. */
.rp-select { position: relative; }
.rp-select select { appearance: none; -webkit-appearance: none; padding-right: 42px; }
.rp-select__chev {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    color: var(--rp-muted);
    pointer-events: none;
}

.rp-area { position: relative; }
.rp-count {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 3px 8px;
    border: 1px solid var(--rp-line);
    border-radius: 999px;
    background: var(--rp-surface);
    color: var(--rp-faint);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.rp-err {
    margin: 7px 0 0;
    color: var(--rp-red);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.5;
}

/* ── Screenshot block ───────────────────────────────────────────────────── */

.rp-shot {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-top: 20px;
    padding: 18px;
    border: 1px dashed var(--rp-line);
    border-radius: 12px;
    background: var(--rp-canvas);
}
.rp-shot__body { min-width: 0; flex: 1 1 auto; }
.rp-shot__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    color: var(--rp-ink);
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.3;
}
.rp-shot p {
    margin: 0 0 10px;
    color: var(--rp-muted);
    font-size: 13px;
    line-height: 1.55;
}

.rp-shot__rules {
    margin: 0 0 12px !important;
    color: var(--rp-faint);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
}

/* The real <input type="file"> is hidden from sight but NOT from the keyboard
   or assistive tech — its own <label> is the visible control, so focus, Enter
   and Space all behave without a line of JavaScript. */
.rp-drop {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.rp-drop__input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
    border: 0;
}
.rp-drop__label {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    margin: 0 !important;
    padding: 11px 20px;
    border: 1px solid var(--rp-line);
    border-radius: 10px;
    background: var(--rp-surface);
    color: var(--rp-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .18s var(--rp-ease), color .18s var(--rp-ease);
}
.rp-drop__label:hover { border-color: var(--rp-red); color: var(--rp-red); }
.rp-drop__label svg { flex: none; color: var(--rp-red); }
/* The input is visually hidden, so its focus ring has to be drawn on the
   label instead — otherwise a keyboard user sees nothing at all. */


.rp-drop__state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--rp-muted);
    font-size: 13px;
    font-weight: 600;
}
.rp-spin--dark {
    border-color: var(--rp-line);
    border-top-color: var(--rp-red);
}

.rp-files {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}
.rp-files li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px;
    border: 1px solid var(--rp-line);
    border-radius: 10px;
    background: var(--rp-surface);
}
.rp-file__thumb {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 8px;
    border: 1px solid var(--rp-line-soft);
    object-fit: cover;
    background: var(--rp-canvas);
}
.rp-file__thumb--blank {
    display: grid;
    place-items: center;
    color: var(--rp-faint);
}
.rp-file__tx {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1 1 auto;
}
.rp-file__n {
    color: var(--rp-ink);
    font-size: 13.5px;
    font-weight: 650;
    line-height: 1.3;
    /* A long filename must ellipsise, not widen the card. */
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.rp-file__s { color: var(--rp-faint); font-size: 12px; font-variant-numeric: tabular-nums; }

.rp-file__x {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    border: 1px solid var(--rp-line);
    border-radius: 9px;
    background: var(--rp-surface);
    color: var(--rp-muted);
    cursor: pointer;
    transition: border-color .18s var(--rp-ease), color .18s var(--rp-ease);
}
.rp-file__x:hover { border-color: var(--rp-red); color: var(--rp-red); }

.rp-detected {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 16px 0 0;
    padding: 11px 14px;
    border: 1px solid var(--rp-line-soft);
    border-radius: 10px;
    background: var(--rp-canvas);
    color: var(--rp-muted);
    font-size: 12.5px;
    line-height: 1.5;
    /* A long UA string must wrap, not widen the card. */
    overflow-wrap: anywhere;
}
.rp-detected svg { flex: none; color: var(--rp-red); }
.rp-detected strong { color: var(--rp-ink); font-weight: 700; }

.rp-captcha { margin-top: 20px; }

/* ── Submit ─────────────────────────────────────────────────────────────── */

.rp-submit {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 14px 20px;
    margin-top: 22px;
    padding-top: 20px;
    border-top: 1px solid var(--rp-line-soft);
}
.rp-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    flex: 1 1 240px;
    color: var(--rp-muted);
    font-size: 13px;
    line-height: 1.5;
}
.rp-hint svg { flex: none; color: var(--rp-red); }

.rp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 13px 26px;
    border: 1px solid var(--rp-red);
    border-radius: 10px;
    background: var(--rp-red);
    color: #fff;
    font-family: inherit;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    cursor: pointer;
    transition: background-color .2s var(--rp-ease), border-color .2s var(--rp-ease),
                transform .2s var(--rp-ease), opacity .2s var(--rp-ease);
}
.rp-btn:hover:not(:disabled) {
    background: var(--rp-red-dark);
    border-color: var(--rp-red-dark);
    transform: translateY(-1px);
}
.rp-btn:disabled { opacity: .65; cursor: not-allowed; transform: none; }
.rp-btn__in { display: inline-flex; align-items: center; gap: 9px; }
.rp-btn__in svg { flex: none; }

@media (max-width: 519px) {
    .rp-submit { flex-direction: column; align-items: stretch; }
    .rp-btn { width: 100%; }
}

.rp-spin {
    width: 15px;
    height: 15px;
    flex: none;
    border: 2px solid rgba(255, 255, 255, .45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rp-spin .7s linear infinite;
}
@keyframes rp-spin { to { transform: rotate(360deg); } }

/* ── Result banner ──────────────────────────────────────────────────────── */

.rp-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 22px;
    padding: 14px 16px;
    border: 1px solid var(--rp-line);
    border-left: 3px solid var(--rp-muted);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}
.rp-alert svg { flex: none; margin-top: 2px; }
.rp-alert--ok  { border-left-color: var(--rp-ok);  background: var(--rp-ok-soft);  color: var(--rp-ok); }
.rp-alert--bad { border-left-color: var(--rp-red); background: var(--rp-red-soft); color: var(--rp-red-dark); }
body.theme-dark .rp-alert--bad { color: #F1959A; }

/* ── Sidebar panels ─────────────────────────────────────────────────────── */

.rp-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.rp-panel {
    padding: clamp(18px, 2.2vw, 24px);
    border: 1px solid var(--rp-line);
    border-radius: var(--rp-r);
    background: var(--rp-surface);
    min-width: 0;
}
.rp-panel--quiet { background: var(--rp-canvas); }

.rp-panel__head { display: flex; align-items: flex-start; gap: 13px; }
.rp-panel__head > div { min-width: 0; }
.rp-panel__head p {
    margin: 5px 0 0;
    color: var(--rp-muted);
    font-size: 13px;
    line-height: 1.6;
}

.rp-checks {
    display: flex;
    flex-direction: column;
    gap: 13px;
    margin: 20px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--rp-line-soft);
    list-style: none;
}
.rp-checks li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    color: var(--rp-body);
    font-size: 13.5px;
    line-height: 1.55;
}
.rp-check {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    flex: none;
    margin-top: 1px;
    border-radius: 999px;
    background: var(--rp-red);
    color: #fff;
}

.rp-steps {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 20px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--rp-line-soft);
    list-style: none;
    counter-reset: none;
}
.rp-steps li { display: flex; align-items: flex-start; gap: 12px; min-width: 0; }
.rp-steps > li > div { min-width: 0; }
.rp-step__n {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    flex: none;
    border-radius: 999px;
    background: var(--rp-red-soft);
    color: var(--rp-red);
    font-size: 12.5px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.rp-step__t {
    margin: 0 0 3px;
    color: var(--rp-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
}
.rp-steps p {
    margin: 0;
    color: var(--rp-muted);
    font-size: 12.5px;
    line-height: 1.55;
}

.rp-ghost {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 10px 16px;
    min-height: 42px;
    border: 1px solid var(--rp-red-ring);
    border-radius: 10px;
    background: var(--rp-red-soft);
    color: var(--rp-red);
    font-size: 13.5px;
    font-weight: 700;
    text-decoration: none;
    transition: gap .2s var(--rp-ease), background-color .2s var(--rp-ease);
}
.rp-ghost:hover { gap: 12px; background: rgba(229, 27, 35, .12); color: var(--rp-red-dark); }
.rp-ghost svg { flex: none; }

/* ── Common issues ──────────────────────────────────────────────────────── */

.rp-common { margin-bottom: 8px; }

.rp-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0 0;
    padding: 20px 0 0;
    border-top: 1px solid var(--rp-line-soft);
    list-style: none;
}

/* Real buttons — each one selects that type in the form above. */
.rp-chip {
    display: inline-flex;
    align-items: center;
    /* 40px keeps the chips a comfortable tap target on a phone. */
    min-height: 40px;
    padding: 9px 16px;
    border: 1px solid var(--rp-line);
    border-radius: 999px;
    background: var(--rp-surface);
    color: var(--rp-body);
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .18s var(--rp-ease), color .18s var(--rp-ease),
                background-color .18s var(--rp-ease);
}
.rp-chip:hover { border-color: var(--rp-red-ring); color: var(--rp-red); }
.rp-chip.is-on {
    border-color: var(--rp-red);
    background: var(--rp-red);
    color: #fff;
}

/* ── Motion ─────────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
    .rp *, .rp *::before, .rp *::after {
        transition-duration: .001ms !important;
        animation-duration: .001ms !important;
    }
    /* The spinner is a loading signal, not decoration — slowed, not stopped. */
    .rp-spin { animation-duration: 1.6s !important; }
}

/* ── Host page reset ────────────────────────────────────────────────────── */
/*
 * layouts/public wraps every CMS page body in .card > .card-body. This page
 * draws its own surfaces, so the wrapper's panel is flattened here rather than
 * by editing shared layout markup — every other page keeps its card.
 */
body.report-page #content-box > .card {
    border: 0;
    background: none;
    box-shadow: none;
}
body.report-page #content-box > .card > .card-body { padding: 0; }
body.report-page #content-box { margin-bottom: 0 !important; }
