/* Feedback, notifications and utility UI */

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--crimson);
  color: #fff;
  padding: 12px 28px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  box-shadow: 0 4px 20px rgba(161, 49, 58, 0.3);
}

.toast.visible {
  opacity: 1;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.notif-bell {
  position: relative;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.notif-bell:hover {
  background: rgba(255, 255, 255, 0.1);
}

.notif-bell:active {
  transform: translateY(1px) scale(0.98);
}

.notif-badge {
  position: absolute;
  top: 0;
  right: 0;
  min-width: 16px;
  height: 16px;
  background: var(--crimson);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  pointer-events: none;
}

.notif-badge[hidden] {
  display: none !important;
}

.notif-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  width: min(340px, calc(100vw - 24px));
  max-height: 70vh;
  max-height: 70dvh;
  background: var(--charcoal);
  border: 1px solid var(--charcoal-soft);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  z-index: 200;
  overflow: hidden;
}

.notif-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--charcoal-soft);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--cream);
}

.notif-header-action {
  background: none;
  border: none;
  color: var(--cream);
  font-size: 0.75rem;
  cursor: pointer;
  font-family: 'Manrope', sans-serif;
}

.notif-header-action:hover {
  color: #fff;
}

.notif-list {
  max-height: calc(70vh - 48px);
  max-height: calc(70dvh - 48px);
  overflow-y: auto;
}

.notif-item {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.15s;
}

.notif-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.notif-item.notif-unread {
  border-left: 3px solid var(--crimson);
}

.notif-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--cream);
  margin-bottom: 2px;
}

.notif-msg {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.3;
}

.notif-time {
  font-size: 0.65rem;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 4px;
}

.notif-item.notif-unread .notif-title {
  color: #fff;
}

@keyframes shimmer {
  0% {
    background-position: -200px 0;
  }
  100% {
    background-position: 200px 0;
  }
}

.skeleton {
  background: linear-gradient(90deg, var(--border-faint) 25%, #e8e8e8 50%, var(--border-faint) 75%);
  background-size: 400px 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-card {
  height: 120px;
  margin-bottom: 12px;
}

.skeleton-row {
  height: 60px;
  margin-bottom: 8px;
}

.field-error {
  border-color: var(--crimson) !important;
}

.field-error-text {
  color: var(--crimson);
  font-size: 0.7rem;
  margin-top: 4px;
}

.form-status-box {
  background: linear-gradient(180deg, rgba(53, 94, 59, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
  border: 1px solid rgba(53, 94, 59, 0.16);
  color: var(--text-primary);
  padding: 12px 14px;
  border-radius: 14px;
  margin-bottom: 16px;
  font-size: 0.82rem;
  line-height: 1.45;
  box-shadow: var(--premium-ring), 0 10px 20px rgba(53, 94, 59, 0.06);
}

.form-status-box.is-error {
  background: linear-gradient(180deg, rgba(161, 49, 58, 0.1) 0%, rgba(255, 255, 255, 0.95) 100%);
  border-color: rgba(161, 49, 58, 0.2);
  color: var(--crimson);
  box-shadow: var(--premium-ring), 0 10px 20px rgba(161, 49, 58, 0.08);
}

.modal-error-box {
  background: linear-gradient(180deg, rgba(161, 49, 58, 0.1) 0%, rgba(255, 255, 255, 0.96) 100%);
  border: 1px solid rgba(161, 49, 58, 0.2);
  color: var(--crimson);
  padding: 10px 12px;
  border-radius: 14px;
  margin: -8px 0 16px;
  font-size: 0.8rem;
  line-height: 1.4;
  box-shadow: var(--premium-ring), 0 10px 20px rgba(161, 49, 58, 0.08);
}

.modal-hint {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin: -8px 0 16px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
  margin-top: 18px;
}

.registration-form {
  display: flex;
  flex-direction: column;
}

.registration-form .save-btn {
  margin-top: 4px;
}

@media (max-width: 450px) {
  .header-actions {
    gap: 4px;
  }

  .notif-dropdown {
    width: calc(100vw - 16px);
    right: -4px;
    border-radius: 10px;
  }
}
