/* ================================
   Advertise Modal — Pro Styling
   ================================ */

/* Center the Advertise modal overlay */
#advertisePopup.about-popup {
  position: fixed;
  inset: 0;
  display: none;                /* hidden by default */
  align-items: center;          /* vertical center */
  justify-content: center;      /* horizontal center */
  background: rgba(0,0,0,0.6);
  z-index: 1000;
}
#advertisePopup.about-popup.show {
  display: flex;                /* show + center */
}

/* Modal box */
#advertisePopup .about-box {
  max-width: 560px;
  width: min(92vw, 560px);
  margin: 0 1rem;
  padding: 1.75em 1.5em;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(23, 73, 122, 0.18);
  overflow: auto;
  max-height: 90vh;
}

/* Headings */
#advertisePopup h2,
#advertisePopup h3 {
  margin-top: 0;
  color: #17497a;
  letter-spacing: 0.02em;
}
#advertisePopup h2 { font-size: 1.35rem; margin-bottom: 0.6em; }
#advertisePopup h3 { font-size: 1.05rem; margin-bottom: 0.5em; }

/* Intro / section spacing */
#advertisePopup .advertise-intro p { margin: 0; color: #2a2a2a; line-height: 1.5; }
#advertisePopup .advertise-highlights ul,
#advertisePopup .advertise-specs ul { margin: 0.3em 0 0 1.1em; }

/* Checkmark bullets for “Highlights” (use Unicode escape for reliability) */
#advertisePopup .advertise-highlights ul { list-style: none; padding-left: 0; }
#advertisePopup .advertise-highlights ul li {
  list-style: none;
  position: relative;
  margin: 0.35em 0;
  padding-left: 1.35em;
}
#advertisePopup .advertise-highlights ul li::before {
  content: "\2713"; /* ? */
  position: absolute; left: 0; top: 0.05em;
  font-size: 0.95rem; color: #1f6ab0;
  line-height: 1;
}

/* Divider */
#advertisePopup hr {
  border: 0; border-top: 1px solid #e6edf4; margin: 1em 0;
}

/* Labels */
#advertisePopup label {
  display: block;
  font-weight: 600;
  margin: 0.7em 0 0.35em;
  font-size: 0.95rem;
  color: #233649;
}

/* Inputs, selects, textareas */
#advertisePopup input[type="text"],
#advertisePopup input[type="email"],
#advertisePopup input[type="url"],
#advertisePopup input[type="number"],
#advertisePopup input[type="tel"],
#advertisePopup select,
#advertisePopup textarea {
  width: 100%;
  padding: 0.55em 0.7em;
  border: 1px solid #cfd9e3;
  border-radius: 6px;
  font-size: 0.95rem;
  box-sizing: border-box;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
  background: #fbfdff;
}
#advertisePopup textarea {
  resize: vertical;
  min-height: 90px;
}

/* Focus state */
#advertisePopup input:focus,
#advertisePopup select:focus,
#advertisePopup textarea:focus {
  border-color: #1f6ab0;
  outline: none;
  box-shadow: 0 0 0 3px rgba(31,106,176,.12);
  background: #fff;
}

/* Fieldset checkboxes */
#advertisePopup fieldset {
  border: 1px solid #e6edf4;
  border-radius: 8px;
  padding: 0.75em 0.85em;
  margin: 0.9em 0;
  background: #f7fbff;
}
#advertisePopup fieldset legend {
  font-weight: 700;
  padding: 0 0.4em;
  color: #17497a;
  font-size: 0.92rem;
}
#advertisePopup fieldset label {
  display: block;
  font-weight: 500;
  margin: 0.35em 0;
  color: #2c3e50;
}

/* 2-column options on wider screens */
@media (min-width: 560px) {
  #advertisePopup fieldset { column-count: 2; column-gap: 1.5em; }
  #advertisePopup fieldset label { break-inside: avoid; }
}

/* Captcha */
#advertisePopup .captcha-container { margin-top: 0.9em; }
#advertisePopup .captcha-container label {
  font-weight: 600;
  color: #233649;
  margin-bottom: 0.35em;
}

/* Buttons */
#advertisePopup button[type="submit"] {
  margin-top: 1em;
  background: linear-gradient(180deg, #1f6ab0 0%, #17497a 100%);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0.7em 1.25em;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.05s ease, box-shadow 0.15s ease, opacity .15s ease;
  box-shadow: 0 6px 16px rgba(23,73,122,0.22);
}
#advertisePopup button[type="submit"]:hover {
  box-shadow: 0 10px 22px rgba(23,73,122,0.30);
}
#advertisePopup button[type="submit"]:active { transform: translateY(1px); }
#advertisePopup button[type="submit"]:disabled { opacity: 0.6; cursor: not-allowed; box-shadow: none; }

/* Inline message (JS-injected) */
#advertisePopup .form-message-inline {
  margin-left: 10px;
  font-size: 0.9em;
  font-weight: 600;
}

/* Response message (legacy block, kept harmless) */
#advertisePopup .response-message {
  margin-top: 0.7em;
  font-size: 0.92rem;
  color: #17497a;
}

/* Required note */
#advertisePopup .required-note {
  margin-top: 0.55em;
  font-size: 0.85rem;
  color: #d33;
  font-weight: 600;
}

/* Validation — error state */
#advertisePopup .is-error {
  border-color: #d33 !important;
  outline: none;
  box-shadow: 0 0 0 3px rgba(211, 51, 51, 0.16);
  background: #fff9f9;
}
#advertisePopup .error-text {
  margin-top: 0.28em;
  font-size: 0.85rem;
  color: #c51f1f;
}

/* Make required labels show a subtle asterisk */
#advertisePopup label[for]::after {
  content: attr(data-required);
  margin-left: 0.25em;
  color: #d33;
  font-weight: 700;
}

/* Optional success look (if you add .is-valid on JS) */
#advertisePopup .is-valid {
  border-color: #3a9d3a !important;
  box-shadow: 0 0 0 3px rgba(58, 157, 58, 0.14);
}

/* Stats card (from advertise.cgi) */
#advertisePopup .ad-stats {
  border: 2px solid #17497a !important;
  border-radius: 10px !important;
  background: linear-gradient(180deg, #f9fbfd 0%, #ffffff 100%) !important;
}
#advertisePopup .ad-stats h3 {
  font-size: 1.05rem !important;
  margin-bottom: 0.5em !important;
}
#advertisePopup .ad-stats ul li { margin: 0.25em 0; }
#advertisePopup .ad-stats a {
  text-decoration: none;
  border-bottom: 1px dashed rgba(36,100,166,.35);
}
#advertisePopup .ad-stats a:hover { border-color: rgba(36,100,166,.7); }

/* Timeline custom box transition */
#advertisePopup #adv_timeline_custom {
  transition: height .2s ease, opacity .2s ease;
}

/* Trust row */
#advertisePopup .trust-row {
  margin-top: 0.8em;
  font-size: 0.85rem;
  color: #555;
  text-align: center;
}
#advertisePopup .trust-row p {
  margin: 0;
  padding: 0.35em 0.6em;
  background: #f3f6f9;
  border-radius: 6px;
  display: inline-block;
  font-weight: 500;
}

/* Small accessibility nits */
#advertisePopup input[aria-invalid="true"],
#advertisePopup select[aria-invalid="true"],
#advertisePopup textarea[aria-invalid="true"] {
  aria-invalid: true;
}

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  #advertisePopup * { transition: none !important; }
}
