/* ── Frontend App Overrides & Extensions ─────────────────────────────────── */

/* Poll card — left-align text, keep category label centred */
.active-card {
    text-align: left;
}
.active-card h6 {
    text-align: center;
}

/* Category tab links — make <a> fill the <li> and inherit its styling */
.ctgry-tabs li a {
    display: block;
    color: inherit;
    text-decoration: none;
}

.ctgry-tabs li a:hover {
    color: inherit;
    text-decoration: none;
}

/* Header avatar photo (when user has uploaded avatar) */
.avatar-nav-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Header avatar initials (logged-in compact button) */
.avatar-nav-initials {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e40af;
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

/* Voted state badge */
.voted-state {
    display: flex;
    flex-grow: 1;
    align-items: center;
    justify-content: center;
    padding: 12px 0 4px;
}

/* When voted, card-content should not grow — let voted-state fill the space */
.active-card:has(.voted-state) .card-content {
    flex-grow: 0;
}

.voted-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(34, 197, 94, 0.12);
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
}

/* Category filter tabs (decisions page) */
.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 28px;
}

.filter-btn {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.15);
    color: #94a3b8;
    border-radius: 20px;
    padding: 7px 18px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: rgba(59,130,246,0.15);
    border-color: #3b82f6;
    color: #fff;
}

.filter-btn.active {
    background: #1e40af;
    border-color: #1e40af;
    color: #fff;
}

/* Vote button disabled state */
.vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Alert styles (flash messages) */
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #22c55e;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* Form validation error spans */
.error {
    display: block;
    color: #ef4444;
    font-size: 12px;
    margin-top: 4px;
}

/* is-invalid outline */
.form-control.is-invalid {
    border-color: #ef4444 !important;
}

/* Chart legend colors */
.legend-item.support .legend-box { background: #3b82f6; }
.legend-item.neutral .legend-box { background: #eab308; }
.legend-item.oppose  .legend-box { background: #ef4444; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.wtp-pagination {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    margin-top: 40px;
    margin-bottom: 8px;
}

.wtp-page-list {
    display: flex;
    align-items: center;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 6px 10px;
}

.wtp-page-item {
    display: flex;
}

.wtp-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #94a3b8;
    text-decoration: none;
    transition: background 0.18s ease, color 0.18s ease;
    cursor: pointer;
    border: none;
    background: transparent;
    white-space: nowrap;
}

.wtp-page-item:not(.disabled):not(.active) .wtp-page-link:hover {
    background: rgba(59, 130, 246, 0.15);
    color: #fff;
}

.wtp-page-item.active .wtp-page-link {
    background: #1e40af;
    color: #fff;
    font-weight: 600;
}

.wtp-page-item.disabled .wtp-page-link {
    opacity: 0.35;
    cursor: not-allowed;
}

.wtp-dots {
    letter-spacing: 2px;
    padding: 0 4px;
}

.wtp-page-info {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

/* ── Empty State ─────────────────────────────────────────────────────────── */
.wtp-empty-state {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    text-align: center;
    padding: 72px 24px 80px;
}

.wtp-empty-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.18);
    margin: 0 auto 24px;
}

.wtp-empty-state h3 {
    font-size: 22px;
    font-weight: 600;
    color: #f8fafc;
    margin-bottom: 10px;
    line-height: 1.3;
}

.wtp-empty-state p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.7;
    max-width: 360px;
    margin: 0 auto 28px;
}

.wtp-empty-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--blue, #3b82f6);
    color: #fff;
    border: none;
    border-radius: 99px;
    padding: 12px 32px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 0 18px 4px rgba(59, 130, 246, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wtp-empty-reset:hover {
    transform: scale(1.04);
    box-shadow: 0 0 28px 8px rgba(59, 130, 246, 0.55);
}

/* ── OTP Verification ────────────────────────────────────────────────────── */
.otp-email-hint {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.2);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: rgba(255,255,255,0.75);
    margin-bottom: 20px;
}
.otp-email-hint strong {
    color: #fff;
}
.otp-dev-hint {
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 16px;
}
.otp-input {
    font-size: 24px !important;
    letter-spacing: 12px;
    text-align: center;
    font-weight: 700 !important;
}

/* ── Alert variants ──────────────────────────────────────────────────────── */
.alert-success {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.3);
    color: #86efac;
}
.alert-info {
    background: rgba(59, 130, 246, 0.10);
    border-color: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

/* ── Phone number input with country code ────────────────────────────────── */
.phone-input-group {
    display: flex;
    gap: 8px;
    align-items: center;
}

.phone-code-select {
    width: 110px !important;
    flex-shrink: 0;
    padding-right: 8px !important;
    cursor: pointer;
}

.phone-number-input {
    flex: 1;
}
