/* Access Modal Overlay Styles */

.access-gate-modal {
  position: fixed;
  top: 72px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  z-index: 9999;
  -webkit-backdrop-filter:blur(4px);
  backdrop-filter:blur(4px);
  overflow: auto;
  padding: 40px 16px;
}

.access-gate-content {
  background: white;
  border-radius: 12px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.access-gate-home {
  position: absolute;
  top: 16px;
  right: 16px;
  font-size: 16px;
  padding: 8px;
  color: #666;
  text-decoration: none;
  font-weight: 700;
}

.access-gate-home:hover {
  color: #000;
}

.access-gate-message h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 24px;
  color: #000;
}

.access-gate-eyebrow {
  margin: 0 0 8px !important;
  color: #8a6a00 !important;
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.access-gate-message p {
  color: #555;
  margin-bottom: 24px;
  line-height: 1.5;
}

.access-gate-message form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.access-gate-message input,
.access-gate-message select,
.access-gate-message textarea {
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
}

.access-gate-message input:focus,
.access-gate-message select:focus,
.access-gate-message textarea:focus {
  outline: none;
  border-color: #0066cc;
  box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.access-gate-message textarea {
  min-height: 100px;
  resize: vertical;
}

.btn-primary {
  background: #0066cc;
  color: white;
  border: none;
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: #0052a3;
}

.btn-primary:active {
  transform: scale(0.98);
}

/* The delivery gate uses an anchor rather than a scripted button. */
a.btn-primary {
  display: inline-block;
  text-decoration: none;
}

.access-gate-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-ghost {
  display: inline-block;
  padding: 11px 18px;
  border: 1px solid #0066cc;
  border-radius: 6px;
  color: #0066cc;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.btn-ghost:hover {
  background: rgba(0, 102, 204, 0.08);
}

.btn-primary[disabled] {
  opacity: 0.6;
  cursor: progress;
}

.access-gate-note {
  margin-top: 16px;
  font-size: 13px;
  color: #666;
}

.access-gate-note a {
  color: #0066cc;
}

.form-status {
  margin-top: 12px;
  text-align: center;
  font-size: 14px;
  min-height: 20px;
}

.form-status.error {
  color: #a2291b;
}

.access-gate-next {
  padding: 20px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-left: 4px solid #d6a900;
  border-radius: 8px;
  background: #fffaf0;
}

.access-gate-next h3 {
  margin: 0 0 10px;
  color: #111;
  font-size: 20px;
}

.access-gate-next p {
  margin: 0 0 18px;
  color: #555;
  line-height: 1.55;
}

/* Section-level gate (for inline gating within pages) */

.section-gate-overlay {
  position: relative;
  background: rgba(255, 255, 255, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  margin: 18px 0;
  min-height: 280px;
  padding: 28px;
}

.section-gate-message {
  text-align: center;
  pointer-events: auto;
}

.section-gate-message h3 {
  margin: 0 0 8px;
  color: #111;
  font-size: 22px;
}

.section-gate-message p {
  margin: 0 0 12px 0;
  color: #666;
  font-size: 14px;
}

.section-gate-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-small {
  display: inline-block;
  background: #0066cc;
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-small:hover {
  background: #0052a3;
}

.btn-small.ghost {
  background: transparent;
  border: 1px solid #0066cc;
  color: #0066cc;
}

.btn-small.ghost:hover {
  background: rgba(0, 102, 204, 0.08);
}

/* Mobile responsiveness */

@media (max-width: 600px) {
  .access-gate-modal {
    top: 96px;
    padding: 18px 10px;
  }

  .access-gate-content {
    padding: 24px;
    max-width: 90vw;
  }

  .access-gate-message h2 {
    font-size: 20px;
  }

  .access-gate-message input,
  .access-gate-message select,
  .access-gate-message textarea {
    font-size: 16px; /* Prevent zoom on iOS */
  }

  .access-gate-actions,
  .access-gate-actions .btn-primary,
  .access-gate-actions .btn-ghost,
  .access-gate-next .btn-primary {
    width: 100%;
    box-sizing: border-box;
    text-align: center;
  }
}
