.vote-flow-nomination-list {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
}

.vfm-nomination-intro {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #007cba;
    font-size: 16px;
    line-height: 1.5;
}

/* Tab Styles - "pill" buttons rather than a classic connected-underline tab
   strip. With enough categories/long names these always wrap onto more
   than one line - pills stand on their own with no visual link to the
   content box below, so a wrap reads as intentional instead of like a
   broken single-row tab bar. Shared between the nomination list and the
   ballot page. */
.vfm-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.tab-button {
    /* Equal width across all pills - set at runtime (see the tab-switching
       script in nomination-list.php/ballot.php) to the widest pill's own
       natural content width, not a guessed fixed value. Category display
       names are admin-configurable free text, so a hardcoded px width
       would either be too narrow for a longer name added later (forcing a
       truncation nobody asked for) or leave shorter labels swimming in
       unused padding for no reason - measuring the actual content adapts
       to whatever names are really in use. text-overflow/white-space
       below are only a defensive fallback for the brief instant before
       that script runs (or if JS is disabled), not the primary mechanism.
       flex-shrink: 0 keeps a pill from being squeezed narrower to fit a
       row instead of wrapping - see .vfm-tabs. */
    flex-shrink: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    padding: 8px 16px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 20px;
    cursor: pointer;
    /* Same weight in every state - see .tab-button.active below for why. */
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    font-size: 14px;
    line-height: 1.4;
}

.tab-button:hover {
    background: #e9ecef;
    border-color: #ccc;
}

.tab-button.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
    /* Background/border/color already mark the active pill unambiguously -
       font-weight used to additionally jump 500 -> 600 here, but a bolder
       weight renders slightly wider text, which changed that one pill's
       width on click and could push a later pill onto the next line.
       Keeping the weight constant across states removes the layout shift
       entirely instead of just minimizing it. */
}

/* Tab Content - deliberately no border/padding box. That framing used to
   make this area look like a continuation of the tab strip directly above
   it, back when tabs were a connected single-row strip; now that they're
   standalone pills (see .vfm-tabs above), the box no longer serves that
   purpose and its padding only cost the table inside horizontal room. */

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
}

.vfm-category-section {
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.vfm-category-section h3 {
    color: #333;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #007cba;
    font-size: 1.3em;
    line-height: 1.4;
}

.vfm-nomination-table-wrapper {
    overflow-x: auto;
    margin: 15px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.vfm-nomination-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
    line-height: 1.5;
}

.vfm-nomination-table th,
.vfm-nomination-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
    vertical-align: top;
}

.vfm-nomination-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #007cba;
    font-size: 14px;
}

.vfm-nomination-table tr:hover {
    background-color: #f8f9fa;
}

.vfm-nomination-table a {
    color: #007cba;
    text-decoration: none;
    word-break: break-all;
    font-size: 14px;
    line-height: 1.4;
}

.vfm-nomination-table a:hover {
    text-decoration: underline;
}

.vfm-no-nominations {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    text-align: center;
    margin: 15px 0;
    font-size: 14px;
    line-height: 1.4;
}

.vfm-nomination-footer {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
}

/* Enhanced Button Styling */
.vfm-nomination-footer .button {
    font-size: 16px;
    padding: 12px 25px;
    line-height: 1.4;
    background: #007cba;
    border: none;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,124,186,0.3);
}

.vfm-nomination-footer .button:hover {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,124,186,0.4);
}

.vfm-nomination-footer .button:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,124,186,0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .vote-flow-nomination-list {
        padding: 15px;
        font-size: 14px;
    }

    .vfm-nomination-intro {
        padding: 15px;
        font-size: 14px;
        line-height: 1.4;
    }

    .vfm-tabs {
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
        border-radius: 5px;
        margin-bottom: 5px;
        padding: 8px 12px;
        font-size: 14px;
        line-height: 1.3;
    }

    .vfm-category-section h3 {
        font-size: 1.2em;
        margin-bottom: 10px;
        padding-bottom: 5px;
    }

    .vfm-nomination-table th,
    .vfm-nomination-table td {
        padding: 8px 10px;
        font-size: 13px;
        line-height: 1.3;
    }

    .vfm-nomination-table a {
        font-size: 13px;
        line-height: 1.3;
    }

    .vfm-nomination-footer .button {
        width: 100%;
        padding: 12px 15px;
        font-size: 14px;
        line-height: 1.3;
    }
}

@media (max-width: 480px) {
    .vote-flow-nomination-list {
        padding: 10px;
        font-size: 13px;
    }

    .vfm-category-section h3 {
        font-size: 1.1em;
    }

    .vfm-nomination-table-wrapper {
        font-size: 0.9em;
    }

    .vfm-nomination-table th,
    .vfm-nomination-table td {
        padding: 6px 8px;
        font-size: 12px;
    }

    .vfm-nomination-table a {
        font-size: 12px;
    }
}

/* ==========================================================================
   Ballot ([vote_flow_ballot])
   ========================================================================== */

.vote-flow-ballot {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 16px;
}

.vfm-ballot-intro {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 4px solid #007cba;
    font-size: 16px;
    line-height: 1.5;
}

