/**
 * Suggestions Board (sb- prefix)
 */

.sb-board .container {
    max-width: 860px;
}

/* Board header: current month + archives dropdown */
.sb-board-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.sb-current-month {
    font-size: 20px;
    font-weight: 700;
    color: var(--st-ink);
}

.sb-archive {
    position: relative;
}

.sb-archive-toggle {
    list-style: none;
}

.sb-archive-toggle::-webkit-details-marker {
    display: none;
}

.sb-archive[open] .sb-archive-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.sb-archive-toggle .fa-chevron-down {
    font-size: 11px;
    transition: transform 0.2s var(--st-ease, ease);
}

.sb-archive-list {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 10;
    min-width: 180px;
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: var(--st-card);
    border: 1px solid var(--st-line);
    border-radius: 2px;
    box-shadow: var(--st-shadow-lift);
}

.sb-archive-year {
    position: sticky;
    top: 0;
    padding: 8px 12px 6px;
    background: var(--st-card);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--st-body);
    border-bottom: 1px solid var(--st-line);
    pointer-events: none;
}

.sb-archive-year:first-child {
    margin-top: -6px;
}

.sb-archive-list a {
    display: block;
    padding: 9px 12px;
    border-radius: 2px;
    color: var(--st-body);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.sb-archive-list a:hover {
    background: var(--st-paper);
    color: var(--st-indigo);
}

.sb-archive-list a.is-active {
    background: var(--st-sky-pale);
    color: var(--st-indigo-deep);
    font-weight: 600;
}

/* Archive notice */
.sb-archive-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 18px;
    margin-bottom: 24px;
    border: 1px solid var(--st-sky-pale);
    border-radius: 2px;
    background: var(--st-sky-pale);
    color: var(--st-indigo-deep);
    font-size: 14px;
    font-weight: 500;
}

.sb-archive-notice a {
    color: var(--st-indigo-deep);
    font-weight: 600;
}

/* Type filter */
.sb-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.sb-filter-link {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid var(--st-line);
    border-radius: 3px 14px 3px 14px;
    background: var(--st-card);
    color: var(--st-ink);
    font-family: var(--st-font-mono);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.16s ease;
}

.sb-filter-link:hover {
    border-color: var(--st-ink);
    transform: translate(-2px, -2px);
    box-shadow: 3px 3px 0 var(--st-lime);
}

.sb-filter-link.is-active {
    background: var(--st-ink);
    border-color: var(--st-ink);
    color: var(--st-lime);
}

/* Board list */
.sb-board-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.sb-empty {
    padding: 32px;
    border: 1px dashed var(--st-line);
    border-radius: 2px;
    text-align: center;
    color: var(--st-body);
}

/* Card */
.sb-card {
    display: flex;
    gap: 20px;
    padding: 20px;
    border: 1px solid var(--st-line);
    border-radius: 2px;
    background: var(--st-card);
    box-shadow: var(--st-shadow-soft);
    transition: box-shadow 0.2s var(--st-ease, ease), transform 0.2s var(--st-ease, ease);
}

.sb-card:hover {
    box-shadow: var(--st-shadow-lift);
    transform: translateY(-2px);
}

/* Vote column */
.sb-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-width: 44px;
    padding: 8px 6px;
    border-radius: 2px;
    background: var(--st-paper);
}

.sb-vote--closed {
    opacity: 0.55;
}

.sb-vote-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 28px;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--st-body);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.15s var(--st-ease, ease);
}

.sb-vote-btn:hover:not(:disabled) {
    background: var(--st-sky-pale);
    color: var(--st-indigo-deep);
}

.sb-vote-btn--up.is-active {
    color: #16a34a;
}

.sb-vote-btn--down.is-active {
    color: var(--badge-red, #dc2626);
}

.sb-vote-btn:disabled {
    cursor: not-allowed;
}

.sb-vote-count {
    font-size: 13px;
    font-weight: 700;
    color: var(--st-ink);
    font-variant-numeric: tabular-nums;
}

/* Card body */
.sb-card-body {
    flex: 1;
    min-width: 0;
}

.sb-card-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.sb-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.sb-badge--theme {
    background: var(--st-sky-pale);
    color: var(--st-indigo-deep);
}

.sb-badge--plugin {
    background: var(--st-lime);
    color: var(--st-night);
}

.sb-card-date {
    font-size: 12px;
    color: var(--st-body);
}

.sb-card-title {
    margin: 0 0 6px;
    font-size: 19px;
    line-height: 1.35;
}

.sb-card-title a {
    color: var(--st-ink);
    text-decoration: none;
}

.sb-card-title a:hover {
    color: var(--st-indigo);
}

.sb-card-excerpt {
    margin: 0 0 10px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--st-body);
}

.sb-card-comments {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--st-indigo);
    text-decoration: none;
}

.sb-card-comments:hover {
    text-decoration: underline;
}

/* Submit form */
.sb-submit {
    margin-top: 48px;
    padding: 28px;
    border: 1px solid var(--st-line);
    border-radius: 2px;
    background: var(--st-card);
    box-shadow: var(--st-shadow-soft);
}

.sb-submit-title {
    margin: 0 0 8px;
    font-size: 22px;
    color: var(--st-ink);
}

.sb-submit-lede {
    margin: 0 0 20px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--st-body);
}

.sb-form-row {
    display: grid;
    grid-template-columns: 1fr 180px;
    gap: 16px;
}

.sb-form-field {
    margin-bottom: 16px;
}

.sb-form-field label {
    display: block;
    margin-bottom: 6px;
    font-family: var(--st-font-mono);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--st-ink);
}

.sb-form-field input[type="text"],
.sb-form-field select,
.sb-form-field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--st-line);
    border-radius: 2px;
    background: var(--st-paper);
    color: var(--st-ink);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.sb-form-field input:focus,
.sb-form-field select:focus,
.sb-form-field textarea:focus {
    outline: none;
    border-color: var(--st-ink);
    box-shadow: 3px 3px 0 var(--st-lime);
}

.sb-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.sb-message {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 2px;
    font-size: 14px;
    font-weight: 500;
}

.sb-message--success {
    background: #ecfdf3;
    color: #15803d;
}

.sb-message--error {
    background: #fef2f2;
    color: var(--badge-red, #dc2626);
}

/* Single suggestion view */
.sb-single-score {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 700;
}

.sb-single-score .fa-caret-up {
    color: #16a34a;
}

.sb-single-score .fa-caret-down {
    color: var(--badge-red, #dc2626);
}

.sb-single-score-divider {
    color: var(--st-line);
}

.sb-single-summary {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.sb-summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--st-body);
}

.sb-summary-row strong {
    font-size: 16px;
    color: var(--st-ink);
}

.sb-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: var(--st-indigo);
    text-decoration: none;
}

.sb-back-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 640px) {
    .sb-card {
        flex-direction: column;
        gap: 12px;
    }

    .sb-vote {
        flex-direction: row;
        min-width: 0;
        padding: 6px 10px;
        gap: 8px;
    }

    .sb-form-row {
        grid-template-columns: 1fr;
    }
}
