/* Ühisaeg — Doodle-stiilis ühisaja küsitlus */

/* Tumedas režiimis renderdab brauser kuupäeva/kellaaja väljade kalendri- ja
   kellaikooni mustana (nähtamatu). color-scheme: dark muudab ikooni heledaks
   ja ka native kalendripopupi tumedaks. */
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="time"],
[data-theme="dark"] input[type="datetime-local"] {
    color-scheme: dark;
}

.uhisaeg-options-list .option-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    border: 1px solid var(--border-color, #dbdbdb);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: var(--bg-card, #fff);
    flex-wrap: wrap;
}

.uhisaeg-options-list .option-row input[type="date"],
.uhisaeg-options-list .option-row input[type="time"] {
    max-width: 150px;
}

.uhisaeg-options-list .option-row .option-text-input {
    flex: 1;
    min-width: 150px;
}

.uhisaeg-options-list .option-row .remove-option-btn {
    min-width: 36px;
    min-height: 36px;
    touch-action: manipulation;
}

/* Mobiil: option-row sisendid lähevad eraldi ridadele, vajadusel kaks korraga */
@media (max-width: 600px) {
    .uhisaeg-options-list .option-row {
        gap: 0.4rem;
        padding: 0.6rem;
    }
    .uhisaeg-options-list .option-row input[type="date"],
    .uhisaeg-options-list .option-row input[type="time"] {
        max-width: none;
        flex: 1 1 calc(50% - 0.4rem);
    }
    .uhisaeg-options-list .option-row .option-text-input {
        flex: 1 1 100%;
        min-width: 0;
    }
    .uhisaeg-options-list .option-row .remove-option-btn {
        margin-left: auto;
    }
}

/* Hääletustabel */
.uhisaeg-vote-grid {
    display: grid;
    gap: 0.75rem;
}

