/* Konu anketi — oy öncesi / sonrası aynı kart düzeni */

.topic-poll-panel {
    overflow: hidden;
}

.topic-poll-body {
    position: relative;
    z-index: 1;
    padding: 0.95rem 1rem 1.05rem;
}

.topic-poll-question {
    margin: 0 0 0.55rem;
    font-family: var(--site-font-title, inherit);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--text-color);
}

[data-bs-theme="dark"] .topic-poll-question {
    color: var(--dark-text-color);
}

.topic-poll-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem 0.95rem;
    margin-bottom: 0.85rem;
    font-size: 0.76rem;
    line-height: 1.35;
    color: var(--secondary-text-color-hex, var(--bs-secondary-color));
}

[data-bs-theme="dark"] .topic-poll-meta {
    color: var(--dark-secondary-text-color-hex, var(--bs-secondary-color));
}

.topic-poll-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    white-space: nowrap;
}

.topic-poll-meta-item i {
    font-size: 0.72rem;
    opacity: 0.85;
}

.topic-poll-meta-item--accent {
    color: var(--wow-section-header-text, var(--primary-color));
}

.topic-poll-form {
    width: 100%;
    max-width: 100%;
}

.topic-poll-options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.45rem;
    width: 100%;
}

.topic-poll-option {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    margin: 0;
    min-width: 0;
}

.topic-poll-option-label {
    display: block;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.topic-poll-option-label--static {
    cursor: default;
}

.topic-poll-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Ortak kart — oy verme ve sonuç aynı boyut */
.topic-poll-option-card {
    display: flex;
    flex-direction: column;
    gap: 0.38rem;
    width: auto;
    min-width: 5.5rem;
    max-width: min(100%, 14rem);
    min-height: 3.35rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid rgba(var(--text-color-rgb), 0.18);
    border-radius: var(--site-box-radius, 4px);
    background: rgb(var(--background-color-rgb));
    box-sizing: border-box;
    transition: border-color 0.18s ease, background 0.18s ease;
}

[data-bs-theme="dark"] .topic-poll-option-card {
    border-color: rgba(var(--dark-text-color-rgb, 160, 184, 207), 0.2);
    background: rgba(255, 255, 255, 0.035);
}

.topic-poll-option-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    min-height: 1.35rem;
}

.topic-poll-option-label:hover .topic-poll-option-card {
    border-color: rgba(var(--text-color-rgb), 0.32);
    background: rgba(var(--text-color-rgb), 0.03);
}

[data-bs-theme="dark"] .topic-poll-option-label:hover .topic-poll-option-card {
    border-color: rgba(var(--dark-text-color-rgb, 160, 184, 207), 0.34);
    background: rgba(255, 255, 255, 0.05);
}

.topic-poll-input:checked + .topic-poll-option-card,
.topic-poll-option--selected .topic-poll-option-card {
    border-color: color-mix(in srgb, var(--wow-section-header-text, var(--primary-color)) 48%, transparent);
    background: color-mix(in srgb, var(--wow-section-header-text, var(--primary-color)) 8%, rgb(var(--background-color-rgb)));
}

[data-bs-theme="dark"] .topic-poll-input:checked + .topic-poll-option-card,
[data-bs-theme="dark"] .topic-poll-option--selected .topic-poll-option-card {
    border-color: color-mix(in srgb, var(--wow-section-header-text, var(--dark-primary-color)) 55%, transparent);
    background: color-mix(in srgb, var(--wow-section-header-text, var(--dark-primary-color)) 10%, rgba(255, 255, 255, 0.035));
}

.topic-poll-option-label:focus-within .topic-poll-option-card {
    outline: 2px solid color-mix(in srgb, var(--wow-section-header-text, var(--primary-color)) 45%, transparent);
    outline-offset: 1px;
}

