/* =============================================================================
   MIHWARIY CONSULTANCY — SITE-WIDE TURNSTILE GATE OVERLAY  v2.2
   File: assets/css/turnstile-gate.css
   Color scheme: dark (#0F0E0C) + gold (#C9A83C) — matches site design system
   ============================================================================= */

/* ── Overlay backdrop ─────────────────────────────────────────────────────── */
#mwry-gate {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background:
    radial-gradient(ellipse 70% 50% at 65% 25%, rgba(201,168,60,0.07) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 25% 80%, rgba(201,168,60,0.04) 0%, transparent 55%),
    linear-gradient(155deg, #09090b 0%, #0d0f12 45%, #07090b 100%);
  /* subtle grain using svg noise */
  animation: mwry-gate-in 0.35s cubic-bezier(0.22,1,0.36,1) both;
}

@keyframes mwry-gate-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Fade-out applied by JS on successful verification */
#mwry-gate.gate-fading {
  opacity: 0;
  transition: opacity 0.45s ease;
  pointer-events: none;
}

/* ── Card ─────────────────────────────────────────────────────────────────── */
#mwry-gate-card {
  position: relative;
  background: linear-gradient(160deg, #16181e 0%, #111318 60%, #0e1016 100%);
  border: 1px solid rgba(201,168,60,0.20);
  border-radius: 16px;
  padding: 2.5rem 2.25rem 2rem;
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.6),
    0 4px 6px -1px rgba(0,0,0,0.3),
    0 24px 60px rgba(0,0,0,0.7),
    0 0 100px rgba(201,168,60,0.05),
    inset 0 1px 0 rgba(255,255,255,0.04);
  animation: mwry-card-in 0.42s cubic-bezier(0.22,1,0.36,1) both;
  animation-delay: 0.06s;
}

@keyframes mwry-card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

/* Top accent line */
#mwry-gate-card::before {
  content: '';
  position: absolute;
  top: 0; left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(201,168,60,0.55) 40%,
    rgba(201,168,60,0.55) 60%,
    transparent 100%);
  border-radius: 0 0 100px 100px;
}

/* ── Logo / shield icon ───────────────────────────────────────────────────── */
#mwry-gate-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(145deg,
    rgba(201,168,60,0.14) 0%,
    rgba(201,168,60,0.05) 100%);
  border: 1px solid rgba(201,168,60,0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.35rem;
  box-shadow:
    0 0 0 6px rgba(201,168,60,0.05),
    0 8px 20px rgba(0,0,0,0.3);
}

#mwry-gate-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #C9A83C;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ── Site name ────────────────────────────────────────────────────────────── */
#mwry-gate-site-name {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: rgba(201,168,60,0.55);
  margin: 0 0 .5rem;
}

/* ── Title ────────────────────────────────────────────────────────────────── */
#mwry-gate-title {
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  color: #e8edf8;
  margin: 0 0 .3rem;
  letter-spacing: -.01em;
  line-height: 1.25;
}

/* ── Subtitle ─────────────────────────────────────────────────────────────── */
#mwry-gate-subtitle {
  font-size: .78rem;
  color: rgba(200,215,230,0.40);
  margin: 0 0 1.6rem;
  line-height: 1.6;
}

/* ── Divider above widget ─────────────────────────────────────────────────── */
#mwry-gate-card .mwry-divider {
  width: 100%;
  height: 1px;
  background: rgba(255,255,255,0.05);
  margin: 0 0 1.25rem;
}

/* ── Turnstile widget container ───────────────────────────────────────────── */
#mwry-gate-widget {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 68px;
  margin-bottom: 1rem;
  border-radius: 8px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.04);
  overflow: hidden;
}

#mwry-gate-widget iframe {
  border-radius: 6px;
}

/* ── Loading state ────────────────────────────────────────────────────────── */
#mwry-gate-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  color: rgba(200,215,230,.30);
  font-size: .74rem;
  letter-spacing: .01em;
  min-height: 68px;
  width: 100%;
}

#mwry-gate-loading::before {
  content: '';
  width: 14px;
  height: 14px;
  border: 1.5px solid rgba(201,168,60,.15);
  border-top-color: rgba(201,168,60,.70);
  border-radius: 50%;
  animation: mwry-spin .75s linear infinite;
  flex-shrink: 0;
}

@keyframes mwry-spin {
  to { transform: rotate(360deg); }
}

/* ── Fine print / Cloudflare note ────────────────────────────────────────── */
#mwry-gate-note {
  font-size: .66rem;
  color: rgba(200,215,230,.18);
  margin: 0;
  line-height: 1.65;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .3rem;
  flex-wrap: wrap;
}

/* Cloudflare logo–ish dot */
#mwry-gate-note::before {
  content: '';
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(201,168,60,0.35);
  flex-shrink: 0;
}

#mwry-gate-note a {
  color: rgba(201,168,60,.40);
  text-decoration: none;
  transition: color .2s;
}
#mwry-gate-note a:hover { color: rgba(201,168,60,.75); }

/* ── Error message + retry ────────────────────────────────────────────────── */
#mwry-gate-error {
  display: none;
  font-size: .74rem;
  color: #f87171;
  margin: .65rem 0 0;
  line-height: 1.5;
  padding: .5rem .75rem;
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.18);
  border-radius: 6px;
}

#mwry-gate-error.visible { display: block; }

#mwry-gate-retry {
  background: none;
  border: none;
  color: #C9A83C;
  font-size: inherit;
  font-family: inherit;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color .2s;
}
#mwry-gate-retry:hover { color: #dbbe58; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 440px) {
  #mwry-gate { padding: .75rem; }

  #mwry-gate-card {
    padding: 2rem 1.35rem 1.65rem;
    border-radius: 14px;
    max-width: 100%;
  }

  #mwry-gate-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    margin-bottom: 1.1rem;
  }

  #mwry-gate-title { font-size: 1rem; }

  #mwry-gate-subtitle {
    font-size: .76rem;
    margin-bottom: 1.25rem;
  }
}
