

/* user.css */

/* Bell Icon Header */
.btn-icon-header {
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.5rem;
    border-radius: 6px;
    cursor: pointer;
    position: relative;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-icon-header:hover {
    background: rgba(255,255,255,0.2);
}

.notif-badge-header {
    position: absolute;
    top: -4px;
    right: -4px;
    background: var(--danger);
    color: white;
    border-radius: 10px;
    padding: 0.1rem 0.4rem;
    font-size: 0.7rem;
    font-weight: 700;
}

/* Notifications */
.notifications-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.notification-item {
    padding: 1rem;
    background: var(--bg-light);
    border-radius: 8px;
    border-left: 3px solid var(--border);
}

.notification-item.unread {
    background: #e3f2fd;
    border-left-color: var(--blue);
}

.notification-item strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.notification-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* ── Notification panel (bell popover) ─────────────────────── */
.notif-badge-header--urgent {
    background: #dc2626 !important;
    animation: notif-pulse 2s ease-in-out infinite;
}

@keyframes notif-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,0.4); }
    50%       { box-shadow: 0 0 0 5px rgba(220,38,38,0); }
}

/* Notification modal item styles */
.notif-empty {
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.notif-divider {
    padding: 0.5rem 0;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    border-top: 1px solid var(--border);
    margin-top: 0.25rem;
}

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem;
    border-radius: 8px;
    border-left: 3px solid transparent;
    margin-bottom: 0.5rem;
    background: var(--bg-light, #f8fafc);
    transition: background 0.15s;
}

.notif-item--urgent {
    border-left-color: #dc2626;
    background: #fff5f5;
}

.notif-item--seen {
    opacity: 0.55;
}

.notif-item-body {
    flex: 1;
    min-width: 0;
}

.notif-urgent-tag {
    display: inline-block;
    background: #dc2626;
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    margin-bottom: 0.35rem;
}

.notif-item-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.35;
    margin-bottom: 0.2rem;
}

.notif-item-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

.notif-item-note {
    font-size: 0.8rem;
    color: #059669;
    margin-top: 0.25rem;
    font-weight: 500;
}

.notif-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.notif-item-action {
    font-size: 0.8rem;
    color: var(--blue);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.notif-item-action:hover { text-decoration: underline; }

.notif-item-dismiss {
    background: #e5e7eb;
    border: none;
    color: #6b7280;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: 0.1rem;
    transition: background 0.15s, color 0.15s;
}

.notif-item-dismiss:hover {
    background: #dc2626;
    color: white;
}

.notif-item-seen-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    flex-shrink: 0;
    align-self: flex-start;
    padding-top: 0.2rem;
    font-style: italic;
}