/* İnce seçim halkası — çift piksel boyut, nokta flex ile ortalı */
.topic-poll-option-indicator {
    position: relative;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(var(--text-color-rgb), 0.32);
    border-radius: 999px;
    background: transparent;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

[data-bs-theme="dark"] .topic-poll-option-indicator {
    border-color: rgba(var(--dark-text-color-rgb, 160, 184, 207), 0.4);
}

.topic-poll-form[data-allow-multiple="1"] .topic-poll-option-indicator {
    border-radius: 3px;
}

.topic-poll-input:checked + .topic-poll-option-card .topic-poll-option-indicator,
.topic-poll-option-indicator.is-checked {
    border-color: var(--wow-section-header-text, var(--primary-color));
}

[data-bs-theme="dark"] .topic-poll-input:checked + .topic-poll-option-card .topic-poll-option-indicator,
[data-bs-theme="dark"] .topic-poll-option-indicator.is-checked {
    border-color: var(--wow-section-header-text, var(--dark-primary-color));
}

.topic-poll-input:checked + .topic-poll-option-card .topic-poll-option-indicator::after,
.topic-poll-option-indicator.is-checked::after {
    content: "";
    display: block;
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--wow-section-header-text, var(--primary-color));
    flex-shrink: 0;
}

.topic-poll-form[data-allow-multiple="1"] .topic-poll-input:checked + .topic-poll-option-card .topic-poll-option-indicator::after,
.topic-poll-form[data-allow-multiple="1"] .topic-poll-option-indicator.is-checked::after {
    width: 5px;
    height: 5px;
    border-radius: 2px;
}

[data-bs-theme="dark"] .topic-poll-input:checked + .topic-poll-option-card .topic-poll-option-indicator::after,
[data-bs-theme="dark"] .topic-poll-option-indicator.is-checked::after {
    background: var(--wow-section-header-text, var(--dark-primary-color));
}

.topic-poll-option-text {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-color);
    word-break: break-word;
}

[data-bs-theme="dark"] .topic-poll-option-text {
    color: var(--dark-text-color);
}

.topic-poll-result-stats {
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 0.35rem;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.2;
    color: var(--secondary-text-color-hex, var(--bs-secondary-color));
    white-space: nowrap;
}

[data-bs-theme="dark"] .topic-poll-result-stats {
    color: var(--dark-secondary-text-color-hex, var(--bs-secondary-color));
}

/* Progress — her zaman aynı yükseklikte iz (oy vermeden önce de) */
.topic-poll-option-bar-wrap {
    display: block;
    height: 0.28rem;
    background: rgba(var(--text-color-rgb), 0.08);
    border-radius: 999px;
    overflow: hidden;
}

[data-bs-theme="dark"] .topic-poll-option-bar-wrap {
    background: rgba(var(--dark-text-color-rgb, 160, 184, 207), 0.12);
}

.topic-poll-option-bar {
    display: block;
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    background: color-mix(in srgb, var(--wow-section-header-text, var(--primary-color)) 88%, transparent);
    transition: width 0.35s ease;
}

[data-bs-theme="dark"] .topic-poll-option-bar {
    background: color-mix(in srgb, var(--wow-section-header-text, var(--dark-primary-color)) 88%, transparent);
}

.topic-poll-option--selected .topic-poll-option-bar {
    background: var(--wow-section-header-text, var(--primary-color));
}

[data-bs-theme="dark"] .topic-poll-option--selected .topic-poll-option-bar {
    background: var(--wow-section-header-text, var(--dark-primary-color));
}

.topic-poll-actions {
    margin-top: 0.75rem;
}

@media (max-width: 575.98px) {
    .topic-poll-body {
        padding: 0.8rem 0.85rem 0.95rem;
    }

    .topic-poll-option {
        flex: 1 1 calc(50% - 0.25rem);
        min-width: calc(50% - 0.25rem);
    }

    .topic-poll-option-card {
        width: 100%;
        max-width: 100%;
    }

    .topic-poll-option-row {
        flex-wrap: wrap;
    }

    .topic-poll-result-stats {
        margin-left: 1.26rem;
        padding-left: 0;
        white-space: normal;
    }
}

@media (min-width: 576px) {
    .topic-poll-option-row {
        white-space: nowrap;
    }
}
