/* ===================================================
   Contact Form — Supplemental Styles
   Bashchi Nigeria LTD
   =================================================== */

/* ── Honeypot: invisible to humans ──────────────────── */
.hp-field {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  tab-index: -1;
}

/* ── Status messages ────────────────────────────────── */
#formStatus {
  margin-top: 18px;
  padding: 0;
  border-radius: 8px;
  font-size: 0.93rem;
  line-height: 1.6;
  transition: all 0.35s ease;
}

#formStatus:empty {
  display: none;
}

#formStatus.success {
  display: block;
  padding: 16px 20px;
  background: rgba(31, 107, 58, 0.08);
  border: 1px solid rgba(31, 107, 58, 0.25);
  color: #1f6b3a;
}

#formStatus.error {
  display: block;
  padding: 16px 20px;
  background: rgba(200, 40, 40, 0.07);
  border: 1px solid rgba(200, 40, 40, 0.25);
  color: #a02020;
}

/* ── Button states ──────────────────────────────────── */
.contact-form .btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── Sending spinner inside button ──────────────────── */
.contact-form .btn .spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===================================================
   Toast Notification System
   =================================================== */

/* ── Host container ─────────────────────────────────── */
#toastHost {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: none;
  max-width: 400px;
  width: calc(100% - 48px);
}

/* ── Individual toast card ──────────────────────────── */
.toast {
  pointer-events: auto;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 44px 18px 20px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(1.6);
  -webkit-backdrop-filter: blur(16px) saturate(1.6);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.1),
    0 1.5px 6px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  transform: translateX(110%);
  opacity: 0;
  animation: toastIn 400ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
  will-change: transform, opacity;
}

.toast.toast--exit {
  animation: toastOut 400ms cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

/* Left accent bar */
.toast::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  border-radius: 16px 0 0 16px;
}

/* ── Type variants ──────────────────────────────────── */
.toast--success::before {
  background: linear-gradient(180deg, #34d399, #10b981);
}
.toast--success .toast__icon {
  background: linear-gradient(
    135deg,
    rgba(16, 185, 129, 0.15),
    rgba(52, 211, 153, 0.1)
  );
  color: #059669;
}

.toast--error::before {
  background: linear-gradient(180deg, #f87171, #ef4444);
}
.toast--error .toast__icon {
  background: linear-gradient(
    135deg,
    rgba(239, 68, 68, 0.15),
    rgba(248, 113, 113, 0.1)
  );
  color: #dc2626;
}

.toast--info::before {
  background: linear-gradient(180deg, #60a5fa, #3b82f6);
}
.toast--info .toast__icon {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.15),
    rgba(96, 165, 250, 0.1)
  );
  color: #2563eb;
}

/* ── Icon bubble ────────────────────────────────────── */
.toast__icon {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.toast__icon svg {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  fill: none;
  stroke: currentColor;
}

/* ── Text block ─────────────────────────────────────── */
.toast__body {
  flex: 1;
  min-width: 0;
}
.toast__title {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 0.92rem;
  color: #1a1a1a;
  margin-bottom: 2px;
  line-height: 1.3;
}
.toast__msg {
  font-size: 0.82rem;
  color: #6b7280;
  line-height: 1.45;
}

/* ── Close button ───────────────────────────────────── */
.toast__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 24px;
  height: 24px;
  border: none;
  background: rgba(0, 0, 0, 0.04);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #9ca3af;
  transition:
    background 0.2s,
    color 0.2s;
  padding: 0;
  line-height: 1;
}
.toast__close:hover {
  background: rgba(0, 0, 0, 0.08);
  color: #374151;
}
.toast__close svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* ── Progress bar ───────────────────────────────────── */
.toast__progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  border-radius: 0 0 16px 16px;
  animation: toastProgress 4000ms linear forwards;
  will-change: width;
}
.toast--success .toast__progress {
  background: linear-gradient(90deg, #34d399, #10b981);
}
.toast--error .toast__progress {
  background: linear-gradient(90deg, #f87171, #ef4444);
}
.toast--info .toast__progress {
  background: linear-gradient(90deg, #60a5fa, #3b82f6);
}

/* ── Keyframes ──────────────────────────────────────── */
@keyframes toastIn {
  from {
    transform: translateX(110%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toastOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(110%);
    opacity: 0;
  }
}

@keyframes toastProgress {
  from {
    width: 100%;
  }
  to {
    width: 0%;
  }
}

/* ── Reduced motion ─────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .toast {
    animation-duration: 1ms !important;
  }
  .toast.toast--exit {
    animation-duration: 1ms !important;
  }
  .toast__progress {
    animation: none !important;
    width: 0 !important;
  }
}

/* ── Mobile adjustments ─────────────────────────────── */
@media (max-width: 480px) {
  #toastHost {
    top: 12px;
    right: 12px;
    max-width: calc(100% - 24px);
    width: calc(100% - 24px);
  }
  .toast {
    padding: 14px 40px 14px 16px;
    border-radius: 12px;
    gap: 10px;
  }
  .toast__icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
  }
  .toast__icon svg {
    width: 16px;
    height: 16px;
  }
  .toast__title {
    font-size: 0.85rem;
  }
  .toast__msg {
    font-size: 0.78rem;
  }
}
