/* Oeffentliche Votingliste: kompaktes Board, Details erst nach dem Oeffnen.
   Die Absatzmasse des Votingtexts bleiben in feedback_voting_content.css. */

:root {
    --ink: #142536;
    --ink-soft: #3d5166;
    --signal: #1f6f8b;
    --signal-strong: #18586d;
    --canvas: #eef1f4;
    --surface: #fff;
    --line: #d7dee6;
    --line-strong: #c3ccd6;
    --chip: #f4f7f9;
    --up: #1b7a4a;
    --down: #b42318;
    --nav: #142536;
    --sticky-offset: 0px;
}

body.voting-board {
    min-height: 100vh;
    margin: 0;
    background: var(--canvas);
    color: var(--ink);
    font-family: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
}

.voting-navbar {
    background: var(--nav);
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.voting-navbar .navbar-brand {
    color: #fff;
    font-weight: 600;
    letter-spacing: -.01em;
}

.voting-navbar .btn-outline-light {
    border-color: rgba(255, 255, 255, .35);
}

.voting-shell {
    width: min(920px, calc(100% - 1.5rem));
    margin: 0 auto;
    padding: 1.5rem 0 3rem;
}

.voting-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: .75rem 1.5rem;
    margin-bottom: 1.15rem;
}

.voting-hero h1 {
    margin: 0 0 .35rem;
    color: var(--ink);
    font-size: clamp(1.45rem, 2vw, 1.85rem);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1.2;
}

.voting-hero p {
    max-width: 40rem;
    margin: 0;
    color: var(--ink-soft);
    font-size: .95rem;
}

.voting-views {
    display: flex;
    gap: .25rem;
    padding: .2rem;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface);
}

.voting-views .nav-link {
    padding: .4rem .8rem;
    border-radius: 8px;
    color: var(--ink-soft);
    font-size: .86rem;
    font-weight: 600;
}

.voting-views .nav-link:hover,
.voting-views .nav-link:focus-visible {
    color: var(--ink);
    background: var(--chip);
}

.voting-views .nav-link.active {
    color: #fff;
    background: var(--ink);
}

.voting-toolbar {
    position: sticky;
    top: var(--sticky-offset);
    z-index: 20;
    margin-bottom: 1rem;
    padding: .75rem .9rem;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 10px 24px rgba(20, 37, 54, .08);
}

.voting-toolbar .form-control {
    border-color: var(--line);
    border-radius: 10px;
    font-size: .92rem;
}

.voting-toolbar .form-control:focus {
    border-color: var(--signal);
    box-shadow: 0 0 0 .2rem rgba(31, 111, 139, .15);
}

.program-filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem;
    padding-bottom: .15rem;
}

.program-filter {
    flex: 0 0 auto;
    border: 1px solid var(--line);
    background: var(--chip);
    color: var(--ink);
    font-size: .8rem;
    font-weight: 600;
    padding: .35rem .7rem;
    white-space: nowrap;
}

.program-filter:hover,
.program-filter:focus-visible {
    border-color: var(--signal);
    background: #e7f2f6;
    color: var(--signal-strong);
}

.program-filter[aria-pressed="true"] {
    color: #fff;
    background: var(--signal);
    border-color: var(--signal);
}

.program-filter .filter-count {
    display: inline-block;
    min-width: 1.2rem;
    margin-left: .2rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: rgba(20, 37, 54, .08);
    font-size: .72rem;
    font-variant-numeric: tabular-nums;
}

.program-filter[aria-pressed="true"] .filter-count {
    background: rgba(255, 255, 255, .2);
}

.idea-board {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.idea-card {
    border-bottom: 1px solid var(--line);
}

.idea-card:last-child {
    border-bottom: 0;
}

.idea-row {
    display: grid;
    grid-template-columns: 4.75rem minmax(0, 1fr);
    gap: .35rem 1rem;
    padding: 1rem 1.1rem .95rem;
}

.idea-score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: .15rem;
    color: var(--ink-soft);
    font-variant-numeric: tabular-nums;
}

