/* ══════════════════════════════════════
   WALLET ALERTS — notifier.css
   Matches scanner/swap visual language
══════════════════════════════════════ */

/* ── Two-column layout ── */
.notifier-layout {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 20px;
    align-items: start;
}

/* ── Form Card ── */
.notifier-form-card {
    background: rgba(20,20,40,0.6);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(147,51,234,0.4);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 0 60px rgba(147,51,234,0.12);
    animation: fadeInUp 0.5s ease;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

.nfc-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 26px;
    border-bottom: 1px solid rgba(147,51,234,0.2);
    background: rgba(147,51,234,0.08);
    font-family: 'Orbitron', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: #a78bfa;
}
.nfc-body { padding: 22px 26px; }

/* ── Steps ── */
.notifier-step {
    display: flex;
    gap: 14px;
    margin-bottom: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(147,51,234,0.1);
}
.notifier-step:last-of-type { border-bottom: none; margin-bottom: 14px; }

.ns-number {
    width: 30px; height: 30px;
    background: linear-gradient(135deg, #9333ea, #06b6d4);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 13px; font-weight: 700;
    flex-shrink: 0; margin-top: 2px;
}
.ns-content { flex: 1; }
.ns-title {
    font-size: 13px; font-weight: 700;
    color: #a78bfa; margin-bottom: 3px;
}
.ns-desc {
    font-size: 11px;
    color: rgba(200,200,255,0.5);
    line-height: 1.5; margin-bottom: 2px;
}

/* ── Alert Type Grid ── */
.alert-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px; margin-top: 10px;
}
.alert-type-option {
    display: flex; align-items: center; gap: 9px;
    padding: 10px 12px;
    background: rgba(147,51,234,0.07);
    border: 1px solid rgba(147,51,234,0.22);
    border-radius: 12px;
    cursor: pointer; transition: all 0.2s;
}
.alert-type-option input { display: none; }
.alert-type-option.selected,
.alert-type-option:hover {
    background: rgba(147,51,234,0.2);
    border-color: #a78bfa;
}
.ato-icon { font-size: 18px; }
.ato-label { font-size: 12px; font-weight: 600; color: #d0d0ff; }

/* ── Threshold ── */
.threshold-row {
    display: flex; gap: 7px;
    flex-wrap: wrap; align-items: center;
    margin-top: 10px;
}
.thresh-btn {
    padding: 6px 13px;
    background: rgba(147,51,234,0.1);
    border: 1px solid rgba(147,51,234,0.28);
    border-radius: 10px;
    color: #d0d0ff; font-size: 12px;
    cursor: pointer; transition: all 0.2s;
}
.thresh-btn.active, .thresh-btn:hover {
    background: rgba(147,51,234,0.3);
    border-color: #a78bfa; color: #fff;
}
.slip-input {
    width: 85px;
    background: rgba(10,10,30,0.7);
    border: 1px solid rgba(147,51,234,0.3);
    border-radius: 10px;
    padding: 6px 10px;
    color: #e0e0ff; font-size: 12px; outline: none;
}
.tg-link { color: #06b6d4; text-decoration: none; font-weight: 600; }
.tg-link:hover { text-decoration: underline; }

/* ── Right panel ── */
.notifier-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    animation: fadeInUp 0.6s ease;
}

/* ── Active Alerts Card ── */
.active-alerts-card {
    background: rgba(20,20,40,0.55);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(147,51,234,0.28);
    border-radius: 20px;
    overflow: hidden;
}
.aac-header {
    display: flex;
    justify-content: space-between; align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(147,51,234,0.18);
    background: rgba(147,51,234,0.06);
    font-family: 'Orbitron', sans-serif;
    font-size: 12px; font-weight: 700; color: #a78bfa;
}
.alert-count {
    background: linear-gradient(135deg, #9333ea, #06b6d4);
    color: #fff; font-size: 11px; font-weight: 700;
    width: 22px; height: 22px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.active-alerts-list { padding: 14px; min-height: 60px; }
.no-alerts {
    text-align: center; font-size: 12px;
    color: rgba(200,200,255,0.35); padding: 14px 0;
}
.alert-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 13px;
    background: rgba(147,51,234,0.07);
    border: 1px solid rgba(147,51,234,0.18);
    border-radius: 12px; margin-bottom: 7px;
    transition: all 0.2s;
}
.alert-item:hover { border-color: rgba(147,51,234,0.38); }
.ai-label { flex: 1; font-size: 12px; color: #d0d0ff; line-height: 1.5; }
.ai-type {
    font-size: 10px; color: #06b6d4;
    font-weight: 700; text-transform: uppercase;
    background: rgba(6,182,212,0.1);
    border: 1px solid rgba(6,182,212,0.25);
    border-radius: 6px; padding: 2px 7px;
    flex-shrink: 0;
}
.ai-delete {
    background: none; border: none;
    color: rgba(239,68,68,0.5); font-size: 15px;
    cursor: pointer; transition: color 0.2s; padding: 2px 5px;
}
.ai-delete:hover { color: #ef4444; }

/* ── Feed Card ── */
.feed-card {
    background: rgba(20,20,40,0.55);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(147,51,234,0.28);
    border-radius: 20px; overflow: hidden;
}
.feed-header {
    display: flex; align-items: center; gap: 8px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(147,51,234,0.18);
    background: rgba(147,51,234,0.06);
    font-family: 'Orbitron', sans-serif;
    font-size: 11px; font-weight: 700; color: #a78bfa;
}
.live-dot {
    width: 7px; height: 7px;
    background: #22c55e; border-radius: 50%;
    animation: livePulse 1.5s ease-in-out infinite;
    margin-left: 4px;
}
@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.4; transform: scale(0.75); }
}
.feed-list { padding: 14px; display: flex; flex-direction: column; gap: 7px; }
.feed-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 13px;
    background: rgba(147,51,234,0.06);
    border: 1px solid rgba(147,51,234,0.14);
    border-radius: 12px; transition: all 0.2s;
}
.feed-item.demo { opacity: 0.6; }
.feed-item:hover { border-color: rgba(147,51,234,0.32); background: rgba(147,51,234,0.1); }
.feed-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.feed-title { font-size: 12px; color: #e0e0ff; font-weight: 600; margin-bottom: 2px; }
.feed-sub   { font-size: 10px; color: rgba(200,200,255,0.45); }
.feed-empty-note {
    text-align: center; font-size: 10px;
    color: #f59e0b; padding: 4px 0 0; opacity: 0.7;
}

/* ── How It Works ── */
.how-card {
    background: rgba(20,20,40,0.55);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(147,51,234,0.28);
    border-radius: 20px; padding: 20px;
}
.how-title {
    font-family: 'Orbitron', sans-serif;
    font-size: 12px; font-weight: 700;
    color: #a78bfa; margin-bottom: 14px;
}
.how-step {
    display: flex; align-items: flex-start;
    gap: 10px; margin-bottom: 10px;
    font-size: 12px; color: #d0d0ff; line-height: 1.5;
}
.how-num {
    width: 22px; height: 22px;
    background: rgba(147,51,234,0.22);
    border: 1px solid rgba(147,51,234,0.4);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 11px; font-weight: 700; color: #a78bfa;
    flex-shrink: 0;
}

/* ── Toast ── */
.toast {
    position: fixed; bottom: 30px;
    left: 50%; transform: translateX(-50%);
    background: linear-gradient(135deg, rgba(34,197,94,0.22), rgba(6,182,212,0.18));
    border: 1px solid rgba(34,197,94,0.45);
    border-radius: 14px; padding: 13px 26px;
    font-size: 13px; font-weight: 600; color: #86efac;
    z-index: 9999; box-shadow: 0 0 40px rgba(34,197,94,0.25);
    animation: fadeInUp 0.3s ease; white-space: nowrap;
}

/* ── Responsive ── */
@media (max-width: 1000px) {
    .notifier-layout { grid-template-columns: 1fr; }
    .notifier-form-card { width: 100%; }
    .alert-type-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .nfc-body { padding: 18px 16px; }
    .threshold-row { gap: 6px; }
    .alert-type-grid { grid-template-columns: 1fr 1fr; }
}

/* ── V5 utility fixes: alert rows, edit mode, feed links, toast wrapping ── */
.alert-content { flex: 1; min-width: 0; }
.alert-content .feed-sub { overflow-wrap: anywhere; line-height: 1.45; }
.alert-item.is-editing { border-color: #a78bfa; background: rgba(147,51,234,0.16); }
.ai-edit {
    background: none; border: none;
    color: rgba(167,139,250,0.6); font-size: 14px;
    cursor: pointer; transition: color 0.2s; padding: 2px 5px;
}
.ai-edit:hover { color: #a78bfa; }
.ai-edit:disabled, .ai-delete:disabled { opacity: 0.4; cursor: not-allowed; }
.tg-bot-hint { margin-top: 8px; font-size: 12px; color: rgba(200,200,255,0.65); }
.watchtower-backend-note {
    margin: 0 0 6px;
    padding: 10px 12px;
    font-size: 12px;
    color: #f59e0b;
    background: rgba(245,158,11,0.08);
    border: 1px solid rgba(245,158,11,0.3);
    border-radius: 12px;
}
.feed-tx-link { display: inline-block; margin-top: 4px; font-size: 10px; }
.connect-wallet-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; box-shadow: none; }
.toast { max-width: min(92vw, 560px); white-space: normal; text-align: center; }
.toast.toast-error {
    background: linear-gradient(135deg, rgba(239,68,68,0.22), rgba(147,51,234,0.18));
    border-color: rgba(239,68,68,0.45);
    color: #fca5a5;
    box-shadow: 0 0 40px rgba(239,68,68,0.2);
}
@media (max-width: 480px) {
    .alert-item { gap: 6px; padding: 10px; }
    .toast { bottom: 16px; padding: 12px 16px; }
}