/* ── Notification modal header status ──────────────────────── */
.notif-modal-status {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-muted, #64748b);
    min-height: 1.25rem;
}
.notif-status-action {
    color: #dc2626;
    font-weight: 600;
}
.notif-status-ok {
    color: #059669;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

/* ── Section group labels ────────────────────────────────────── */
.notif-section-label {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #dc2626;
    padding: 0.875rem 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    border-top: 1px solid var(--border, #e2e8f0);
    margin-top: 0.25rem;
}
.notif-section-label:first-child { border-top: none; padding-top: 0; }
.notif-section-label--secondary {
    color: var(--text-muted, #64748b);
}

/* ── Primary CTA button inside a notification item ──────────── */
.notif-cta-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--primary, #1e3a8a);
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.4rem 0.875rem;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s, transform 0.1s;
    text-decoration: none;
}
.notif-cta-primary:hover { background: var(--primary-dark); transform: translateY(-1px); }
.notif-cta-primary:active { transform: translateY(0); }

/* ── Empty / caught-up state ─────────────────────────────────── */
.notif-empty-state {
    padding: 2.5rem 1rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
.notif-empty-icon {
    font-size: 2.5rem;
    color: #cbd5e1;
}
.notif-empty-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark, #0f172a);
}
.notif-empty-sub {
    font-size: 0.85rem;
    color: var(--text-muted, #64748b);
    max-width: 300px;
    line-height: 1.5;
}

/* ── Collapsible notification sections ──────────────────────── */
.notif-section-label--collapsible { cursor: pointer; user-select: none; }
.notif-section-label--collapsible:hover { opacity: 0.8; }
.notif-collapse-icon {
    margin-left: auto;
    font-size: 0.65rem;
    transition: transform 0.2s;
    opacity: 0.6;
}
.notif-section-label--collapsed .notif-collapse-icon { transform: rotate(-90deg); }

/* ── Sign In button in header ────────────────────────────────── */
.btn-sign-in {
    background: rgba(255,255,255,0.15);
    border: 1.5px solid rgba(255,255,255,0.4);
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: background 0.15s;
    white-space: nowrap;
}
.btn-sign-in:hover { background: rgba(255,255,255,0.25); }

/* ── Topics bottom tab (it's an <a>, needs same look as button) ─ */
a.bottom-tab {
    text-decoration: none;
    color: inherit;
}

/* ── Profile: signed-out gate ────────────────────────────────── */
.profile-gate {
    display: flex;
    flex-direction: column;
    margin: 0.75rem 0 1.25rem;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.profile-gate-hero {
    background: var(--primary);
    color: white;
    padding: 2.5rem 1.5rem 2rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.profile-gate-hero-icon { font-size: 2.25rem; opacity: 0.9; }
.profile-gate-hero-title { font-size: 1.5rem; font-weight: 800; margin: 0; letter-spacing: -0.01em; }
.profile-gate-hero-sub   { font-size: 0.875rem; opacity: 0.8; margin: 0; }

.profile-gate-body {
    background: white;
    padding: 1.5rem 1.25rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.profile-gate-desc {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 1.25rem;
    text-align: center;
}
.profile-gate-cta {
    display: inline-block;
    width: auto;
    background: var(--accent);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    margin-bottom: 1.5rem;
    transition: background 0.15s;
    text-align: center;
}
.profile-gate-cta:hover { background: var(--accent-light); }

.profile-gate-unlocks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.profile-gate-unlock {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
}
.profile-gate-unlock-icon {
    width: 36px; height: 36px; border-radius: 10px;
    background: #eff6ff; color: #1d4ed8;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.9rem; flex-shrink: 0;
}
.profile-gate-unlock-text {
    display: flex; flex-direction: column; gap: 0.1rem;
}
.profile-gate-unlock-text strong { font-size: 0.9rem; color: #0f172a; font-weight: 600; }
.profile-gate-unlock-text span   { font-size: 0.8rem; color: #64748b; line-height: 1.4; }

/* ── Profile: verification tier ladder ─────────────────────── */
.profile-tier-ladder {
    background: white;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}
.profile-tier-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #94a3b8;
    margin-bottom: 0.875rem;
}
.profile-tier-steps {
    display: flex;
    flex-direction: column;
    gap: 0;
}
.tier-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0;
    border-bottom: 1px solid #f1f5f9;
    position: relative;
}
.tier-step:last-child { border-bottom: none; }
.tier-step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    flex-shrink: 0;
}
.tier-step--done .tier-step-icon { background: #dcfce7; color: #16a34a; }
.tier-step--active .tier-step-icon { background: #dbeafe; color: #1d4ed8; }
.tier-step--locked .tier-step-icon { background: #f1f5f9; color: #94a3b8; }

.tier-step-body { flex: 1; min-width: 0; }
.tier-step-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #0f172a;
}
.tier-step--locked .tier-step-label { color: #94a3b8; }
.tier-step-cta {
    font-size: 0.75rem;
    color: #1d4ed8;
    margin-top: 0.1rem;
}
.tier-step-check {
    color: #16a34a;
    font-size: 0.75rem;
    flex-shrink: 0;
}
.tier-step--next .tier-step-icon { background: #dbeafe; color: #1d4ed8; }
.tier-step--next .tier-step-label { color: #1d4ed8; font-weight: 700; }
.tier-step-sub {
    font-size: 0.72rem;
    color: #94a3b8;
    margin-top: 0.1rem;
    line-height: 1.3;
}
.tier-step--done .tier-step-sub  { color: #86efac; }
.tier-step--next .tier-step-sub  { color: #93c5fd; }

/* ── Topics section ──────────────────────────────────────────── */
.topics-page { padding: 0 0 1rem; }
.topics-hero { padding: 1.25rem 1rem 0.75rem; }
.topics-hero-title {
    font-size: 1.5rem; font-weight: 800; color: #0f172a; margin: 0 0 0.25rem;
}
.topics-hero-sub { font-size: 0.875rem; color: #64748b; margin: 0; line-height: 1.45; }
.topics-empty    { padding: 2rem 1rem; text-align: center; color: #64748b; font-size: 0.9rem; }

/* ── Featured debate cards ─────────────────────────────────── */
.topics-featured {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.75rem 1rem 1rem;
}
.topics-feat-card {
    display: block;
    border-radius: 14px;
    padding: 1.125rem 1.25rem 1rem;
    text-decoration: none;
    color: white;
    transition: opacity 0.15s, transform 0.15s;
}
.topics-feat-card:hover  { opacity: 0.92; transform: translateY(-1px); }
.topics-feat-card:active { opacity: 0.85; transform: none; }
.topics-feat-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255,255,255,0.75);
    margin-bottom: 0.35rem;
}
.topics-feat-title {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 0.75rem;
}
.topics-feat-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.topics-feat-positions {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.7);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}
.topics-feat-cta {
    font-size: 0.82rem;
    font-weight: 700;
    color: white;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.35);
    border-radius: 6px;
    padding: 0.3rem 0.75rem;
    white-space: nowrap;
}

/* ── Grouped topic index ─────────────────────────────────── */
.topics-index { padding-bottom: 1rem; }
.topics-group { margin-bottom: 0; }
.topics-group-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.875rem 1rem 0.3rem;
    border-top: 1px solid #f1f5f9;
}
.topics-group:first-child .topics-group-label { border-top: none; padding-top: 0.25rem; }

.topics-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #f1f5f9;
    text-decoration: none;
    color: #0f172a;
    background: white;
    transition: background 0.12s;
    cursor: pointer;
    /* Tap highlight on mobile */
    -webkit-tap-highlight-color: rgba(29,78,216,0.08);
}
.topics-row:hover  { background: #f0f6ff; }
.topics-row:active { background: #dbeafe; }
.topics-debate-icon {
    color: #6d28d9;
    font-size: 0.7rem;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}
.topics-row-title {
    flex: 1;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.topics-row-chevron {
    color: #93c5fd;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.topics-row-title { color: var(--primary); }
.topics-row--empty { opacity: 0.5; }
.topics-row--empty .topics-row-title { color: #64748b; }
.topics-row-empty {
    font-size: 0.68rem;
    color: #94a3b8;
    background: #f1f5f9;
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    white-space: nowrap;
    flex-shrink: 0;
}
/* ── Saved Items (Collections) ──────────────────────────────── */
.profile-saved-count {
    margin-left: auto;
    background: #e0e7ff;
    color: #3730a3;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 10px;
    padding: 0.1rem 0.55rem;
    line-height: 1.6;
}

.saved-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0;
    border-bottom: 1px solid var(--border-2, #e2e8f0);
    font-size: 0.875rem;
}
.saved-item:last-child { border-bottom: none; }

.saved-item-type {
    flex-shrink: 0;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted, #64748b);
    background: #f1f5f9;
    border-radius: 3px;
    padding: 0.1rem 0.4rem;
    white-space: nowrap;
}

.saved-item-title {
    flex: 1;
    color: var(--text-primary, #1e293b);
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.saved-item-title:hover { text-decoration: underline; }

.saved-item-note {
    flex-shrink: 0;
    font-size: 0.78rem;
    color: var(--text-muted, #64748b);
    font-style: italic;
    max-width: 140px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.saved-item-remove {
    flex-shrink: 0;
    background: none;
    border: none;
    color: var(--text-muted, #94a3b8);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0.15rem 0.35rem;
    border-radius: 4px;
    transition: background 0.12s, color 0.12s;
}
.saved-item-remove:hover {
    background: #fee2e2;
    color: #dc2626;
}