.uhisaeg-vote-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.75rem;
    align-items: center;
    padding: 0.75rem;
    border: 1px solid var(--border-color, #dbdbdb);
    border-radius: 6px;
    background: var(--bg-card, #fff);
}

.uhisaeg-vote-row .option-label {
    font-weight: 600;
    color: var(--text-primary, #363636);
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.uhisaeg-vote-row .option-label .option-label-text {
    flex: 1 1 auto;
    min-width: 0;
    word-break: break-word;
}

.uhisaeg-vote-row .option-label .option-date {
    color: var(--accent-color, #3273dc);
}

/* "Terve päeva" variant — kuupäev ja vastusenupud samal real (eraldi kuupäevariba pole) */
.uhisaeg-vote-row.is-allday {
    background: var(--bg-secondary, #f5f7fa);
    margin-top: 0.75rem;
}
.uhisaeg-vote-row.is-allday:first-child {
    margin-top: 0;
}
.uhisaeg-vote-row.is-allday .option-label .weekday {
    display: inline-block;
    background: var(--accent-color, #3273dc);
    color: #fff;
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
    flex: 0 0 auto;
}
[data-theme="dark"] .uhisaeg-vote-row.is-allday {
    background: var(--bg-secondary, #2c2c2c);
}

.uhisaeg-add-comment-btn {
    background: transparent;
    border: 1px dashed var(--border-color, #dbdbdb);
    color: var(--text-muted, #7a7a7a);
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-weight: 400;
    transition: all 0.15s;
}
.uhisaeg-add-comment-btn:hover {
    background: var(--bg-hover, #ebebeb);
    color: var(--text-primary, #363636);
    border-style: solid;
}
.uhisaeg-add-comment-btn.is-active {
    background: var(--accent-color, #3273dc);
    color: #fff;
    border-color: var(--accent-color, #3273dc);
    border-style: solid;
}
.uhisaeg-add-comment-btn .icon {
    font-size: 0.85rem;
}

.uhisaeg-state-buttons {
    display: inline-flex;
    gap: 0.25rem;
    background: var(--bg-secondary, #f5f5f5);
    border-radius: 6px;
    padding: 0.2rem;
}

.uhisaeg-state-btn {
    border: none;
    background: transparent;
    color: var(--text-secondary, #4a4a4a);
    padding: 0.4rem 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.15s;
    font-size: 0.95rem;
    /* Mobile: vältida double-tap zoom-i state nupul */
    touch-action: manipulation;
    min-height: 38px;
}

.uhisaeg-state-btn:hover {
    background: var(--bg-hover, #ebebeb);
}

.uhisaeg-state-btn.active.state-yes {
    background: #48c774;
    color: #fff;
}
.uhisaeg-state-btn.active.state-maybe {
    background: #ffdd57;
    color: #363636;
}
.uhisaeg-state-btn.active.state-no {
    background: #f14668;
    color: #fff;
}

.uhisaeg-state-btn .icon {
    margin-right: 0.25rem;
}

.uhisaeg-option-comment {
    grid-column: 1 / -1;
    margin-top: 0.25rem;
}

.uhisaeg-option-comment textarea {
    width: 100%;
    min-height: 2.3em;
    font-size: 0.9rem;
}

/* Tulemuste tabel (admin) */
.uhisaeg-results-wrap {
    overflow-x: auto;
    /* Mobile: visuaalne vihje, et tabel kerib horisontaalselt */
    background:
        linear-gradient(to right, var(--bg-card, #fff) 30%, rgba(255,255,255,0)),
        linear-gradient(to right, rgba(255,255,255,0), var(--bg-card, #fff) 70%) 100% 0,
        radial-gradient(farthest-side at 0 50%, rgba(0,0,0,0.12), rgba(0,0,0,0)),
        radial-gradient(farthest-side at 100% 50%, rgba(0,0,0,0.12), rgba(0,0,0,0)) 100% 0;
    background-repeat: no-repeat;
    background-size: 30px 100%, 30px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
    /* iOS-i hõõrdumatu kerimine */
    -webkit-overflow-scrolling: touch;
}

[data-theme="dark"] .uhisaeg-results-wrap {
    background:
        linear-gradient(to right, var(--bg-card, #1f1f1f) 30%, rgba(0,0,0,0)),
        linear-gradient(to right, rgba(0,0,0,0), var(--bg-card, #1f1f1f) 70%) 100% 0,
        radial-gradient(farthest-side at 0 50%, rgba(255,255,255,0.18), rgba(255,255,255,0)),
        radial-gradient(farthest-side at 100% 50%, rgba(255,255,255,0.18), rgba(255,255,255,0)) 100% 0;
    background-repeat: no-repeat;
    background-size: 30px 100%, 30px 100%, 14px 100%, 14px 100%;
    background-attachment: local, local, scroll, scroll;
}

table.uhisaeg-results {
    border-collapse: collapse;
    min-width: 100%;
    background: var(--bg-card, #fff);
}

/* Variandi-veergude min/max-width — vältida liiga kitsast ja liiga laia */
table.uhisaeg-results thead th:not(.voter-name) {
    min-width: 100px;
    max-width: 180px;
    word-break: break-word;
}

table.uhisaeg-results th,
table.uhisaeg-results td {
    border: 1px solid var(--border-color, #dbdbdb);
    padding: 0.5rem 0.75rem;
    text-align: center;
    vertical-align: middle;
    color: var(--text-primary, #363636);
}

/* Header'i õrn esiletõst — õrn külm hall */
table.uhisaeg-results thead th {
    background: #eef2f7;
    color: var(--text-primary, #363636);
    font-weight: 600;
    padding: 0.6rem 0.75rem;
}

/* Kuupäeva grupi päis tabelis (Doodle muster) */
table.uhisaeg-results thead tr.date-group-row th.date-header {
    background: #e1e7ef;
    border-bottom: 1px solid var(--border-color, #dbdbdb);
    font-size: 0.95rem;
    padding: 0.5rem 0.5rem;
    text-align: center;
    line-height: 1.2;
}
table.uhisaeg-results thead tr.date-group-row th.date-header .weekday {
    display: inline-block;
    background: var(--accent-color, #3273dc);
    color: #fff;
    border-radius: 3px;
    padding: 0.05rem 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    margin-right: 0.3rem;
}
table.uhisaeg-results thead tr.date-group-row th.date-header .date-label {
    font-weight: 600;
}
[data-theme="dark"] table.uhisaeg-results thead tr.date-group-row th.date-header {
    background: #353d4a;
}
/* Liidetud "terve päeva" päis, mis on ühtlasi parim variant — roheline taust
   peab üle kaaluma date-header'i halli (sama spetsiifilisusega reegel) */
table.uhisaeg-results thead tr.date-group-row th.date-header.best-fit {
    background: #48c774;
    color: #fff;
}
table.uhisaeg-results thead tr.date-group-row th.date-header.best-fit .weekday {
    background: rgba(255, 255, 255, 0.3);
}
[data-theme="dark"] table.uhisaeg-results thead tr.date-group-row th.date-header.best-fit {
    background: #2f9e5f;
}

/* Vote-grid (hääletamise vorm) — kuupäeva grupi päis */
.uhisaeg-vote-group-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary, #f5f7fa);
    border-radius: 6px;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    font-weight: 600;
    color: var(--text-primary, #363636);
}
.uhisaeg-vote-group-header:first-child {
    margin-top: 0;
}
.uhisaeg-vote-group-header .weekday {
    display: inline-block;
    background: var(--accent-color, #3273dc);
    color: #fff;
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    font-size: 0.8rem;
    font-weight: 700;
}
.uhisaeg-vote-group-header .date-label {
    font-size: 0.95rem;
}
[data-theme="dark"] .uhisaeg-vote-group-header {
    background: var(--bg-secondary, #2c2c2c);
    color: var(--text-primary, #e0e0e0);
}

/* "Kopeeri see päev" nupp create-vormis */
.copy-day-btn {
    min-width: 36px;
    min-height: 36px;
    touch-action: manipulation;
}

/* Draft localStorage banner — selgelt nähtav, aga mitte hirmutav */
#draft-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    position: relative;
}
/* CSS display: flex tühistab HTML5 [hidden] atribuudi — vajame eraldi reegli */
#draft-banner[hidden] {
    display: none !important;
}
#draft-banner .icon {
    flex-shrink: 0;
}
@media (max-width: 480px) {
    #draft-banner {
        font-size: 0.9rem;
    }
    #draft-banner .button {
        margin-left: 0 !important;
    }
}

table.uhisaeg-results th.voter-name,
table.uhisaeg-results td.voter-name {
    text-align: left;
    font-weight: 500;
    background: var(--bg-secondary, #fafafa);
    position: sticky;
    left: 0;
    z-index: 1;
}

table.uhisaeg-results th.best-fit {
    background: #48c774;
    color: #fff;
}

table.uhisaeg-results td.best-fit-col {
    background: rgba(72, 199, 116, 0.08);
}

table.uhisaeg-results .resp-yes {
    color: #48c774;
    font-size: 1.2rem;
}
table.uhisaeg-results .resp-maybe {
    color: #d49b06;
    font-size: 1.2rem;
}
table.uhisaeg-results .resp-no {
    color: #f14668;
    font-size: 1.2rem;
}
table.uhisaeg-results .resp-empty {
    color: var(--text-muted, #b5b5b5);
}

/* Kommentaari ikoon — inline, vastuse märgi kõrval */
table.uhisaeg-results td.has-comment {
    position: relative;
}
table.uhisaeg-results .comment-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: var(--text-muted, #b5b5b5);
    cursor: pointer;
    padding: 1px 4px;
    border-radius: 3px;
    line-height: 1;
    font-size: 0.75rem;
    vertical-align: middle;
    margin-left: 0.25rem;
    transition: color 0.15s, background 0.15s;
}
table.uhisaeg-results .comment-toggle:hover,
table.uhisaeg-results .comment-toggle[aria-expanded="true"] {
    color: var(--accent-color, #3273dc);
    background: var(--bg-hover, #ebebeb);
}
table.uhisaeg-results .option-comment-popover {
    position: absolute;
    top: calc(100% - 2px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 50;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #363636);
    border: 1px solid var(--border-color, #dbdbdb);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
    min-width: 180px;
    max-width: 280px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.85rem;
    text-align: left;
    white-space: normal;
    word-break: break-word;
    line-height: 1.4;
    outline: none;
}
table.uhisaeg-results .option-comment-popover:focus {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12), 0 0 0 2px var(--accent-color, #3273dc);
}
/* Voter-name veerus (esimene) — popover joonduda vasakule, mitte üle ääre */
table.uhisaeg-results td.voter-name .option-comment-popover {
    left: 0;
    transform: none;
}
table.uhisaeg-results .option-comment-popover[hidden] {
    display: none;
}

/* Voter-info flex paigutus — nimi + e-mail + kommentaariikoon kõrvuti desktop'is */
table.uhisaeg-results .voter-info {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4rem 0.6rem;
}
table.uhisaeg-results .voter-display-name {
    font-weight: 500;
}
table.uhisaeg-results .voter-display-email {
    font-size: 0.78rem;
    color: var(--text-muted, #7a7a7a);
    font-weight: 400;
    word-break: break-all;
}
/* Mobiilil paigutame nime ja e-maili eraldi ridadele */
@media (max-width: 640px) {
    table.uhisaeg-results .voter-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.15rem;
    }
}

/* "Kokku" / summary rida — õrn soe toon, eristub päise külmast hallist */
table.uhisaeg-results tfoot tr.summary-row td {
    background: #f5f1ea;
    font-weight: 600;
    font-size: 1rem;
    padding: 0.7rem 0.75rem;
}

table.uhisaeg-results tfoot .summary-yes-count {
    color: #48c774;
    font-size: 1.25rem;
    font-weight: 700;
}
table.uhisaeg-results tfoot .summary-maybe-count {
    color: #d49b06;
    font-weight: 600;
}
table.uhisaeg-results tfoot .summary-no-count {
    color: #f14668;
    font-weight: 600;
}
table.uhisaeg-results tfoot .summary-sep {
    color: var(--text-muted, #b5b5b5);
    margin: 0 0.15rem;
}

.uhisaeg-best-banner {
    background: rgba(72, 199, 116, 0.12);
    border-left: 4px solid #48c774;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
    color: var(--text-primary, #363636);
}

/* Tumeda režiimi kohendused */
[data-theme="dark"] .uhisaeg-state-buttons {
    background: var(--bg-secondary, #2c2c2c);
}
[data-theme="dark"] .uhisaeg-state-btn.active.state-maybe {
    background: #f0c000;
    color: #1a1a1a;
}
[data-theme="dark"] table.uhisaeg-results th.voter-name,
[data-theme="dark"] table.uhisaeg-results td.voter-name {
    background: var(--bg-secondary, #2c2c2c);
}
[data-theme="dark"] table.uhisaeg-results thead th {
    background: #2a323d;
    color: var(--text-primary, #e0e0e0);
}
/* Parima variandi päis peab ka tumedas režiimis roheliseks jääma
   (üldine thead-reegel ülal on spetsiifilisem kui hele th.best-fit) */
[data-theme="dark"] table.uhisaeg-results thead th.best-fit {
    background: #2f9e5f;
    color: #fff;
}
[data-theme="dark"] table.uhisaeg-results tfoot tr.summary-row td {
    background: #2a323d;
}
/* Täisvärv, mitte läbipaistev kiht — alpha tumesinise peal annab "pori" tooni */
[data-theme="dark"] table.uhisaeg-results td.best-fit-col {
    background: #1d3a2a;
}
[data-theme="dark"] table.uhisaeg-results .voter-comment {
    color: var(--text-muted, #9a9a9a);
    border-top-color: var(--border-color, #3a3a3a);
}
[data-theme="dark"] table.uhisaeg-results .option-comment-popover {
    background: var(--bg-card, #2a2a2a);
    color: var(--text-primary, #e0e0e0);
    border-color: var(--border-color, #3a3a3a);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .uhisaeg-best-banner {
    background: #1d3a2a;
    color: var(--text-primary, #e0e0e0);
}

/* Mobiilis kompaktsem JA touch-friendly */
@media (max-width: 640px) {
    .uhisaeg-vote-row {
        grid-template-columns: 1fr;
    }
    .uhisaeg-state-buttons {
        justify-self: stretch;
        display: flex;
        width: 100%;
    }
    .uhisaeg-state-btn {
        padding: 0.55rem 0.6rem;
        font-size: 0.9rem;
        min-height: 44px;
        flex: 1;
    }
    /* Sticky voter-name veerg ei tohi ekraani ära katta */
    table.uhisaeg-results th.voter-name,
    table.uhisaeg-results td.voter-name {
        max-width: 120px;
        min-width: 90px;
    }
    table.uhisaeg-results .voter-display-name {
        word-break: break-word;
    }
    /* Popover mahub ekraani — max 90vw */
    table.uhisaeg-results .option-comment-popover {
        max-width: min(280px, 90vw);
    }
    /* Variandi-veergude min-width väiksem mobiilil */
    table.uhisaeg-results thead th:not(.voter-name) {
        min-width: 85px;
        max-width: 140px;
        font-size: 0.85rem;
    }
    /* Vastuse märk mobiilil natuke väiksem, et lahter mahuks */
    table.uhisaeg-results .resp-yes,
    table.uhisaeg-results .resp-maybe,
    table.uhisaeg-results .resp-no {
        font-size: 1.05rem;
    }
    /* Komment-toggle ja delete nupud — suuremad touch-targetid */
    table.uhisaeg-results .comment-toggle {
        min-width: 24px;
        min-height: 24px;
        padding: 4px 6px;
    }
}

/* Veel kitsam ekraan — pohil 360px */
@media (max-width: 380px) {
    .uhisaeg-state-btn {
        padding: 0.5rem 0.3rem;
        font-size: 0.85rem;
    }
    .uhisaeg-state-btn .icon {
        margin-right: 0.1rem;
    }
}

/* Osaleja-lisatud variantide tähistus */
.option-added-by {
    display: inline-flex;
    align-items: center;
    gap: 0.2rem;
    font-size: 0.72rem;
    color: var(--text-muted, #7a7a7a);
    background: rgba(72, 199, 116, 0.1);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-weight: 400;
}
.option-added-by .icon {
    font-size: 0.7rem;
}

.uhisaeg-delete-own-option {
    background: transparent;
    border: 0;
    color: var(--text-muted, #b5b5b5);
    cursor: pointer;
    padding: 0.15rem 0.35rem;
    border-radius: 3px;
    line-height: 1;
}
.uhisaeg-delete-own-option:hover {
    color: #f14668;
    background: rgba(241, 70, 104, 0.08);
}

.th-added-by {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    margin-top: 0.25rem;
    font-size: 0.7rem;
    font-weight: 400;
    color: var(--text-muted, #7a7a7a);
    background: rgba(72, 199, 116, 0.12);
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
}
.th-added-by .icon {
    font-size: 0.65rem;
}
table.uhisaeg-results th.best-fit .th-added-by {
    background: rgba(255, 255, 255, 0.25);
    color: #fff;
}

.th-delete-option-btn {
    background: transparent;
    border: 0;
    color: inherit;
    cursor: pointer;
    padding: 0 0.15rem;
    margin-left: 0.15rem;
    line-height: 1;
    opacity: 0.7;
}
.th-delete-option-btn:hover {
    opacity: 1;
    color: #f14668;
}

.th-ics-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted, #7a7a7a);
    margin-left: 0.3rem;
    padding: 0.15rem;
    border-radius: 3px;
    opacity: 0.7;
    transition: all 0.15s;
}
.th-ics-btn:hover {
    color: var(--accent-color, #3273dc);
    opacity: 1;
    background: rgba(50, 115, 220, 0.1);
}
table.uhisaeg-results th.best-fit .th-ics-btn {
    color: #fff;
    opacity: 0.85;
}
table.uhisaeg-results th.best-fit .th-ics-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    opacity: 1;
}

/* "Lisa uus variant" vorm */
.uhisaeg-add-option-form {
    background: var(--bg-secondary, #fafafa);
    border: 1px dashed var(--border-color, #dbdbdb);
    border-radius: 4px;
    padding: 0.6rem;
}
.uhisaeg-add-option-form[hidden] {
    display: none;
}

/* Mobiil: lisa-uus-variant vorm + nupud mahuvad */
@media (max-width: 640px) {
    .uhisaeg-add-option-form .field.is-grouped > .control {
        flex-basis: auto;
    }
    .uhisaeg-add-option-form input.input {
        font-size: 16px; /* vältida iOS zoom-i sisendiväljal */
    }
    #add-option-submit,
    #add-option-cancel {
        min-height: 38px;
    }
    /* Lisa-märkus nupp ainult ikoonina, mahub kompaktselt */
    .uhisaeg-add-comment-btn .add-comment-label {
        display: none;
    }
    .uhisaeg-add-comment-btn {
        min-width: 32px;
        min-height: 32px;
        padding: 0.25rem 0.4rem;
    }
}

/* Touch target — kustutamise nupp osaleja-lisatud variantidel */
.uhisaeg-delete-own-option {
    min-width: 28px;
    min-height: 28px;
    touch-action: manipulation;
}

/* Touch target — comment-toggle */
table.uhisaeg-results .comment-toggle {
    touch-action: manipulation;
}

/* Admin action nupud — mobiilil mahuvad korralikult kerimisega */
.uhisaeg-poll-card .poll-actions .button {
    min-height: 36px;
    touch-action: manipulation;
}

@media (max-width: 640px) {
    .uhisaeg-poll-card {
        flex-wrap: wrap;
    }
    .uhisaeg-poll-card .poll-meta {
        flex: 1 1 100%;
    }
    .uhisaeg-poll-card .poll-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
    }
    /* Admin tabel-tegevuste veerg — kustutamise nupu touch */
    table.uhisaeg-results .delete-voter-btn {
        min-width: 38px;
        min-height: 38px;
        touch-action: manipulation;
    }
    /* Sisendiväljad — vältida iOS zoom-i */
    .uhisaeg-options-list input.input,
    .uhisaeg-options-list select.input {
        font-size: 16px;
    }
}

[data-theme="dark"] .uhisaeg-add-option-form {
    background: var(--bg-secondary, #2a2a2a);
}
[data-theme="dark"] .option-added-by,
[data-theme="dark"] .th-added-by {
    background: #1d3a2a;
    color: var(--text-secondary, #b5e6c8);
}

/* Loend "minu küsitlused" */
.uhisaeg-poll-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border-color, #dbdbdb);
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background: var(--bg-card, #fff);
    gap: 1rem;
}

.uhisaeg-poll-card .poll-meta {
    flex: 1;
    min-width: 0;
}

.uhisaeg-poll-card .poll-title {
    font-weight: 600;
    color: var(--text-primary, #363636);
    word-break: break-word;
}

.uhisaeg-poll-card .poll-stats {
    font-size: 0.85rem;
    color: var(--text-muted, #7a7a7a);
    margin-top: 0.15rem;
}

.uhisaeg-poll-card .poll-actions {
    display: flex;
    gap: 0.4rem;
    flex-wrap: wrap;
}

.uhisaeg-closed-badge {
    display: inline-block;
    background: var(--bg-secondary, #f5f5f5);
    color: var(--text-muted, #7a7a7a);
    padding: 0.1rem 0.4rem;
    border-radius: 3px;
    font-size: 0.75rem;
    margin-left: 0.4rem;
}
