/**
 * TC Polls — Frontend Styles
 * BEM-style class prefix: tc-poll
 *
 * Intentionally minimal. Inherits your theme's base font/color variables.
 * Override any rule in your theme stylesheet as needed.
 */

/* ── Wrapper ─────────────────────────────────────────────────────────────── */
.tc-poll {
    margin: 0;
    font-size: 1rem;
    max-width: 640px;
}

/* ── Title & Question ────────────────────────────────────────────────────── */
.tc-poll__title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #888;
    margin: 0 0 0.4rem;
}

.tc-poll__question {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 1.25rem;
    line-height: 1.4;
}

/* ── Choice list ─────────────────────────────────────────────────────────── */
.tc-poll__choices {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1.25rem;
}

.tc-poll__choice {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    cursor: pointer;
    padding: 0.55rem 0.75rem;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    transition: border-color 0.15s, background 0.15s;
}

.tc-poll__choice:hover {
    border-color: #aaa;
    background: #f9f9f9;
}

.tc-poll__choice:has(.tc-poll__radio:checked) {
    border-color: #1a1a1a;
    background: #f3f3f3;
}

.tc-poll__radio {
    accent-color: #1a1a1a;
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.tc-poll__choice-label {
    color: #333;
    font-size: 0.95rem;
}

/* ── Submit button ───────────────────────────────────────────────────────── */
.tc-poll__submit {
    display: inline-block;
    padding: 0.6rem 1.4rem;
    background: #1a1a1a;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s, opacity 0.15s;
}

.tc-poll__submit:hover {
    background: #333;
}

.tc-poll__submit:disabled {
    opacity: 0.55;
    cursor: default;
}

/* ── Error message ───────────────────────────────────────────────────────── */
.tc-poll__error {
    color: #c0392b;
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ── Status (closed) ─────────────────────────────────────────────────────── */
.tc-poll__status {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 0.75rem;
}

/* ── Thank-you / voted notice ────────────────────────────────────────────── */
.tc-poll__voted-notice p,
.tc-poll__thank-you p {
    font-size: 0.95rem;
    color: #2d6a4f;
    font-weight: 500;
    margin: 0 0 1rem;
}

/* ── Results list ────────────────────────────────────────────────────────── */
.tc-poll__results-list {
    margin-top: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.tc-poll__result-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 0.25rem 0.75rem;
    align-items: center;
}

.tc-poll__result-label {
    font-size: 0.9rem;
    color: #333;
    grid-column: 1;
    grid-row: 1;
}

.tc-poll__result-meta {
    font-size: 0.8rem;
    color: #666;
    white-space: nowrap;
    grid-column: 2;
    grid-row: 1 / 3;
    align-self: center;
}

.tc-poll__result-bar-wrap {
    grid-column: 1;
    grid-row: 2;
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.tc-poll__result-bar {
    height: 100%;
    background: #1a1a1a;
    border-radius: 4px;
    transition: width 0.4s ease;
    min-width: 2px;
}

.tc-poll__total {
    font-size: 0.8rem;
    color: #999;
    margin: 0.5rem 0 0;
    text-align: right;
}
