/* =====================================================
   VIBRA PUSH — Urban Push Notification Engine
   PR #44 | VibraWorld 3.0
   ===================================================== */

/* ── Permission Request Banner ─────────────────────── */
.vp-permission-banner {
  position: fixed;
  bottom: 72px;
  left: 12px;
  right: 12px;
  background: linear-gradient(135deg, rgba(138,87,255,.15) 0%, rgba(0,212,255,.1) 100%);
  border: 1px solid rgba(138,87,255,.4);
  border-radius: 16px;
  padding: 1rem 1.2rem;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 1rem;
  backdrop-filter: blur(20px);
  animation: vpBannerIn .4s cubic-bezier(.2,0,.1,1);
}

@keyframes vpBannerIn {
  from { transform: translateY(100%); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

.vp-banner-icon {
  font-size: 2rem;
  flex-shrink: 0;
}

.vp-banner-text {
  flex: 1;
}

.vp-banner-title {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: .85rem;
  font-weight: 800;
  color: rgba(240,235,255,1);
  margin-bottom: .2rem;
}

.vp-banner-sub {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .65rem;
  color: rgba(200,190,240,.7);
  line-height: 1.4;
}

.vp-banner-actions {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex-shrink: 0;
}

.vp-btn-allow {
  background: linear-gradient(135deg, #8a57ff, #00d4ff);
  border: none;
  border-radius: 20px;
  padding: .45rem 1rem;
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: .7rem;
  font-weight: 800;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .15s, opacity .15s;
}

.vp-btn-allow:active { transform: scale(.95); }

.vp-btn-dismiss {
  background: transparent;
  border: 1px solid rgba(200,190,240,.2);
  border-radius: 20px;
  padding: .35rem .8rem;
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .6rem;
  color: rgba(200,190,240,.5);
  cursor: pointer;
  text-align: center;
}

/* ── In-App Toast Notifications ─────────────────────── */
.vp-toast-container {
  position: fixed;
  top: 60px;
  left: 12px;
  right: 12px;
  z-index: 600;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  pointer-events: none;
}

.vp-toast {
  background: rgba(9,6,18,.95);
  border-radius: 14px;
  padding: .85rem 1rem;
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  border-left: 3px solid #8a57ff;
  backdrop-filter: blur(20px);
  pointer-events: all;
  cursor: pointer;
  animation: vpToastIn .35s cubic-bezier(.2,0,.1,1);
  transition: transform .2s, opacity .2s;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
}

.vp-toast.vp-surge { border-left-color: #ff6b35; }
.vp-toast.vp-tribe { border-left-color: #00e676; }
.vp-toast.vp-reputation { border-left-color: #ffc400; }
.vp-toast.vp-mission { border-left-color: #00d4ff; }
.vp-toast.vp-digest  { border-left-color: #b088ff; }

@keyframes vpToastIn {
  from { transform: translateY(-20px) scale(.95); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

.vp-toast-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  margin-top: .1rem;
}

.vp-toast-body {
  flex: 1;
  min-width: 0;
}

.vp-toast-title {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: .8rem;
  font-weight: 800;
  color: rgba(240,235,255,1);
  margin-bottom: .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vp-toast-sub {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .6rem;
  color: rgba(200,190,240,.65);
  line-height: 1.3;
}

.vp-toast-time {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .55rem;
  color: rgba(200,190,240,.35);
  flex-shrink: 0;
}

.vp-toast-close {
  background: transparent;
  border: none;
  color: rgba(200,190,240,.4);
  cursor: pointer;
  font-size: .9rem;
  padding: 0;
  flex-shrink: 0;
  line-height: 1;
}

/* ── Notification Center Panel ──────────────────────── */
#vp-center-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(6,4,15,.97);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.vp-center-header {
  position: sticky;
  top: 0;
  background: rgba(6,4,15,.97);
  padding: 1rem 1.2rem .75rem;
  border-bottom: 1px solid rgba(138,87,255,.2);
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

.vp-center-title {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: 1.1rem;
  font-weight: 900;
  color: rgba(240,235,255,1);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.vp-center-badge {
  background: #ff4444;
  color: #fff;
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .55rem;
  font-weight: 700;
  border-radius: 20px;
  padding: .1rem .45rem;
  min-width: 18px;
  text-align: center;
}

.vp-center-actions {
  display: flex;
  gap: .5rem;
  align-items: center;
}

.vp-settings-btn {
  background: rgba(138,87,255,.15);
  border: 1px solid rgba(138,87,255,.3);
  border-radius: 8px;
  padding: .35rem .7rem;
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .6rem;
  color: rgba(200,190,240,.8);
  cursor: pointer;
}

.vp-close-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(200,190,240,.6);
  cursor: pointer;
  font-size: .9rem;
}

/* Filter tabs */
.vp-filter-tabs {
  display: flex;
  gap: .5rem;
  padding: .75rem 1.2rem;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(255,255,255,.05);
}

.vp-filter-tabs::-webkit-scrollbar { display: none; }

.vp-filter-tab {
  flex-shrink: 0;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 20px;
  padding: .35rem .9rem;
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .62rem;
  color: rgba(200,190,240,.6);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}

.vp-filter-tab.active {
  background: rgba(138,87,255,.2);
  border-color: rgba(138,87,255,.5);
  color: rgba(240,235,255,1);
}

/* Permission status bar */
.vp-status-bar {
  margin: .75rem 1.2rem;
  background: rgba(138,87,255,.08);
  border: 1px solid rgba(138,87,255,.2);
  border-radius: 10px;
  padding: .65rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}

.vp-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff4444;
  flex-shrink: 0;
}

.vp-status-dot.active { background: #00e676; animation: vp-pulse 2s infinite; }

@keyframes vp-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(0,230,118,.4); }
  50%       { box-shadow: 0 0 0 5px rgba(0,230,118,0); }
}

.vp-status-text {
  flex: 1;
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .62rem;
  color: rgba(200,190,240,.7);
}

.vp-enable-btn {
  background: linear-gradient(135deg, #8a57ff, #00d4ff);
  border: none;
  border-radius: 8px;
  padding: .35rem .8rem;
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .58rem;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

/* Notification list */
.vp-notif-list {
  padding: 0 1.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.vp-notif-group-label {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .6rem;
  color: rgba(200,190,240,.35);
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .75rem 0 .35rem;
}

.vp-notif-item {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 12px;
  padding: .85rem 1rem;
  display: flex;
  gap: .75rem;
  cursor: pointer;
  transition: background .2s;
  position: relative;
}

.vp-notif-item:active { background: rgba(138,87,255,.1); }
.vp-notif-item.unread { border-left: 3px solid #8a57ff; }
.vp-notif-item.unread.surge { border-left-color: #ff6b35; }
.vp-notif-item.unread.tribe { border-left-color: #00e676; }
.vp-notif-item.unread.reputation { border-left-color: #ffc400; }
.vp-notif-item.unread.mission { border-left-color: #00d4ff; }

.vp-ni-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.vp-ni-body {
  flex: 1;
  min-width: 0;
}

.vp-ni-title {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: .8rem;
  font-weight: 800;
  color: rgba(240,235,255,.9);
  margin-bottom: .2rem;
}

.vp-ni-sub {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .62rem;
  color: rgba(200,190,240,.6);
  line-height: 1.4;
}

.vp-ni-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: .3rem;
}

.vp-ni-time {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .55rem;
  color: rgba(200,190,240,.35);
}

.vp-ni-tag {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .5rem;
  color: rgba(138,87,255,.8);
  background: rgba(138,87,255,.1);
  border-radius: 4px;
  padding: .1rem .4rem;
  text-transform: uppercase;
}

.vp-ni-unread-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8a57ff;
  position: absolute;
  top: 10px;
  right: 10px;
  flex-shrink: 0;
}

/* Empty state */
.vp-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: rgba(200,190,240,.4);
}

.vp-empty-icon { font-size: 3rem; margin-bottom: .75rem; }
.vp-empty-text { font-family: var(--mono, 'DM Mono', monospace); font-size: .75rem; line-height: 1.5; }

/* ── Settings Panel ──────────────────────────────────── */
#vp-settings-panel {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 350;
  background: rgba(6,4,15,.98);
  overflow-y: auto;
}

.vp-settings-header {
  position: sticky;
  top: 0;
  background: rgba(6,4,15,.98);
  padding: 1rem 1.2rem;
  border-bottom: 1px solid rgba(138,87,255,.2);
  display: flex;
  align-items: center;
  gap: .75rem;
}

.vp-settings-back {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(200,190,240,.7);
  cursor: pointer;
  font-size: .9rem;
}

.vp-settings-title {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: 1rem;
  font-weight: 800;
  color: rgba(240,235,255,1);
}

.vp-settings-body {
  padding: 1rem 1.2rem 4rem;
}

.vp-settings-section {
  margin-bottom: 1.5rem;
}

.vp-settings-section-title {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .62rem;
  color: rgba(200,190,240,.4);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: .75rem;
}

.vp-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: .85rem 1rem;
  margin-bottom: .4rem;
}

.vp-toggle-info {}

.vp-toggle-label {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: .78rem;
  font-weight: 700;
  color: rgba(240,235,255,.9);
  margin-bottom: .1rem;
}

.vp-toggle-desc {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .58rem;
  color: rgba(200,190,240,.5);
}

.vp-toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.vp-toggle input { opacity: 0; width: 0; height: 0; }

.vp-toggle-slider {
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,.1);
  border-radius: 24px;
  transition: background .3s;
  cursor: pointer;
}

.vp-toggle-slider:before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: rgba(200,190,240,.5);
  border-radius: 50%;
  transition: transform .3s, background .3s;
}

.vp-toggle input:checked + .vp-toggle-slider { background: rgba(138,87,255,.6); }
.vp-toggle input:checked + .vp-toggle-slider:before {
  transform: translateX(20px);
  background: #8a57ff;
}

/* Quiet hours */
.vp-quiet-hours {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: .85rem 1rem;
  margin-bottom: .4rem;
}

.vp-quiet-label {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: .78rem;
  font-weight: 700;
  color: rgba(240,235,255,.9);
  margin-bottom: .5rem;
}

.vp-quiet-time-row {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.vp-time-select {
  flex: 1;
  background: rgba(138,87,255,.1);
  border: 1px solid rgba(138,87,255,.3);
  border-radius: 8px;
  padding: .4rem .75rem;
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .7rem;
  color: rgba(240,235,255,.8);
  cursor: pointer;
  text-align: center;
}

.vp-quiet-sep {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .7rem;
  color: rgba(200,190,240,.4);
}

/* Urgency threshold */
.vp-urgency-row {
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 12px;
  padding: .85rem 1rem;
  margin-bottom: .4rem;
}

.vp-urgency-label {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: .78rem;
  font-weight: 700;
  color: rgba(240,235,255,.9);
  margin-bottom: .5rem;
}

.vp-urgency-options {
  display: flex;
  gap: .4rem;
}

.vp-urgency-opt {
  flex: 1;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: .4rem .2rem;
  text-align: center;
  cursor: pointer;
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .58rem;
  color: rgba(200,190,240,.6);
  transition: all .2s;
}

.vp-urgency-opt.selected {
  background: rgba(138,87,255,.2);
  border-color: rgba(138,87,255,.5);
  color: rgba(240,235,255,1);
}

/* Stats in settings */
.vp-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .5rem;
  margin-bottom: .75rem;
}

.vp-stat-card {
  background: rgba(138,87,255,.08);
  border: 1px solid rgba(138,87,255,.2);
  border-radius: 10px;
  padding: .75rem;
  text-align: center;
}

.vp-stat-val {
  font-family: var(--sans, 'Syne', sans-serif);
  font-size: 1.2rem;
  font-weight: 900;
  color: #8a57ff;
  display: block;
}

.vp-stat-label {
  font-family: var(--mono, 'DM Mono', monospace);
  font-size: .55rem;
  color: rgba(200,190,240,.5);
}

/* Badge on bottom nav notification */
.vp-nav-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  background: #ff4444;
  border-radius: 50%;
  border: 2px solid rgba(6,4,15,1);
}
