/* Доска объявлений — UID 411246335, 24.10.2026 */
.board-wrap { max-width: 1100px; padding-bottom: 64px; }

.board-head {
    display: flex; align-items: flex-end; justify-content: space-between;
    gap: 16px; flex-wrap: wrap; margin: 18px 0 22px;
}
.board-head h1 { font-size: 28px; margin: 0 0 6px; }
.board-sub { color: var(--muted); margin: 0; font-size: 14px; max-width: 620px; }

.board-list { display: grid; gap: 14px; }
.board-card {
    background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
    padding: 16px 18px;
}
.board-card-top {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px; margin-bottom: 8px; font-size: 13px;
}
.board-author { color: var(--accent-2); font-weight: 600; }
.board-date { color: var(--muted); }
.board-card-title { font-size: 17px; margin: 0 0 6px; }
.board-card-text {
    color: var(--text); opacity: .9; margin: 0 0 10px; font-size: 14px;
    line-height: 1.5; white-space: pre-wrap; word-break: break-word;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}
.board-city { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.board-thumbs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.board-thumbs img {
    width: 92px; height: 92px; object-fit: cover; border-radius: 10px;
    border: 1px solid var(--line); background: var(--panel-2);
}
.board-thumb-more {
    width: 92px; height: 92px; border-radius: 10px; border: 1px dashed var(--line);
    display: flex; align-items: center; justify-content: center; color: var(--muted); font-weight: 600;
}
.board-card-foot {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px;
}
.board-files-count { color: var(--muted); }
.board-card-btns { display: flex; gap: 8px; }

.board-empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.board-empty-ico { font-size: 40px; margin-bottom: 10px; }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-danger { border-color: #7f1d1d; color: #fecaca; background: #2a1518; }
.btn-danger:hover { background: #3a1a1f; }

/* модалка */
.board-lock { overflow: hidden; }
.board-overlay {
    position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.72);
    display: flex; align-items: center; justify-content: center; padding: 20px;
}
.board-overlay[hidden] { display: none; }
.board-modal-card {
    background: var(--panel); border: 1px solid var(--line); border-radius: 18px;
    width: min(640px, 100%); max-height: calc(100vh - 40px); overflow: auto;
    padding: 20px 22px 22px; box-shadow: 0 24px 64px rgba(0,0,0,.55);
}
.board-modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.board-modal-head h2 { font-size: 20px; margin: 0; }
.board-x {
    background: none; border: 0; color: var(--muted); font-size: 26px; line-height: 1;
    cursor: pointer; padding: 0 4px;
}
.board-x:hover { color: var(--text); }

.board-field { margin-bottom: 12px; }
.board-field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
.board-field input[type="text"], .board-field input:not([type]), .board-field textarea {
    width: 100%; box-sizing: border-box; background: var(--panel-2); color: var(--text);
    border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
    font: inherit; font-size: 14px; outline: none;
}
.board-field textarea { resize: vertical; min-height: 100px; }
.board-field input:focus, .board-field textarea:focus { border-color: var(--accent); }
.board-field input[type="file"] {
    width: 100%; font-size: 13px; color: var(--muted);
    background: var(--panel-2); border: 1px dashed var(--line); border-radius: 10px;
    padding: 10px; cursor: pointer;
}
.board-hint { color: var(--muted); font-size: 12px; margin: 6px 0 0; line-height: 1.45; }

.board-picked { display: grid; gap: 8px; margin: 4px 0 12px; }
.board-picked-row {
    display: flex; align-items: center; gap: 10px;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
    padding: 8px 10px; font-size: 13px;
}
.board-picked-row img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.board-picked-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-picked-size { color: var(--muted); font-size: 12px; }
.board-file-ico { font-size: 22px; width: 40px; text-align: center; }
.board-remove {
    background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1;
    cursor: pointer; padding: 0 4px;
}
.board-remove:hover { color: #fecaca; }

.board-costline {
    display: flex; justify-content: space-between; align-items: center;
    gap: 10px; font-size: 14px; padding: 10px 0; border-top: 1px solid var(--line);
}
.board-cost { font-weight: 600; }
.board-cost:empty { display: none; }
.board-balance { color: var(--muted); font-size: 13px; }
.board-warn {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #2a1518; border: 1px solid #7f1d1d; color: #fecaca;
    border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px;
}
.board-warn[hidden] { display: none; }
.board-btn-row { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 6px; }

/* просмотр */
.board-meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-bottom: 12px; }
.board-ad-text { white-space: pre-wrap; word-break: break-word; line-height: 1.6; font-size: 14px; margin-bottom: 16px; }
.board-files { display: grid; gap: 8px; margin-bottom: 16px; }
.board-file-row {
    display: flex; align-items: center; gap: 10px;
    background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
    padding: 8px 10px; font-size: 13px;
}
.board-file-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; display: block; }
.board-file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-dl { color: var(--accent-2); text-decoration: none; font-size: 13px; white-space: nowrap; }
.board-dl:hover { text-decoration: underline; }

@media (max-width: 640px) {
    .board-head h1 { font-size: 22px; }
    .board-head { align-items: stretch; }
    .board-head .btn { width: 100%; }
    .board-modal-card { padding: 16px; border-radius: 14px; }
    .board-card { padding: 14px; }
    .board-card-btns { flex: 1; justify-content: flex-end; }
}
