/* ==== Inline error bubbles (match Volunteer Signup) ==== */
.field {
  position: relative;
  margin-bottom: 14px;
}

.invalid {
  border-color: #ef4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.error-pop {
  position: absolute;
  left: 12px;
  top: -34px;
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
  line-height: 1.35;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  white-space: normal;
  display: none;
  z-index: 2100;
}
.error-pop::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 12px;
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid #fecaca;
}
@media (max-width: 480px) {
  .error-pop {
    left: 8px;
    right: 8px;
    top: -40px;
    max-width: calc(100% - 16px);
  }
}

/* Standard inputs focus look you already use */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="password"],
select {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #d7e3e3;
  border-radius: 10px;
  background: #fff;
  font-size: 0.98rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus,
select:focus {
  border-color: #2a9c93;
  box-shadow: 0 0 0 3px rgba(42, 156, 147, 0.15);
}

/* ==== Modal overlay (match Volunteer Signup) ==== */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}
.modal {
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  max-width: 420px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.modal .modal-actions {
  margin-top: 16px;
  display: flex;
  gap: 8px;
  justify-content: center;
}
.modal .btn {
  padding: 10px 14px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  font-weight: 700;
}
.modal .btn-primary {
  background: #36b3a8;
  color: #fff;
}
.modal .btn-primary:hover {
  background: #2a9c93;
}
.modal .btn-ghost {
  background: transparent;
  color: #333;
}

/* ==== Toasts (new, to replace alert()) ==== */
#toast-container {
  position: fixed;
  top: 18px;
  right: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 5000;
}
.toast {
  min-width: 260px;
  max-width: min(92vw, 380px);
  padding: 12px 14px;
  border-radius: 10px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  display: grid;
  grid-template-columns: 24px 1fr auto;
  gap: 10px;
  align-items: start;
  animation: slideIn 0.22s ease-out;
}
.toast .icon {
  font-size: 18px;
  line-height: 1;
  margin-top: 2px;
}
.toast .msg {
  font-size: 14px;
  color: #1f2937;
}
.toast .close {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #374151;
}
.toast.success {
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.toast.success .icon {
  color: #059669;
}
.toast.error {
  background: #fef2f2;
  border: 1px solid #fecaca;
}
.toast.error .icon {
  color: #b91c1c;
}
.toast.info {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}
.toast.info .icon {
  color: #1d4ed8;
}
.toast.warn {
  background: #fffbeb;
  border: 1px solid #fde68a;
}
.toast.warn .icon {
  color: #b45309;
}

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