/* ==========================================================================
   IR PROMPT LIBRARY ACCESS GATE POPUP
   Matches exact visual design from "Website Pop Up.png" & reference modal
   ========================================================================== */

/* Lock body scrolling when gate is active */
body.ir-gate-locked,
html.ir-gate-locked {
  overflow: hidden !important;
  height: 100vh !important;
}

/* Modal Overlay Backdrop */
.ir-gate-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999999;
  background: rgba(10, 10, 14, 0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  opacity: 1;
  transition: opacity 0.35s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.35s ease;
}

.ir-gate-overlay.ir-gate-closing {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Modal Card */
.ir-gate-card {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: #FFFFFF;
  border-radius: 28px;
  box-shadow: 
    0 25px 60px -12px rgba(0, 0, 0, 0.45),
    0 12px 28px -8px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(0, 0, 0, 0.04);
  padding: 44px 34px 40px 34px;
  box-sizing: border-box;
  text-align: center;
  transform: scale(1);
  animation: irGateCardPop 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.ir-gate-closing .ir-gate-card {
  transform: scale(0.94);
  transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes irGateCardPop {
  0% {
    opacity: 0;
    transform: scale(0.9);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* Logo */
.ir-gate-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 22px;
}

.ir-gate-logo {
  height: 48px;
  width: auto;
  max-width: 110px;
  object-fit: contain;
  display: block;
}

/* Headline */
.ir-gate-title {
  margin: 0 0 14px 0;
  font-family: 'Cabinet Grotesk', 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  font-size: 26px;
  font-weight: 900;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #0A0A0C;
  text-transform: uppercase;
}

/* Subtitle */
.ir-gate-subtitle {
  margin: 0 0 28px 0;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  color: #374151;
}

/* Form */
.ir-gate-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
}

.ir-gate-field {
  position: relative;
  width: 100%;
  text-align: left;
}

/* Input Fields */
.ir-gate-input {
  width: 100%;
  height: 52px;
  background: #FFFFFF;
  border: 1.5px solid #CBD5E1;
  border-radius: 12px;
  padding: 0 18px;
  box-sizing: border-box;
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  font-size: 15.5px;
  color: #111827;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.ir-gate-input::placeholder {
  color: #94A3B8;
  font-weight: 400;
}

.ir-gate-input:focus {
  border-color: #E50914;
  background-color: #FFFFFF;
  box-shadow: 0 0 0 3px rgba(229, 9, 20, 0.12);
}

.ir-gate-input.ir-input-error {
  border-color: #EF4444 !important;
  background-color: #FFF5F5 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Inline Field Error Messages */
.ir-field-error {
  display: none;
  color: #DC2626;
  font-size: 12.5px;
  font-weight: 500;
  margin-top: 6px;
  padding-left: 4px;
  line-height: 1.35;
}

.ir-field-error.show {
  display: block;
}

/* CTA Pill Button */
.ir-gate-btn {
  width: 100%;
  height: 54px;
  margin-top: 4px;
  background: #E50914;
  color: #FFFFFF;
  border: none;
  border-radius: 9999px;
  font-family: 'Cabinet Grotesk', 'Bricolage Grotesque', 'Plus Jakarta Sans', sans-serif;
  font-size: 15.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 10px 24px -4px rgba(229, 9, 20, 0.45);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.ir-gate-btn:hover:not(:disabled) {
  background: #CC0812;
  transform: translateY(-1.5px);
  box-shadow: 0 14px 28px -4px rgba(229, 9, 20, 0.55);
}

.ir-gate-btn:active:not(:disabled) {
  transform: scale(0.98);
}

.ir-gate-btn:disabled {
  opacity: 0.85;
  cursor: default;
}

.ir-gate-btn.ir-btn-success {
  background: #10B981 !important;
  box-shadow: 0 10px 24px -4px rgba(16, 185, 129, 0.45) !important;
}

/* Spinner */
.ir-gate-spinner {
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.35);
  border-top-color: #FFFFFF;
  border-radius: 50%;
  animation: irSpinnerSpin 0.7s linear infinite;
  display: inline-block;
}

@keyframes irSpinnerSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Mobile responsive adjustments */
@media (max-width: 480px) {
  .ir-gate-card {
    padding: 34px 22px 30px 22px;
    border-radius: 24px;
    max-width: 94vw;
  }
  
  .ir-gate-logo {
    height: 42px;
  }
  
  .ir-gate-title {
    font-size: 22px;
    line-height: 1.2;
    margin-bottom: 12px;
  }
  
  .ir-gate-subtitle {
    font-size: 14px;
    line-height: 1.4;
    margin-bottom: 22px;
  }
  
  .ir-gate-input {
    height: 48px;
    font-size: 15px;
  }
  
  .ir-gate-btn {
    height: 50px;
    font-size: 14.5px;
  }
}
