/**
 * Polls page styles
 * Prefix: pll_
 * Reuses tokens from base.css and shared classes (rnd_l, ctnr, sde_wid, prf_*).
 */

/* ============================================
   INDEX (LIST) PAGE
   ============================================ */
.pll_index { width: 100%; }
.pll_idx_header { padding: 4px 0 12px; }
.pll_idx_title_row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}
.pll_idx_title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}
.pll_idx_sub {
    font-size: 14px;
    margin: 4px 0 14px;
    line-height: 1.5;
}
.pll_create_btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: var(--button-blue);
    color: var(--button-on-blue);
    border: none;
    border-radius: 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.pll_create_btn:hover { opacity: 0.88; }

.pll_idx_tabs {
    display: flex;
    border-bottom: 1.5px solid var(--border-color);
    padding: 0 4px;
    margin-top: 8px;
}
.pll_idx_tab {
    flex: 1;
    background: none;
    border: none;
    padding: 14px 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    position: relative;
    transition: color 0.2s;
}
.pll_idx_tab:hover { color: var(--text-primary); }
.pll_idx_tab.active {
    color: var(--text-primary);
    font-weight: 700;
}
.pll_idx_tab.active::after {
    content: '';
    position: absolute;
    bottom: -1.5px;
    left: 0; right: 0;
    height: 3px;
    border-radius: 2px 2px 0 0;
    background: var(--button-blue);
}
.pll_idx_tab_content { display: none; }
.pll_idx_tab_content.active { display: block; }

.pll_list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 14px;
}

/* ============================================
   POLL CARD (feed/list)
   ============================================ */
.pll_card {
    background: var(--container);
    padding: 16px;
    overflow: hidden;
}
.pll_card_clickable {
    text-decoration: none;
    color: inherit;
    display: block;
}
.pll_card_header {
    display: flex;
    align-items: center;
    gap: 10px;
}
.pll_card_org_avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--elevated);
    flex-shrink: 0;
}
.pll_card_org_avatar img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.pll_card_org_meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pll_card_org_name_row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pll_card_org_name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.pll_verified {
    color: var(--blue);
    font-size: 13px;
}
.pll_card_meta_sub {
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.pll_card_meta_sub i { font-size: 12px; }

/* Pills */
.pll_pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.pll_pill_paid {
    background: var(--warning-muted);
    color: var(--text-gold);
}
.pll_pill_lg {
    padding: 6px 14px;
    font-size: 13px;
}

.pll_card_question {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 12px 0 10px;
    line-height: 1.35;
}

/* Options shared between card and detail */
.pll_options,
.pll_detail_options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pll_option,
.pll_detail_option {
    --pll-pct: 0%;
    position: relative;
    width: 100%;
    background: transparent;
    border: 1.5px solid var(--border-color);
    border-radius: 10px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    text-align: left;
    transition: border-color 0.15s, background 0.15s;
}
.pll_option:hover,
.pll_detail_option:hover {
    border-color: var(--text-tertiary);
}
.pll_option_bar {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--pll-pct);
    background: var(--elevated-highlight);
    transition: width 0.3s ease-out;
    z-index: 0;
}
.pll_option_voted .pll_option_bar { background: var(--elevated); }
.pll_option_leading.pll_option_voted .pll_option_bar { background: color-mix(in srgb, var(--blue) 18%, transparent); }
.pll_option_selected .pll_option_bar { background: color-mix(in srgb, var(--blue) 28%, transparent); }

.pll_option_inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}
.pll_option_label {
    flex: 1;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.pll_option_pct {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary);
    min-width: 40px;
    text-align: right;
}
.pll_option_selected {
    border-color: var(--blue);
}
.pll_option_leading.pll_option_voted {
    border-color: var(--blue);
}

/* Detail option: shows a check circle */
.pll_detail_option { padding: 0; }
.pll_option_check {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.5px solid var(--border-color);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    font-size: 11px;
    flex-shrink: 0;
}
.pll_detail_option.pll_option_selected .pll_option_check {
    background: var(--blue);
    border-color: var(--blue);
    color: var(--button-on-blue);
}

/* Card footer */
.pll_card_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}
.pll_total_votes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}
.pll_total_votes i { font-size: 13px; color: var(--text-tertiary); }
.pll_card_view_link {
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.pll_card_view_link:hover { text-decoration: underline; }

/* ============================================
   POLL DETAIL PAGE
   ============================================ */
.pll_detail {
    background: var(--container);
    padding: 22px;
    margin-top: 12px;
}

.pll_detail_org_row {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}
.pll_detail_org_avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--elevated);
    flex-shrink: 0;
}
.pll_detail_org_avatar img {
    width: 100%; height: 100%; object-fit: cover; display: block;
}
.pll_detail_org_meta {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.pll_detail_org_name_row {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pll_detail_org_name {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}
.pll_detail_org_sub {
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}
.pll_detail_org_sub i { font-size: 13px; }

.pll_detail_question {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 18px 0 8px;
    line-height: 1.3;
}
.pll_detail_description {
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0 0 18px;
}

.pll_detail_footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    gap: 12px;
    flex-wrap: wrap;
}
.pll_detail_meta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}
.pll_detail_meta i { font-size: 14px; color: var(--text-tertiary); }
.pll_dot { color: var(--text-tertiary); }

.pll_vote_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--button-blue);
    color: var(--button-on-blue);
    border: none;
    border-radius: 22px;
    padding: 10px 22px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s;
}
.pll_vote_btn:hover { opacity: 0.88; }
.pll_vote_btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media screen and (max-width: 700px) {
    .pll_detail { padding: 18px; }
    .pll_detail_question { font-size: 19px; }
}
