/*
 *  feedback.css
 *  ochat-web
 *
 *  Публичная доска багов и идей. Страница самостоятельная, как `/premium/`:
 *  системная тема, одна понятная форма и список состояний без зависимости от
 *  лендинга и его переключателей.
 */

:root {
    color-scheme: light dark;

    --bg: #f5f7fa;
    --surface: #ffffff;
    --ink: #0f1318;
    --ink-muted: #5b6672;
    --accent: #2f6df6;
    --accent-pressed: #2257cc;
    --accent-soft: #eaf0ff;
    --danger: #b42318;
    --success: #1a7f4b;
    --warning: #9a4f00;
    --border: #e3e8ef;
    --field: #f5f7fa;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1318;
        --surface: #171c22;
        --ink: #f2f5f8;
        --ink-muted: #9aa7b4;
        --accent: #6f9bff;
        --accent-pressed: #557ee0;
        --accent-soft: #26334c;
        --danger: #ff6b5e;
        --success: #4fd08a;
        --warning: #ffb35c;
        --border: #2c343d;
        --field: #0f1318;
    }
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

body {
    margin: 0;
    min-height: 100vh;
    padding: 32px 20px 48px;
    background: var(--bg);
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

.page {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
}

.card,
.list-state,
.request-card {
    background: var(--surface);
    border: 1px solid var(--border);
}

.card {
    border-radius: 20px;
    padding: 32px 28px;
}

.submission {
    text-align: center;
}

.mark {
    display: inline-flex;
    margin-bottom: 12px;
}

.plate {
    fill: var(--accent);
}

.glyph {
    fill: none;
    stroke: #ffffff;
}

h1,
h2,
p {
    margin-top: 0;
}

h1 {
    margin-bottom: 10px;
    font-size: clamp(1.55rem, 4vw, 2rem);
    line-height: 1.2;
}

h2 {
    margin-bottom: 0;
    font-size: clamp(1.35rem, 3vw, 1.7rem);
    line-height: 1.25;
}

.lead {
    max-width: 570px;
    margin: 0 auto;
    color: var(--ink-muted);
    font-size: 1.02rem;
}

form {
    max-width: 620px;
    margin: 26px auto 0;
    text-align: left;
}

.field-group {
    min-width: 0;
    margin: 0 0 20px;
    padding: 0;
    border: 0;
}

label,
legend {
    display: block;
    margin-bottom: 7px;
    padding: 0;
    color: var(--ink-muted);
    font-size: 0.86rem;
}

.choices {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.choice {
    position: relative;
    margin: 0;
    cursor: pointer;
}

.choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.choice span {
    display: flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--field);
    color: var(--ink);
    font-size: 0.95rem;
    font-weight: 600;
    transition: border-color 0.15s ease, background 0.15s ease;
}

.choice input:checked + span {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.choice input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

textarea,
input[type="text"],
input[type="file"] {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--field);
    color: var(--ink);
    font-size: 16px;
}

textarea {
    min-height: 132px;
    padding: 12px 14px;
    line-height: 1.5;
    resize: vertical;
}

input[type="text"] {
    padding: 12px 14px;
}

textarea::placeholder {
    color: var(--ink-muted);
    opacity: 0.75;
}

input[type="file"] {
    padding: 8px;
}

input[type="file"]::file-selector-button {
    margin-right: 10px;
    padding: 8px 11px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 0.86rem;
    cursor: pointer;
}

textarea:focus,
input[type="text"]:focus,
input[type="file"]:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
}

.checkbox {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    width: max-content;
    max-width: 100%;
    margin: 12px 0 0;
    color: var(--ink);
    cursor: pointer;
}

.checkbox input {
    width: 17px;
    height: 17px;
    margin: 2px 0 0;
    accent-color: var(--accent);
    flex: none;
}

.checkbox span {
    font-size: 0.88rem;
}

#formControls.is-disabled {
    opacity: 0.62;
}

#formControls.is-disabled .choice,
#formControls.is-disabled input[type="file"]::file-selector-button {
    cursor: default;
}

.optional {
    color: var(--ink-muted);
    font-weight: 400;
}

.hint,
.file-meta {
    margin: 7px 0 0;
    color: var(--ink-muted);
    font-size: 0.82rem;
}

.file-meta {
    overflow-wrap: anywhere;
}

