/* ==========================================================================
   NOTIFICATION BELL, DROPDOWN INBOX & PREFERENCES TAB
   Shared between Parent Portal (RTL/LTR) and Admin Dashboard
   ========================================================================== */

.notif-bell-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.notif-bell-btn {
  position: relative;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid #cbd5e1;
  background: #ffffff;
  color: #334155;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.92rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.notif-bell-btn:hover,
.notif-bell-btn[aria-expanded="true"] {
  border-color: var(--primary, var(--color-primary, #2563eb));
  color: var(--primary, var(--color-primary, #2563eb));
  background: #eff6ff;
}

.notif-bell-badge {
  position: absolute;
  top: -5px;
  inset-inline-end: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  box-shadow: 0 0 0 2px #ffffff;
  display: none;
}

.notif-bell-badge.has-unread {
  display: inline-block;
}

.notif-dropdown {
  position: fixed;
  top: 0;
  left: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 18px 40px -8px rgba(15, 23, 42, 0.22);
  z-index: 10090;
  display: none;
  flex-direction: column;
  overflow: hidden;
  text-align: start;
}

.notif-dropdown.open {
  display: flex;
  animation: notifDropIn 0.16s ease;
}

@keyframes notifDropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.notif-dropdown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
  border-bottom: 1px solid #e2e8f0;
}

.notif-dropdown-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 800;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.notif-dropdown-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.notif-text-btn {
  border: none;
  background: transparent;
  color: var(--primary, var(--color-primary, #2563eb));
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  cursor: pointer;
}

.notif-text-btn:hover {
  background: rgba(37, 99, 235, 0.08);
}

.notif-dropdown-list {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.notif-item {
  display: flex;
  gap: 0.65rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  cursor: pointer;
  transition: background 0.15s ease;
  background: #ffffff;
}

.notif-item:hover {
  background: #f8fafc;
}

.notif-item.unread {
  background: #eff6ff;
}

.notif-item.unread:hover {
  background: #dbeafe;
}

.notif-item-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
  background: transparent;
}

.notif-item.unread .notif-item-dot {
  background: #2563eb;
}

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

.notif-item-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 0.2rem;
  line-height: 1.35;
}

.notif-item-msg {
  font-size: 0.78rem;
  color: #475569;
  line-height: 1.45;
  word-break: break-word;
}

.notif-item-time {
  font-size: 0.7rem;
  color: #94a3b8;
  margin-top: 0.3rem;
}

.notif-item-del {
  border: none;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  padding: 0.2rem;
  align-self: flex-start;
  font-size: 0.8rem;
  border-radius: 4px;
}

.notif-item-del:hover {
  color: #dc2626;
  background: #fef2f2;
}

.notif-empty {
  padding: 2rem 1.25rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.84rem;
}

.notif-empty i {
  display: block;
  font-size: 1.8rem;
  margin-bottom: 0.5rem;
  color: #cbd5e1;
}

.notif-dropdown-footer {
  padding: 0.6rem 1rem;
  border-top: 1px solid #e2e8f0;
  background: #f8fafc;
  display: flex;
  justify-content: center;
}

/* Preferences Panel (inside Parent Settings Tab & Staff Profiles) */
.notif-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.notif-push-card {
  padding: 1rem 1.1rem;
  border-radius: 12px;
  border: 1.5px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 100%);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.notif-push-status-title {
  font-weight: 800;
  font-size: 0.92rem;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.notif-push-status-sub {
  font-size: 0.79rem;
  color: #475569;
  margin-top: 0.2rem;
}

.notif-push-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.notif-ios-hint {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 0.8rem;
  line-height: 1.5;
}

.notif-push-feedback {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  font-size: 0.8rem;
  line-height: 1.5;
  border: 1px solid #fca5a5;
  background: #fef2f2;
  color: #991b1b;
}

.notif-push-feedback.info,
.notif-push-feedback.warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.notif-push-feedback strong {
  display: block;
  margin-bottom: 0.15rem;
}

.notif-section-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.notif-section-head {
  padding: 0.75rem 1rem;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 800;
  font-size: 0.86rem;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.notif-channel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.75rem;
  padding: 0.9rem 1rem;
}

.notif-channel-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.notif-channel-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e293b;
}

.notif-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.notif-toggle-row:last-child {
  border-bottom: none;
}

.notif-toggle-info {
  flex: 1;
  min-width: 0;
}

.notif-toggle-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
}

.notif-toggle-desc {
  font-size: 0.76rem;
  color: #64748b;
  margin-top: 0.15rem;
  line-height: 1.4;
}

/* Pill Switch */
.notif-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.notif-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.notif-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  border-radius: 999px;
  transition: 0.2s ease;
}

.notif-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: #ffffff;
  border-radius: 50%;
  transition: 0.2s ease;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
}

.notif-switch input:checked + .notif-slider {
  background-color: var(--primary, var(--color-primary, #2563eb));
}

.notif-switch input:checked + .notif-slider:before {
  transform: translateX(20px);
}

.notif-switch input:disabled + .notif-slider {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Teacher private request scoping box */
.notif-teacher-mode-card {
  border: 1.5px solid #ddd6fe;
  border-radius: 12px;
  background: linear-gradient(135deg, #f5f3ff 0%, #ffffff 100%);
  overflow: hidden;
}

.notif-teacher-mode-card .notif-section-head {
  background: #ede9fe;
  border-bottom-color: #ddd6fe;
  color: #5b21b6;
}

@media (max-width: 640px) {
  .notif-dropdown-list {
    max-height: min(320px, 55vh);
  }
}

/* Staff Profile / Account Settings Tabs */
.staff-profile-tabs {
  display: flex;
  gap: 0.45rem;
  background: #f1f5f9;
  padding: 0.3rem;
  border-radius: 12px;
  margin-bottom: 1.25rem;
}

.staff-profile-tab-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0.9rem;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.staff-profile-tab-btn:hover {
  color: #0f172a;
}

.staff-profile-tab-btn.active {
  background: var(--color-primary, #2563eb);
  color: #ffffff;
  box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
}
