/* ═══════════════════════════════════════════════════════════════
   Sentiment Widget (.sntw) — Bearish/Bullish community voting
   Standalone CSS loaded via @pushOnce on any page using the widget.
   STYLE_VERSION: 4.96
   ═══════════════════════════════════════════════════════════════ */

.sntw {
    margin-block: 2rem;
    container-type: inline-size;
}

.sntw__inner {
    background: #fff;
    border: 1px solid rgba(21, 45, 80, 0.1);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(21, 45, 80, 0.06);
    transition: box-shadow 0.2s ease;
}

.sntw__inner:hover {
    box-shadow: 0 4px 24px rgba(21, 45, 80, 0.1);
}

/* Header */
.sntw__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.sntw__icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.sntw__question {
    font-size: 0.975rem;
    color: var(--ink, #1E293B);
    flex: 1;
    font-weight: 500;
}

.sntw__question strong {
    color: var(--navy, #152D50);
}

.sntw__total {
    font-size: 0.75rem;
    color: var(--ink-soft, #5E7A95);
    background: var(--bg-muted, #F1F5F9);
    padding: 2px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

/* Gauge bar */
.sntw__gauge {
    display: flex;
    height: 8px;
    border-radius: 99px;
    overflow: hidden;
    background: #E2E8F0;
    margin-bottom: 0.4rem;
    direction: ltr;
}

.sntw__gauge-fill {
    height: 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.sntw__gauge-fill--bull {
    background: linear-gradient(90deg, #10A37F, #059669);
}

.sntw__gauge-fill--bear {
    background: linear-gradient(90deg, #EF4444, #DC2626);
}

.sntw__gauge-labels {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.25rem;
}

.sntw__pct {
    font-size: 0.75rem;
    font-weight: 600;
}

.sntw__pct--bull {
    color: #10A37F;
}

.sntw__pct--bear {
    color: #EF4444;
}

/* Action buttons */
.sntw__actions {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    direction: rtl;
}

.sntw__form {
    flex: 1;
    display: contents;
}

.sntw__btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
    text-decoration: none;
    min-width: 0;
}

.sntw__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.sntw__btn:active {
    transform: translateY(0);
}

.sntw__btn--bull {
    background: linear-gradient(135deg, #D1FAE5, #A7F3D0);
    border-color: #10A37F;
    color: #065F46;
}

.sntw__btn--bull:hover {
    background: linear-gradient(135deg, #A7F3D0, #6EE7B7);
}

.sntw__btn--bear {
    background: linear-gradient(135deg, #FEE2E2, #FECACA);
    border-color: #EF4444;
    color: #7F1D1D;
}

.sntw__btn--bear:hover {
    background: linear-gradient(135deg, #FECACA, #FCA5A5);
}

.sntw__btn-icon {
    font-size: 1.6rem;
    line-height: 1;
}

.sntw__btn-label {
    font-size: 0.875rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.sntw__btn-sub {
    font-size: 0.7rem;
    opacity: 0.7;
    font-weight: 400;
}

.sntw__divider {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--ink-soft, #5E7A95);
    padding: 0 0.25rem;
    flex-shrink: 0;
}

/* Hint text */
.sntw__hint {
    font-size: 0.78rem;
    color: var(--ink-soft, #5E7A95);
    text-align: center;
    margin-top: 0.9rem;
    margin-bottom: 0;
}

.sntw__hint a,
.sntw__hint-link {
    color: var(--teal, #0D9488);
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font-size: inherit;
    font-family: inherit;
    padding: 0;
}

/* ── Auth Modal ── */
.sntw-modal {
    position: fixed;
    inset: 0;
    z-index: 9900;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.sntw-modal[hidden] {
    display: none !important;
}

.sntw-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    cursor: pointer;
}

.sntw-modal__box {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 20px;
    padding: 2rem 1.75rem 1.75rem;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 24px 64px rgba(15, 23, 42, 0.2);
    text-align: center;
    animation: sntw-pop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sntw-pop {
    from { opacity: 0; transform: scale(0.88) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.sntw-modal__close {
    position: absolute;
    inset-inline-end: 1rem;
    top: 1rem;
    background: var(--bg-muted, #F1F5F9);
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--ink-soft, #5E7A95);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
    line-height: 1;
}

.sntw-modal__close:hover {
    background: #E2E8F0;
}

.sntw-modal__icon {
    margin: 0 auto 1rem;
    width: 56px;
    height: 56px;
}

.sntw-modal__title {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--navy, #152D50);
    margin: 0 0 0.6rem;
}

.sntw-modal__desc {
    font-size: 0.875rem;
    color: var(--ink-soft, #5E7A95);
    line-height: 1.6;
    margin: 0 0 1.25rem;
}

.sntw-modal__features {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: start;
    background: var(--bg-subtle, #F8FAFC);
    border-radius: 12px;
    padding: 0.9rem 1rem;
    margin-bottom: 1.5rem;
}

.sntw-modal__feat {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.85rem;
    color: var(--ink, #1E293B);
}

.sntw-modal__feat-icon {
    font-size: 1rem;
    flex-shrink: 0;
}

.sntw-modal__cta {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.sntw-modal__btn {
    display: block;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    text-align: center;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.sntw-modal__btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    text-decoration: none;
}

.sntw-modal__btn--primary {
    background: linear-gradient(135deg, #0D9488, #065F46);
    color: #fff;
}

.sntw-modal__btn--secondary {
    background: transparent;
    color: var(--navy, #152D50);
    border: 2px solid rgba(21, 45, 80, 0.2);
}

.sntw-modal__note {
    font-size: 0.72rem;
    color: var(--ink-soft, #5E7A95);
    margin-top: 0.9rem;
    margin-bottom: 0;
}

/* ── Empty state (no votes yet) ── */
.sntw__empty {
    font-size: 0.8rem;
    color: var(--ink-soft, #5E7A95);
    text-align: center;
    margin-block: 0.5rem 1rem;
    padding: 0.6rem 1rem;
    background: var(--bg-muted, #F1F5F9);
    border-radius: 8px;
}

/* ── Button loading state ── */
.sntw__btn--loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

/* ── Success modal — voted badge ── */
.sntw-modal__voted-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.25rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 700;
    margin: 0 auto 1.25rem;
}

.sntw-modal__voted-badge--bull {
    background: #D1FAE5;
    color: #065F46;
    border: 1.5px solid #10A37F;
}

.sntw-modal__voted-badge--bear {
    background: #FEE2E2;
    color: #7F1D1D;
    border: 1.5px solid #EF4444;
}

/* ── Success modal — pulse animation ── */
.sntw-modal__anim {
    font-size: 3rem;
    line-height: 1;
    margin: 0 auto 1rem;
    display: block;
    text-align: center;
    animation: sntw-pulse 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sntw-modal__anim--bull {
    filter: drop-shadow(0 0 12px rgba(16, 163, 127, 0.5));
}

.sntw-modal__anim--bear {
    filter: drop-shadow(0 0 12px rgba(239, 68, 68, 0.5));
}

@keyframes sntw-pulse {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

/* ── Success modal box variant ── */
.sntw-modal__box--success {
    border-top: 4px solid #10A37F;
}

/* ── Responsive ── */
@container (max-width: 400px) {
    .sntw__actions {
        flex-direction: column;
    }
    .sntw__divider {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .sntw__inner {
        padding: 1.1rem;
    }
    .sntw__btn-icon {
        font-size: 1.3rem;
    }
    .sntw-modal__box {
        padding: 1.5rem 1.25rem;
    }
}
