/* Trigger buttons (if shortcode used) */
.ahc-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.ahc-btn {
  padding: 12px 18px;
  border: 0;
  background: #111;
  color: #fff;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}
.ahc-btn:hover {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* === Modern Popup === */
.ahc-modal[hidden] {
  display: none;
}
.ahc-modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 14, 19, 0.55);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}
.ahc-modal__box {
  width: 100%;
  max-width: 480px;
  background: #0f1221;
  color: #e8ebff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  padding: 22px 22px 18px;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.ahc-close {
  position: absolute;
  top: 12px;
  right: 12px;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}
.ahc-close:hover {
  background: rgba(255, 255, 255, 0.14);
}
.ahc-modal__header {
  margin-bottom: 12px;
}
.ahc-modal__header h3 {
  margin: 0 0 6px;
  font-size: 20px;
}
.ahc-plan {
  font-size: 13px;
  opacity: 0.85;
}

.ahc-form {
  display: grid;
  gap: 12px;
  margin-top: 6px;
}
.ahc-field {
  display: grid;
  gap: 8px;
}
.ahc-field span {
  font-size: 13px;
  opacity: 0.85;
}
.ahc-field input {
  width: 100%;
  padding: 12px 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: #0b0e1a;
  color: #fff;
  border-radius: 12px;
  outline: none;
}
.ahc-field input:focus {
  border-color: #7c8bff;
  box-shadow: 0 0 0 3px rgba(124, 139, 255, 0.25);
}

.ahc-submit {
  margin-top: 6px;
  width: 100%;
  padding: 12px 16px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(180deg, #7c8bff, #5b64ff);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  font-size: 15px;
  box-shadow: 0 12px 24px rgba(92, 101, 255, 0.25);
}
.ahc-submit:hover {
  filter: brightness(1.03);
  transform: translateY(-1px);
}

.ahc-error {
  margin-top: 10px;
  color: #ffb4c0;
  background: rgba(255, 91, 91, 0.12);
  padding: 10px;
  border-radius: 10px;
}

/* === Full-screen Embedded Checkout Overlay === */
.ahc-embedded-overlay[hidden] {
  display: none;
}
.ahc-embedded-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #0b0f1c;
  color: #fff;
  display: flex;
  flex-direction: column;
}
.ahc-embedded-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ahc-embedded-header h3 {
  margin: 0;
  font-size: 16px;
}
.ahc-embedded-header .ahc-close {
  position: static;
  margin-left: auto;
  background: rgba(255, 255, 255, 0.1);
}
.ahc-embedded-checkout {
  flex: 1;
  min-height: 0; /* allow it to fill */
  padding: 16px;
  overflow: auto;
}

/* Small improvements */
@media (max-width: 480px) {
  .ahc-modal__box {
    padding: 18px 16px 14px;
    border-radius: 14px;
  }
  .ahc-close {
    width: 34px;
    height: 34px;
  }
}


/* Loading state */
.ahc-submit.is-loading {
  opacity: 0.8;
  pointer-events: none;
  position: relative;
}

.ahc-submit.is-loading::after {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-left: 8px;
  vertical-align: -3px;
  border: 2px solid #fff;
  border-top-color: transparent;
  border-radius: 50%;
  animation: ahc-spin 0.8s linear infinite;
}

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