/* ============================================================
   Umango CMS shim
   Styles for content-cms.asp and the dynamic snippets it injects.
   Loaded AFTER assets/style.css so it can rely on the design tokens
   defined there (--ink, --paper, --c-orange, --rule, --radius-l etc.)
   ============================================================ */


/* ------------------------------------------------------------
   Narrower content wrap for CMS pages — long-form reading width
   ------------------------------------------------------------ */
.wrap.wrap--narrow {
  max-width: 880px;
}


/* ------------------------------------------------------------
   Base CMS content typography
   For raw HTML injected from tbl_pages.html — h2/h3/p/ul/ol/blockquote etc.
   ------------------------------------------------------------ */
.cms-content {
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.65;
}

.cms-content h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin: 48px 0 18px;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.cms-content h2:first-child { margin-top: 0; }

.cms-content h3 {
  font-size: 1.3rem;
  margin: 36px 0 14px;
  letter-spacing: -0.01em;
}

.cms-content h4 {
  font-size: 1.1rem;
  margin: 28px 0 10px;
  font-weight: 600;
}

.cms-content p {
  margin: 0 0 18px;
}

.cms-content ul,
.cms-content ol {
  margin: 0 0 22px;
  padding-left: 28px;
}
.cms-content ul li,
.cms-content ol li {
  margin-bottom: 8px;
}

.cms-content a {
  color: var(--c-orange);
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 116, 35, 0.35);
  padding-bottom: 1px;
  transition: border-color 0.15s, color 0.15s;
}
.cms-content a:hover {
  border-bottom-color: var(--c-orange);
}

.cms-content blockquote {
  margin: 28px 0;
  padding: 20px 26px;
  background: var(--paper-2);
  border-left: 3px solid var(--c-orange);
  border-radius: 6px;
  font-style: italic;
  color: var(--text-soft);
}

.cms-content hr {
  margin: 40px 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.cms-content img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}

.cms-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 0.95rem;
}
.cms-content table th,
.cms-content table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rule);
  text-align: left;
}
.cms-content table th {
  font-weight: 600;
  background: var(--paper-2);
}


/* ------------------------------------------------------------
   Info card — used by display_dealer.asp for the reseller card
   Replaces the old dashed cyan-blue border pattern.
   ------------------------------------------------------------ */
.info-card {
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 4px solid var(--c-orange);
  border-radius: var(--radius-m, 10px);
  padding: 28px 32px;
  margin: 24px 0;
  box-shadow: 0 2px 6px rgba(10, 20, 38, 0.04);
}
.info-card__label {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  margin-bottom: 14px;
}
.info-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 10px 20px;
}
.info-card dt {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  padding-top: 3px;
}
.info-card dd {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
}
.info-card dd a {
  color: var(--c-orange);
  text-decoration: none;
  border-bottom: 1px solid rgba(243, 116, 35, 0.3);
}
.info-card dd a:hover {
  border-bottom-color: var(--c-orange);
}
.info-card__address {
  white-space: pre-line;
  color: var(--text-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}
@media (max-width: 600px) {
  .info-card dl {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .info-card dd {
    margin-bottom: 12px;
    padding-left: 0;
  }
}


/* ------------------------------------------------------------
   Status list — used by updates.asp for licence status
   Vertical list of status rows, each with an icon and a label/value
   ------------------------------------------------------------ */
.status-list {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m, 10px);
  padding: 8px 4px;
  margin: 24px 0;
  overflow: hidden;
}
.status-row {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--rule);
}
.status-row:last-child {
  border-bottom: 0;
}
.status-row__icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.status-row__icon--ok    { background: rgba(109, 190, 58, 0.15); color: var(--c-green); }
.status-row__icon--warn  { background: rgba(244, 192, 38, 0.18); color: #a37d00; }
.status-row__icon--err   { background: rgba(232, 71, 56, 0.15); color: var(--c-red); }
.status-row__icon--info  { background: rgba(45, 122, 224, 0.14); color: var(--c-blue); }
.status-row__icon svg    { width: 18px; height: 18px; }

.status-row__label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  display: block;
  margin-bottom: 4px;
}
.status-row__value {
  font-weight: 600;
  color: var(--text);
  font-size: 1rem;
}
.status-row__value--muted {
  font-weight: 400;
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-top: 2px;
  display: block;
}
.status-row__value--err {
  color: var(--c-red);
}

