/* ============================================================
   365Med WWHAM Checker — wwham.css
   ============================================================ */

/* ── Modal backdrop ─────────────────────────────────────────── */
.wwham-modal {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
}
.wwham-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

/* ── Modal box ──────────────────────────────────────────────── */
.wwham-modal-box {
  position: relative;
  background: #fff;
  border-radius: 14px;
  width: 92%;
  max-width: 680px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
  padding: 32px;
  scroll-behavior: smooth;
}

/* ── Close button ───────────────────────────────────────────── */
.wwham-close-btn {
  position: absolute;
  top: 16px;
  right: 18px;
  background: none;
  border: none;
  font-size: 26px;
  color: #888;
  cursor: pointer;
  line-height: 1;
  padding: 0;
  transition: color 0.2s;
}
.wwham-close-btn:hover { color: #333; }

/* ── Header ─────────────────────────────────────────────────── */
.wwham-modal-header {
  text-align: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f4f5;
}
.wwham-header-icon {
  font-size: 48px;
  margin-bottom: 12px;
}
.wwham-modal-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #005eb8;
  margin: 0 0 10px;
}
.wwham-modal-header p {
  font-size: 0.9rem;
  color: #555;
  margin: 0 0 6px;
  line-height: 1.6;
}
.wwham-product-label {
  font-size: 0.85rem;
  color: #005eb8;
  margin-top: 10px !important;
}

/* ── Alert box ──────────────────────────────────────────────── */
.wwham-alert {
  border-radius: 6px;
  padding: 12px 16px;
  margin-bottom: 20px;
  font-size: 0.9rem;
  line-height: 1.5;
}
.wwham-alert--error   { background: #fff0f0; border: 1px solid #f5c6cb; color: #721c24; }
.wwham-alert--warning { background: #fff8e1; border: 1px solid #ffe082; color: #5d4037; }
.wwham-alert--success { background: #e8f5e9; border: 1px solid #a5d6a7; color: #2e7d32; }

/* ── Form fields ────────────────────────────────────────────── */
.wwham-field {
  margin-bottom: 22px;
}
.wwham-field label {
  display: block;
  font-weight: 700;
  font-size: 0.95rem;
  color: #1a3c6e;
  margin-bottom: 4px;
}
.wwham-letter {
  display: inline-block;
  background: #005eb8;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  text-align: center;
  line-height: 22px;
  margin-right: 6px;
  flex-shrink: 0;
}
.wwham-hint {
  font-size: 0.8rem;
  color: #888;
  margin: 2px 0 8px;
  line-height: 1.4;
}
.wwham-field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid #d0d7e0;
  border-radius: 7px;
  font-size: 0.92rem;
  font-family: inherit;
  color: #333;
  resize: vertical;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
  line-height: 1.5;
}
.wwham-field textarea:focus {
  outline: none;
  border-color: #005eb8;
  box-shadow: 0 0 0 3px rgba(0, 94, 184, 0.12);
}
.wwham-field--error textarea {
  border-color: #e74c3c;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}
.wwham-field-err {
  font-size: 0.8rem;
  color: #e74c3c;
  margin-top: 5px;
  min-height: 18px;
  font-weight: 500;
}

/* ── Pharmacy notice box ────────────────────────────────────── */
.wwham-notice {
  background: #fff8e1;
  border-left: 4px solid #f39c12;
  border-radius: 0 6px 6px 0;
  padding: 12px 16px;
  font-size: 0.85rem;
  color: #5d4037;
  margin: 24px 0;
  line-height: 1.6;
}

/* ── Modal action buttons ───────────────────────────────────── */
.wwham-modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 8px;
}
.wwham-modal-actions .btn {
  min-width: 140px;
}

/* req asterisk */
.req { color: #e74c3c; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 600px) {
  .wwham-modal-box { padding: 20px 16px; border-radius: 10px 10px 0 0; align-self: flex-end; max-height: 95vh; }
  .wwham-modal     { align-items: flex-end; }
  .wwham-modal-actions { flex-direction: column-reverse; }
  .wwham-modal-actions .btn { width: 100%; text-align: center; }
}
