/* ===== USAX Modal + Form + Gate Styles ===== */

/* MODAL SHELL */
.usx-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(5,10,24,0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow-y: auto;
}
.usx-modal.is-open { display: flex; }
.usx-modal-card {
  position: relative;
  position: relative;
  width: 100%;
  max-width: 880px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: #0B1328;
  border: 1px solid rgba(196,171,108,0.35);
  border-radius: 10px;
  box-shadow: 0 40px 80px rgba(0,0,0,0.6), 0 0 40px rgba(196,171,108,0.1);
  animation: usxCardIn 0.25s ease-out;
}
@keyframes usxCardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.usx-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(0,0,0,0.35);
  border-radius: 50%;
  color: #C4AB6C;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, color 0.2s;
  z-index: 2;
}
.usx-modal-close:hover { border-color: #C4AB6C; color: #F5F2ED; }

/* VIDEO PLAYER */
.usx-video-wrap {
  position: relative;
  width: 100%;
  background: #000;
  aspect-ratio: 16 / 9;
  border-radius: 10px 10px 0 0;
  overflow: hidden;
}
.usx-video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
}

/* FORM BODY */
.usx-form-body {
  padding: 32px 40px 36px;
  font-family: 'IBM Plex Sans', sans-serif;
  color: #E8E4DC;
}
.usx-form-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 20px;
  font-weight: 600;
  color: #F5F2ED;
  margin-bottom: 6px;
}
.usx-form-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #C4AB6C;
  margin-bottom: 24px;
}

.usx-field { margin-bottom: 16px; }
.usx-field label {
  display: block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: #A9A49A;
  margin-bottom: 6px;
}
.usx-field input[type="text"],
.usx-field input[type="email"],
.usx-field select,
.usx-field textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 14px;
  color: #F5F2ED;
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 6px;
  transition: border-color 0.2s, background 0.2s;
}
.usx-field input:focus,
.usx-field select:focus,
.usx-field textarea:focus {
  outline: none;
  border-color: #C4AB6C;
  background: rgba(0,0,0,0.5);
}
.usx-field textarea {
  min-height: 80px;
  resize: vertical;
  font-family: 'IBM Plex Sans', sans-serif;
}
.usx-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%23C4AB6C'><path d='M10 12l-5-5h10z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.usx-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 540px) { .usx-row { grid-template-columns: 1fr; } }

.usx-submit {
  width: 100%;
  margin-top: 8px;
  padding: 14px 28px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #0B1328;
  background: linear-gradient(135deg, #BF953F, #FCF6BA, #B38728, #FBF5B7, #AA771C);
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: box-shadow 0.25s, transform 0.15s;
}
.usx-submit:hover { box-shadow: 0 0 30px rgba(191,149,63,0.4); }
.usx-submit:active { transform: translateY(1px); }
.usx-submit:disabled { opacity: 0.6; cursor: wait; }

.usx-form-status {
  margin-top: 14px;
  padding: 12px 14px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 12px;
  border-radius: 6px;
  display: none;
}
.usx-form-status.ok {
  display: block;
  color: #9DC98F;
  background: rgba(74,125,60,0.15);
  border: 1px solid rgba(74,125,60,0.4);
}
.usx-form-status.err {
  display: block;
  color: #E8A08C;
  background: rgba(153,64,48,0.15);
  border: 1px solid rgba(153,64,48,0.4);
}

/* SUCCESS OVERLAY — covers modal card after submit */
.usx-success-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(5,10,24,0.92);
  border-radius: 12px;
  animation: usxFadeIn 0.3s ease;
}
.usx-success-msg {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  color: #9DC98F;
  text-align: center;
  line-height: 1.7;
  padding: 40px;
  letter-spacing: 0.3px;
}
@keyframes usxFadeIn { from { opacity: 0; } to { opacity: 1; } }

.usx-fine {
  margin-top: 16px;
  font-size: 11px;
  line-height: 1.6;
  color: rgba(169,164,154,0.8);
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: 0.3px;
}

/* GATED CONTENT */
.usx-gate {
  max-width: 640px;
  margin: 0 auto 64px;
  padding: 40px 36px;
  background: rgba(11,19,40,0.85);
  border: 1px solid rgba(196,171,108,0.35);
  border-radius: 10px;
}
.usx-gate-kicker {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #C4AB6C;
  margin-bottom: 10px;
}
.usx-gate-title {
  font-family: 'IBM Plex Sans', sans-serif;
  font-size: 22px;
  font-weight: 600;
  color: #F5F2ED;
  margin-bottom: 10px;
  line-height: 1.35;
}
.usx-gate-desc {
  font-size: 15px;
  line-height: 1.65;
  color: rgba(232,228,220,0.82);
  margin-bottom: 24px;
}
.usx-gated-content { display: none; }
.usx-gated-content.is-unlocked { display: block; }