.idea-score .vote-score {
    color: var(--ink);
    font-size: 1.35rem;
    font-weight: 600;
    letter-spacing: -.03em;
    line-height: 1.1;
}

.idea-score.is-positive .vote-score { color: var(--up); }
.idea-score.is-negative .vote-score { color: var(--down); }

.idea-score-label {
    margin-top: .15rem;
    font-size: .72rem;
    font-weight: 500;
    color: var(--ink-soft);
}

.idea-main {
    min-width: 0;
}

.idea-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .6rem;
    margin-bottom: .35rem;
}

.idea-title {
    margin: 0;
    color: var(--ink);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -.02em;
    line-height: 1.3;
}

.idea-title-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.idea-title-btn:hover,
.idea-title-btn:focus-visible {
    color: var(--signal-strong);
}

.idea-heading-meta {
    display: flex;
    align-items: center;
    gap: .15rem;
    flex: 0 0 auto;
}

.idea-program {
    color: var(--signal-strong);
    background: #e7f2f6;
    border: 0;
    font-weight: 600;
    font-size: .75rem;
    white-space: nowrap;
}

.idea-internal-link {
    display: inline-block;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    cursor: default;
    text-decoration: none;
    opacity: 0;
}

.idea-preview {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin: 0 0 .65rem;
    color: var(--ink-soft);
    font-size: .92rem;
    line-height: 1.45;
}

.idea-flags {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    margin: -.25rem 0 .55rem;
    color: var(--ink-soft);
    font-size: .78rem;
}

.idea-card.is-open .idea-preview,
.idea-card.is-open .idea-flags {
    display: none;
}

.idea-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem .75rem;
}

.vote-btn {
    min-width: 6.4rem;
    min-height: 40px;
    border-radius: 999px;
    font-weight: 600;
    font-size: .85rem;
}

.vote-btn[aria-pressed="true"].vote-up {
    color: #fff;
    background: var(--up);
    border-color: var(--up);
}

.vote-btn[aria-pressed="true"].vote-down {
    color: #fff;
    background: var(--down);
    border-color: var(--down);
}

.idea-thread-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-left: auto;
}

.idea-comment-btn,
.idea-toggle {
    min-height: 40px;
    padding: .35rem .8rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font-size: .84rem;
    font-weight: 600;
}

.idea-toggle {
    margin-left: 0;
}

.idea-comment-btn:hover,
.idea-comment-btn:focus-visible,
.idea-toggle:hover,
.idea-toggle:focus-visible,
.idea-card.is-open .idea-toggle,
.idea-card.is-open .idea-comment-btn {
    border-color: var(--signal);
    background: #e7f2f6;
    color: var(--signal-strong);
}

.idea-comment-btn .comment-count {
    display: inline-block;
    min-width: 1.2rem;
    margin-left: .15rem;
    padding: 0 .3rem;
    border-radius: 999px;
    background: rgba(20, 37, 54, .08);
    font-variant-numeric: tabular-nums;
}

.notify-block {
    min-width: 16rem;
    max-width: 26rem;
}

.idea-panel {
    padding: 0 1.1rem 1.1rem 5.85rem;
}

.idea-panel[hidden] {
    display: none;
}

.idea-text {
    white-space: normal;
}

.idea-panel .feedback-voting-content img {
    display: block;
    max-width: min(100%, 36rem);
    max-height: min(22rem, 55vh);
    width: auto;
    height: auto;
    object-fit: contain;
    margin: .65rem 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--chip);
}

.idea-files {
    margin: 1rem 0 0;
}

.idea-files h3 {
    margin-bottom: .4rem;
    font-size: .82rem;
    font-weight: 600;
}

.idea-thread {
    margin-top: 1.15rem;
    padding-top: 1rem;
    border-top: 1px solid var(--line);
}

.idea-thread-title {
    margin: 0 0 .75rem;
    font-size: .9rem;
    font-weight: 600;
    letter-spacing: -.01em;
}