.vfm-ballot-layout {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.vfm-ballot-categories {
    flex: 1 1 auto;
    min-width: 0;
}

.vfm-nomination-link-column,
.vfm-nomination-vote-column {
    white-space: nowrap;
    width: 1%;
}

/* Link-to-website button - deliberately the visual inverse of
   .vfm-vote-toggle below (outline instead of filled), so it reads as the
   secondary action on the row and the vote button stays the one that
   draws the eye. Icon-only, same square footprint as .vfm-vote-toggle
   for a tidy pair of buttons on each row - the destination URL is still
   reachable via title (hover tooltip) and a "Link" aria-label (screen
   readers), same pattern as the vote button's label. */
.vfm-nomination-link-button {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: transparent;
    color: #007cba;
    border: 1px solid #007cba;
    padding: 0;
    border-radius: 4px;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.vfm-nomination-link-button:hover {
    background: #007cba;
    color: #fff;
}

.vfm-globe-icon {
    flex-shrink: 0;
}

/* "+ Zur Wahl" toggle button on each nomination row - icon-only (an
   outlined star to add, a gold-filled star once added, "favorite"
   metaphor) rather than a text label. The German label ("Zur Wahl
   hinzufügen"/"Hinzugefügt") made for a noticeably wide button; the full
   label still reaches everyone via title (hover tooltip) and aria-label
   (screen readers), set in vote-flow-ballot.js. Both SVG icons are always
   in the markup, toggled by vfm-vote-selected below - no JS DOM swap
   needed. The filled star uses a literal gold fill (#ffd54a), not
   currentColor, so it stays gold regardless of the button's own
   color/background. */
.vfm-vote-toggle {
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 34px;
    background: #007cba;
    color: #fff;
    border: 1px solid #007cba;
    padding: 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.vfm-vote-toggle:hover:not(:disabled) {
    background: #005a87;
}

.vfm-vote-toggle.vfm-vote-selected {
    background: #28a745;
    border-color: #28a745;
}

.vfm-vote-toggle:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #666;
    cursor: not-allowed;
}

.vfm-vote-toggle .vfm-icon-added {
    display: none;
}

.vfm-vote-toggle.vfm-vote-selected .vfm-icon-add {
    display: none;
}

.vfm-vote-toggle.vfm-vote-selected .vfm-icon-added {
    display: block;
}

/* Ballot panel - sticky on desktop, stacked below the categories on mobile
   (see the max-width: 768px block below) */
.vfm-ballot-panel {
    flex: 0 0 320px;
    position: sticky;
    top: 30px;
    max-height: calc(100vh - 60px);
    overflow-y: auto;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.vfm-ballot-panel h3 {
    margin: 0 0 15px;
    font-size: 1.2em;
    line-height: 1.4;
}

.vfm-ballot-empty {
    color: #666;
    font-size: 13px;
    font-style: italic;
}

.vfm-ballot-group {
    margin-bottom: 16px;
}

.vfm-ballot-group h4 {
    margin: 0 0 6px;
    padding-bottom: 4px;
    border-bottom: 1px solid #ddd;
    font-size: 14px;
    color: #333;
}

.vfm-ballot-group h4.vfm-ballot-over-max {
    color: #dc3232;
    border-bottom-color: #dc3232;
}

.vfm-ballot-group-items {
    list-style: none;
    margin: 0;
    padding: 0;
}

.vfm-ballot-group-items li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 4px 0;
    font-size: 13px;
    line-height: 1.4;
}

/* Icon-only, deliberately not styled as a button - a small trash icon
   next to each ballot line is enough, it doesn't need to compete
   visually with the vote/link buttons in the category list above. */
.vfm-vote-remove {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    background: none;
    border: none;
    color: #dc3232;
    cursor: pointer;
    padding: 0;
}

.vfm-vote-remove:hover {
    color: #a00;
}

.vfm-ballot-form p {
    margin: 12px 0;
}

.vfm-ballot-form label {
    display: block;
    margin-bottom: 4px;
    font-size: 13px;
    font-weight: 600;
}

.vfm-ballot-form input[type="email"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.vfm-ballot-form input[type="checkbox"] {
    margin-right: 6px;
}

/* #e67e22 (the original orange) only reached ~2.85:1 contrast with white
   text - well under the 4.5:1 WCAG AA requires for normal-size text.
   #b35900/#944b00 below are the same orange hue, darkened until white
   text clears 4.5:1 (verified ~4.8:1 / ~6.4:1). */
#vfm-ballot-submit {
    width: 100%;
    padding: 10px;
    font-size: 14px;
    background: #b35900;
    color: #fff;
    border: 1px solid #b35900;
    border-radius: 4px;
    cursor: pointer;
}

#vfm-ballot-submit:hover:not(:disabled) {
    background: #944b00;
    border-color: #944b00;
}

#vfm-ballot-submit:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #fff;
    cursor: not-allowed;
}

.vfm-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 8px;
    vertical-align: middle;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: vfm-spin 0.7s linear infinite;
}

@keyframes vfm-spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .vote-flow-ballot {
        padding: 15px;
        font-size: 14px;
    }

    .vfm-ballot-intro {
        padding: 15px;
        font-size: 14px;
        line-height: 1.4;
    }

    .vfm-ballot-layout {
        flex-direction: column;
    }

    .vfm-ballot-panel {
        position: static;
        flex-basis: auto;
        width: 100%;
        max-height: none;
        box-sizing: border-box;
    }
}
