/* Send Message box — sergetheoriginal.com
   Styled on the site's own design tokens (style.css :root):
   --bg-dark #0a0a0c, --card-bg rgba(20,20,25,0.7), --text-dim #94a3b8,
   --border-color rgba(255,255,255,0.08), neon accents blue/cyan/purple,
   Inter typeface, 24px card radius, 12px control radius. */

.mbx-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 5, 8, 0.66);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: "Inter", sans-serif;
}

.mbx-overlay.mbx-open { display: flex; }

.mbx-card {
  position: relative;
  width: 100%;
  max-width: 500px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--card-bg, rgba(20, 20, 25, 0.88));
  backdrop-filter: blur(18px) saturate(1.3);
  -webkit-backdrop-filter: blur(18px) saturate(1.3);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 24px;
  padding: 38px 38px 32px;
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), 0 4px 18px rgba(0, 0, 0, 0.4);
  color: #f8fafc;
  animation: mbx-in 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Gradient accent strip across the top — the site's cyan -> blue -> purple. */
.mbx-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg,
    var(--neon-cyan, #06b6d4),
    var(--neon-blue, #3b82f6),
    var(--neon-purple, #a855f7));
}

@keyframes mbx-in {
  from { opacity: 0; transform: translateY(14px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.mbx-title {
  margin: 0 44px 8px 0;
  font-size: 28px;
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.mbx-subtitle {
  margin: 0 0 26px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-dim, #94a3b8);
}

.mbx-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  color: #cbd5e1;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.mbx-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; transform: rotate(90deg); }

.mbx-field { margin-bottom: 18px; }

.mbx-label {
  display: block;
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim, #94a3b8);
}

.mbx-input,
.mbx-textarea {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  padding: 13px 15px;
  font: inherit;
  font-size: 15px;
  color: #f8fafc;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.mbx-input::placeholder,
.mbx-textarea::placeholder { color: #5b6b7f; }

.mbx-input:focus,
.mbx-textarea:focus {
  border-color: var(--neon-blue, #3b82f6);
  background: rgba(255, 255, 255, 0.05);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.18);
}

.mbx-textarea { min-height: 128px; resize: vertical; }

/* Cloudflare Turnstile widget slot (empty until a site key is set). */
.mbx-turnstile {
  display: flex;
  justify-content: center;
  margin: 2px 0 18px;
}
.mbx-turnstile:empty { margin: 0; }

/* Honeypot: invisible to people, tempting to bots. */
.mbx-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.mbx-submit {
  width: 100%;
  margin-top: 6px;
  padding: 14px 16px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg,
    var(--neon-cyan, #06b6d4),
    var(--neon-blue, #3b82f6) 55%,
    var(--neon-purple, #a855f7));
  color: #ffffff;
  font: inherit;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(59, 130, 246, 0.35);
  transition: all 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.mbx-submit:hover { filter: brightness(1.12); transform: translateY(-1px); box-shadow: 0 14px 30px rgba(59, 130, 246, 0.42); }
.mbx-submit:active { transform: translateY(0); }
.mbx-submit:disabled { opacity: 0.55; cursor: default; transform: none; }

.mbx-status {
  display: none;
  margin: 18px 0 0;
  padding: 13px 15px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
}

.mbx-status.mbx-show { display: block; }
.mbx-status.mbx-ok  { background: rgba(16, 185, 129, 0.13); color: #6ee7b7; border: 1px solid rgba(16, 185, 129, 0.35); }
.mbx-status.mbx-err { background: rgba(220, 60, 60, 0.12); color: #fca5a5; border: 1px solid rgba(220, 60, 60, 0.35); }

.mbx-status a { color: inherit; text-decoration: underline; }

/* Success view: replaces the form after a send. */
.mbx-card [hidden] { display: none !important; }

.mbx-success { text-align: center; padding: 12px 0 4px; }

.mbx-check {
  width: 68px;
  height: 68px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg,
    var(--neon-cyan, #06b6d4),
    var(--neon-blue, #3b82f6) 55%,
    var(--neon-purple, #a855f7));
  color: #ffffff;
  font-size: 32px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(59, 130, 246, 0.4);
  animation: mbx-pop 0.45s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes mbx-pop {
  from { opacity: 0; transform: scale(0.55); }
  to   { opacity: 1; transform: scale(1); }
}

.mbx-success-title {
  margin: 20px 0 8px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #ffffff;
}

.mbx-success-text {
  margin: 0 0 24px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-dim, #94a3b8);
}

.mbx-done {
  width: 100%;
  margin-top: 10px;
  padding: 13px 16px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 12px;
  background: transparent;
  color: #cbd5e1;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

.mbx-done:hover { background: rgba(255, 255, 255, 0.06); color: #ffffff; }

@media (max-width: 560px) {
  .mbx-card { padding: 30px 22px 24px; border-radius: 20px; }
  .mbx-title { font-size: 24px; }
}