/* Action row — full-width call to action strip inside the status list */
.status-action {
  padding: 18px 24px;
  background: var(--paper-2);
  border-top: 1px solid var(--rule);
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.status-action--ok   { background: rgba(109, 190, 58, 0.08); border-top-color: rgba(109, 190, 58, 0.25); }
.status-action--warn { background: rgba(244, 192, 38, 0.08); border-top-color: rgba(244, 192, 38, 0.3); }
.status-action--err  { background: rgba(232, 71, 56, 0.08); border-top-color: rgba(232, 71, 56, 0.25); }
.status-action__text {
  flex: 1;
  min-width: 0;
  font-size: 0.95rem;
  color: var(--text);
}


/* ------------------------------------------------------------
   Alert — used by trial_step1.asp, get_key.asp for validation messages
   Replaces Bootstrap 2 .alert / .alert-info / .alert-error / .alert-success
   ------------------------------------------------------------ */
.alert {
  padding: 16px 20px;
  border-radius: 8px;
  margin: 18px 0;
  border-left: 4px solid;
  font-size: 0.98rem;
  line-height: 1.55;
}
.alert strong {
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}
.alert p {
  margin: 8px 0 0;
}
.alert p:first-child {
  margin-top: 0;
}
.alert a {
  color: inherit;
  text-decoration: underline;
}
.alert-info {
  background: rgba(45, 122, 224, 0.08);
  border-color: var(--c-blue);
  color: #0f3b7a;
}
.alert-success {
  background: rgba(109, 190, 58, 0.1);
  border-color: var(--c-green);
  color: #345d1a;
}
.alert-warning {
  background: rgba(244, 192, 38, 0.1);
  border-color: var(--c-yellow);
  color: #6b4c00;
}
.alert-error,
.alert-danger {
  background: rgba(232, 71, 56, 0.08);
  border-color: var(--c-red);
  color: #8f2419;
}
/* Legacy Bootstrap 2 compatibility */
.alert-inline { display: block; }
.alert.fade.in { opacity: 1; }


/* ------------------------------------------------------------
   Activation key display — used by get_key.asp
   Big, clean, monospaced key inside a bordered card
   ------------------------------------------------------------ */
.activation-key {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-m, 10px);
  padding: 32px;
  margin: 28px 0;
  text-align: center;
}
.activation-key__label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--text-mute);
  margin-bottom: 14px;
}
.activation-key__value {
  font-family: var(--f-mono, 'JetBrains Mono', 'SF Mono', 'Menlo', monospace);
  font-size: clamp(1.15rem, 2.2vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--ink);
  word-break: break-all;
  background: var(--paper-2);
  padding: 18px 20px;
  border-radius: 6px;
  border: 1px dashed var(--rule);
}
.redirect-panel {
  text-align: center;
  padding: 20px;
  color: var(--text-soft);
}
.redirect-panel h3 {
  color: var(--text);
  margin: 0 0 8px;
  font-size: 1.15rem;
}


/* ============================================================
   BOOTSTRAP 2 COMPATIBILITY LAYER
   These legacy classes are still emitted by the register_step1.asp form
   markup. Rather than rewrite every form field, we map the old
   Bootstrap 2 classes to a modern, on-brand appearance here.
   ============================================================ */


/* Form container that uses the old bootstrap "bay" wrapper */
.bay {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--radius-l, 14px);
  padding: 36px 40px;
  margin: 20px 0;
}
.bay > h3 {
  margin: 0 0 6px;
  font-size: 1.4rem;
  letter-spacing: -0.01em;
}
.bay > h6 {
  font-family: var(--f-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--text-mute);
  margin: 0 0 28px;
  font-weight: 500;
}
@media (max-width: 640px) {
  .bay { padding: 24px 20px; }
}

/* Bootstrap 2 form-horizontal layout mapped to CSS grid */
.form-horizontal .control-group {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 14px 24px;
  align-items: start;
  margin-bottom: 22px;
}
.form-horizontal .control-group:last-child {
  margin-bottom: 0;
}
.form-horizontal .control-label {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-mute);
  padding-top: 12px;
  font-weight: 500;
  text-align: left;
}
.form-horizontal .controls {
  min-width: 0;
}
@media (max-width: 640px) {
  .form-horizontal .control-group {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .form-horizontal .control-label {
    padding-top: 0;
  }
}

/* Bootstrap 2 span classes for input widths */
.form-horizontal input.span4,
.form-horizontal select.span4,
.form-horizontal textarea.span4,
.form-horizontal input[type="text"],
.form-horizontal input[type="email"],
.form-horizontal input[type="tel"],
.form-horizontal input[type="search"],
.form-horizontal input[type="number"],
.form-horizontal input[type="password"],
.form-horizontal select,
.form-horizontal textarea {
  width: 100%;
  max-width: 420px;
  font-family: inherit;
  font-size: 0.98rem;
  padding: 11px 14px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--paper);
  color: var(--text);
  box-sizing: border-box;
  transition: border-color 0.15s, background 0.15s;
}
.form-horizontal input:focus,
.form-horizontal select:focus,
.form-horizontal textarea:focus {
  outline: none;
  border-color: var(--ink);
  background: #fff;
}
.form-horizontal input[type="search"] {
  -webkit-appearance: none;
}
.form-horizontal select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='1 1 6 6 11 1'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
}

/* Help text under a form field */
.help-inline {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-mute);
  font-style: italic;
}

/* Legacy contour button — the "Register" submit */
.contour-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.15s, background 0.15s;
  text-decoration: none;
}
.contour-btn:active {
  transform: translateY(1px);
}
.contour-btn.red,
.contour-btn.orange {
  background: var(--c-orange);
  color: #fff;
}
.contour-btn.red:hover,
.contour-btn.orange:hover {
  background: #d95f14;
  box-shadow: 0 6px 20px -6px rgba(243, 116, 35, 0.5);
}
.contour-btn.grey,
.contour-btn.gray {
  background: var(--paper-2);
  color: var(--text);
  border: 1px solid var(--rule);
}


/* ------------------------------------------------------------
   Notifications panel — the "validate address" feedback strip
   inside register_step1.asp
   ------------------------------------------------------------ */
.notifications {
  padding: 0 !important;
  width: auto !important;
  margin: 16px 0 22px !important;
}
.notifications .alert {
  margin: 0;
}


/* ------------------------------------------------------------
   Dealer autocomplete dropdown
   Used by SearchDealers() in register_step1.asp
   ------------------------------------------------------------ */
#dealer-results {
  background: #fff !important;
  border: 1px solid var(--rule) !important;
  border-radius: 8px;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 4px;
  box-shadow: 0 8px 20px -6px rgba(10, 20, 38, 0.12);
  max-width: 420px;
}
.ResultHolder {
  padding: 10px 14px;
  border-bottom: 1px solid var(--rule);
  cursor: pointer;
  font-size: 0.95rem;
  transition: background 0.12s;
}
.ResultHolder:last-child {
  border-bottom: 0;
}
.ResultHolder:hover {
  background: var(--paper-2) !important;
  color: var(--c-orange);
}
.ResultHolder:active {
  background: var(--rule) !important;
}