button {
    min-height: 46px;
    padding: 12px 16px;
    border: 0;
    border-radius: 12px;
    background: var(--accent);
    color: #ffffff;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
}

form > button {
    width: 100%;
    margin-top: 2px;
}

button:hover:not(:disabled) {
    background: var(--accent-pressed);
}

button:focus-visible,
.mark:focus-visible,
.home-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

button:disabled {
    opacity: 0.6;
    cursor: default;
}

button.secondary {
    border: 1px solid var(--border);
    background: transparent;
    color: var(--ink);
}

button.secondary:hover:not(:disabled) {
    border-color: var(--ink);
    background: transparent;
}

button.compact {
    min-height: 40px;
    padding: 9px 14px;
    font-size: 0.9rem;
}

.error,
.notice {
    margin: 14px 0 0;
    font-size: 0.9rem;
}

.error {
    color: var(--danger);
}

.notice {
    color: var(--success);
}

.notice.warning {
    color: var(--warning);
}

.board {
    margin-top: 46px;
}

.board-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

.eyebrow {
    margin-bottom: 4px;
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
}

.board-note {
    max-width: 230px;
    margin-bottom: 2px;
    color: var(--ink-muted);
    font-size: 0.85rem;
    text-align: right;
}

.list-state {
    border-radius: 16px;
    padding: 28px 22px;
    text-align: center;
}

.list-state p:last-child {
    margin-bottom: 0;
}

.list-state button {
    margin-top: 12px;
}

.empty-title {
    margin-bottom: 4px;
    font-weight: 600;
}

.muted {
    color: var(--ink-muted);
}

.request-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.request-card {
    border-radius: 16px;
    padding: 18px 20px;
}

.request-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.request-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
    color: var(--ink-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.request-meta span + span::before {
    content: "·";
    margin-right: 12px;
    color: var(--border);
}

.status {
    flex: none;
    padding: 3px 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    color: var(--ink-muted);
    font-size: 0.7rem;
    font-weight: 700;
}

.status-in-progress {
    border-color: var(--warning);
    color: var(--warning);
}

.status-created {
    border-color: var(--accent);
    color: var(--accent);
}

.status-done {
    border-color: var(--success);
    color: var(--success);
}

.request-description {
    margin: 13px 0 12px;
    color: var(--ink);
    line-height: 1.55;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.request-media {
    margin: 14px 0 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--field);
}

.media-preview {
    display: block;
    width: 100%;
    max-height: 320px;
    border-bottom: 1px solid var(--border);
    background: #000000;
    object-fit: contain;
}

.media-details {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
}

.media-name {
    min-width: 0;
    color: var(--ink-muted);
    font-size: 0.78rem;
    overflow-wrap: anywhere;
}

.media-link {
    flex: none;
    color: var(--accent);
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
}

.media-link:hover {
    text-decoration: underline;
}

.media-link:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.request-date {
    margin: 0;
    color: var(--ink-muted);
    font-size: 0.78rem;
}

.admin-comment {
    margin-top: 14px;
    padding: 12px 14px;
    border-left: 3px solid var(--accent);
    border-radius: 0 10px 10px 0;
    background: var(--field);
}

.admin-comment-label {
    margin-bottom: 4px;
    color: var(--accent);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-comment-text {
    margin: 0;
    color: var(--ink);
    font-size: 0.9rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
    white-space: pre-wrap;
}

.home-link {
    display: block;
    width: max-content;
    margin: 30px auto 0;
    color: var(--accent);
    text-decoration: none;
}

.home-link:hover {
    text-decoration: underline;
}

@media (max-width: 600px) {
    body {
        padding: 20px 14px 36px;
    }

    .card {
        padding: 26px 18px;
    }

    .board {
        margin-top: 36px;
    }

    .board-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
    }

    .board-note {
        max-width: none;
        text-align: left;
    }

    .request-card {
        padding: 16px;
    }

    .request-head {
        flex-direction: column;
        gap: 9px;
    }

    .media-details {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .choice span {
        transition: none;
    }
}

/* Сколько человек просили о том же.
   Заметнее остальных меток в строке: это единственная из них, которая
   что-то говорит о важности заявки, а не о её свойствах. */
.request-votes {
    font-weight: 600;
    color: var(--accent);
}