.idea-comments {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 1rem;
}

.idea-comment {
    padding: .7rem .85rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--chip);
}

.idea-comment.is-hersteller {
    border-color: var(--nav);
    border-left-width: 4px;
    background: #e8eef4;
}

.idea-comment-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .4rem .65rem;
    margin-bottom: .35rem;
}

.idea-comment-name {
    font-weight: 600;
    color: var(--ink);
}

.idea-comment-hersteller {
    display: inline-flex;
    align-items: center;
    padding: .12rem .45rem;
    border-radius: 4px;
    background: var(--nav);
    color: #fff;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.idea-comment-time {
    color: var(--ink-soft);
    font-size: .78rem;
}

.idea-comment-body {
    margin: 0;
    color: var(--ink);
    font-size: .92rem;
    line-height: 1.45;
    white-space: pre-wrap;
}

.idea-comment-body p { margin: 0; }

.idea-comment-deleted {
    margin: 0;
    color: var(--ink-soft);
    font-style: italic;
}

.idea-comment-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .4rem;
}

.idea-comment-actions button {
    padding: 0;
    border: 0;
    background: none;
    color: var(--signal-strong);
    font-size: .8rem;
    font-weight: 600;
}

.idea-comment-actions button.text-danger {
    color: #b02a37;
}

.idea-replies {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    margin: .75rem 0 0 1rem;
    padding-left: .75rem;
    border-left: 2px solid var(--line);
}

.idea-comment-form {
    padding: .85rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
}

.idea-comment-form.is-staff {
    border-color: var(--nav);
    background: #e8eef4;
}

.idea-staff-hint {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .45rem;
    color: var(--ink);
    font-size: .88rem;
    font-weight: 500;
}

.idea-comment-submit {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
    font-weight: 600;
}

.idea-comment-submit:hover,
.idea-comment-submit:focus-visible {
    background: var(--signal-strong);
    border-color: var(--signal-strong);
    color: #fff;
}

.idea-comments-status,
.idea-comments-empty {
    margin: 0;
    color: var(--ink-soft);
    font-size: .88rem;
}

.implementation-date {
    margin: 0 0 .5rem;
}

.idea-empty {
    padding: 3rem 1.5rem;
    text-align: center;
    color: var(--ink-soft);
}

.idea-empty i {
    font-size: 2rem;
    color: var(--signal);
}

.vote-status {
    min-height: 1.35rem;
    padding: 0 1.1rem .85rem 5.85rem;
}

@media (max-width: 575.98px) {
    .voting-shell {
        width: calc(100% - 1rem);
        padding-top: 1rem;
    }

    .voting-hero h1 {
        font-size: 1.35rem;
    }

    .voting-views {
        width: 100%;
    }

    .voting-views .nav-link {
        flex: 1 1 0;
        text-align: center;
    }

    .idea-row {
        grid-template-columns: 1fr;
        padding: .9rem .9rem .8rem;
    }

    .idea-score {
        flex-direction: row;
        align-items: baseline;
        gap: .45rem;
        justify-content: flex-start;
    }

    .idea-score .vote-score {
        font-size: 1.2rem;
    }

    .idea-score-label {
        margin-top: 0;
    }

    .idea-program {
        white-space: normal;
        text-align: left;
    }

    .idea-panel,
    .vote-status {
        padding-left: .9rem;
        padding-right: .9rem;
    }

    .vote-actions,
    .notify-block {
        width: 100%;
        max-width: none;
    }

    .vote-btn {
        flex: 1 1 0;
        min-width: 0;
    }

    .program-filter-row {
        flex-wrap: nowrap;
        overflow-x: auto;
        scrollbar-width: thin;
    }

    .idea-thread-actions {
        width: 100%;
        margin-left: 0;
    }

    .idea-comment-btn,
    .idea-toggle {
        flex: 1 1 0;
        min-width: 0;
    }

    .idea-replies {
        margin-left: .35rem;
        padding-left: .55rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        scroll-behavior: auto !important;
    }
}
