/**
 * Aetheris Static Frictionless Order Modal Styles
 * WCAG AAA Compliant Clear Mode with Glassmorphic Backdrop
 */

:root {
  --ae-modal-accent: #22c55e;
  --ae-modal-accent-hover: #16a34a;
  --ae-modal-bg: #ffffff;
  --ae-modal-text: #0f172a;
  --ae-modal-muted: #64748b;
  --ae-modal-border: #e2e8f0;
}

#aetheris-order-modal {
  display: none;
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999999;
  background: rgba(15, 23, 42, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  opacity: 0;
  transition: opacity 0.25s ease-in-out;
}

#aetheris-order-modal.ae-open {
  display: flex !important;
  opacity: 1;
}

.ae-modal-card {
  background: var(--ae-modal-bg);
  border: 1px solid var(--ae-modal-border);
  border-radius: 24px;
  padding: 32px 28px;
  max-width: 500px;
  width: 100%;
  position: relative;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35);
  box-sizing: border-box;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  max-height: 92vh;
  overflow-y: auto;
}

#aetheris-order-modal.ae-open .ae-modal-card {
  transform: translateY(0) scale(1);
}

.ae-modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  background: #f1f5f9;
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  font-size: 16px;
  font-weight: 700;
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.ae-modal-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.ae-modal-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #059669;
  font-weight: 800;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
  border: 1px solid #a7f3d0;
}

.ae-modal-title {
  color: var(--ae-modal-text);
  font-size: 24px;
  font-weight: 900;
  margin: 0 0 6px 0;
  line-height: 1.25;
}

.ae-modal-desc {
  color: var(--ae-modal-muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 20px 0;
}

.ae-modal-summary-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ae-modal-summary-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.ae-modal-summary-price {
  font-size: 18px;
  font-weight: 900;
  color: var(--ae-modal-text);
}

.ae-modal-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.ae-form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: left;
}

.ae-form-label {
  font-size: 13px;
  font-weight: 700;
  color: #334155;
}

.ae-form-label span.req {
  color: #ef4444;
}

.ae-form-input,
.ae-form-select {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14.5px;
  color: #0f172a;
  background: #ffffff;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.ae-form-input:focus,
.ae-form-select:focus {
  border-color: var(--ae-modal-accent);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.ae-modal-submit-btn {
  width: 100%;
  background: var(--ae-modal-accent);
  color: #ffffff;
  padding: 16px;
  border-radius: 12px;
  border: none;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 6px;
  box-shadow: 0 10px 25px rgba(34, 197, 94, 0.35);
  transition: background 0.2s, transform 0.15s;
}

.ae-modal-submit-btn:hover {
  background: var(--ae-modal-accent-hover);
  transform: translateY(-1px);
}

.ae-modal-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.ae-modal-guarantee {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 14px;
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
}

.ae-modal-error {
  display: none;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 12px;
  text-align: left;
}

@media (max-width: 480px) {
  .ae-modal-card {
    padding: 24px 18px;
    border-radius: 20px;
  }
  .ae-modal-title {
    font-size: 20px;
  }
}
