/* Shared look for the lead (consultation / cost estimate) and checkout modals.
   Loaded after each page's inline <style>, so these rules win on equal specificity. */

.lead-overlay,
.checkout-overlay {
  background-color: rgba(14, 10, 12, 0.66);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
}

.lead-modal,
.checkout-modal {
  top: 50%;
  width: min(94vw, 460px);
  max-height: calc(100vh - 32px);
  background: linear-gradient(180deg, rgb(72, 62, 66), rgb(62, 52, 56));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.85);
  padding: 38px 32px 30px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}
.lead-modal::before,
.checkout-modal::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: rgb(255, 204, 34);
}

/* close button: drawn cross instead of a font glyph */
.lead-close,
.checkout-close {
  top: 20px;
  right: 20px;
  width: 36px;
  height: 36px;
  font-size: 0;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.25s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.lead-close::before,
.lead-close::after,
.checkout-close::before,
.checkout-close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  margin: -1px 0 0 -7px;
  border-radius: 1px;
  background: #fff;
  opacity: 0.85;
}
.lead-close::before,
.checkout-close::before { transform: rotate(45deg); }
.lead-close::after,
.checkout-close::after { transform: rotate(-45deg); }
.lead-close:hover,
.checkout-close:hover {
  transform: rotate(90deg);
  background: rgba(255, 204, 34, 0.2);
  border-color: rgba(255, 204, 34, 0.5);
}

.lead-title,
.checkout-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  line-height: 1.2;
  margin: 0 44px 8px 0;
}
.lead-subtitle {
  font-size: 0.95rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.6);
  margin: 0 0 26px;
}
.checkout-title { margin-bottom: 22px; }

/* field labels */
.lead-field > span,
.checkout-field > span,
.lead-toggle-group > span {
  display: block;
  margin-bottom: 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}
.lead-field,
.checkout-field { margin-bottom: 18px; }

/* inputs */
.lead-field input,
.checkout-field input {
  background: rgba(24, 18, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
.lead-field input:hover,
.checkout-field input:hover { border-color: rgba(255, 255, 255, 0.22); }
.lead-field input:focus,
.checkout-field input:focus {
  background: rgba(24, 18, 20, 0.62);
  border-color: rgb(255, 204, 34);
  box-shadow: none;
}
.lead-field input::placeholder,
.checkout-field input::placeholder { color: rgba(255, 255, 255, 0.3); }

/* phone */
.phone-input-group { gap: 10px; }
.phone-country-btn {
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  background: rgba(24, 18, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
}
.phone-country-btn:hover,
.phone-country-btn[aria-expanded="true"] { border-color: rgb(255, 204, 34); }
.phone-country-btn .phone-caret,
.phone-country-btn .phone-code { transform: none; }
.phone-country-btn[aria-expanded="true"] .phone-caret { transform: rotate(180deg); }
.phone-input-group input[name="phone"] {
  padding-top: 14px;
  padding-bottom: 14px;
}

/* segmented toggles (contact channel / method, payer type) */
.lead-toggle-group { margin-bottom: 18px; }
.lead-toggle-row,
.payer-type-toggle {
  gap: 4px;
  padding: 4px;
  background: rgba(24, 18, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}
.lead-toggle-btn {
  background: transparent;
  border: none;
  border-radius: 10px;
  padding: 12px 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.62);
}
.lead-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}
.lead-toggle-btn.active {
  background: rgb(255, 204, 34);
  color: rgb(56, 46, 50);
}
.payer-type-toggle button { padding: 12px; border-radius: 10px; }

/* checkout order summary */
.checkout-order-row {
  padding: 14px 16px;
  margin-bottom: 14px;
  background: rgba(24, 18, 20, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
}
.checkout-order-row .name { font-weight: 600; color: #fff; }
.checkout-order-row .price { font-weight: 800; color: rgb(255, 204, 34); }
.checkout-sum-row {
  margin: 0 2px 18px;
  padding: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.5);
}
.checkout-total-row {
  align-items: baseline;
  justify-content: space-between;
  padding-top: 16px;
  margin-bottom: 20px;
  border-top: 1px dashed rgba(255, 255, 255, 0.16);
  font-size: 0.95rem;
}
.checkout-total-row span { font-size: 1.45rem; font-weight: 800; }

/* consent + errors */
.lead-checkbox,
.checkout-checkbox { margin: 20px 0 22px; }
.lead-error,
.checkout-error { border-radius: 12px; padding: 12px 14px; }

/* submit */
.lead-submit,
.checkout-submit {
  padding: 16px;
  border-radius: 14px;
  font-size: 1.02rem;
  font-weight: 800;
  background: rgb(255, 204, 34);
  box-shadow: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}
.lead-submit:hover,
.checkout-submit:hover {
  background: rgb(255, 214, 74);
}
.lead-submit:disabled,
.checkout-submit:disabled {
  background: rgba(255, 204, 34, 0.35);
  box-shadow: none;
}

@media (max-width: 480px) {
  .lead-modal,
  .checkout-modal {
    width: min(94vw, 460px);
    max-height: calc(100vh - 24px);
    padding: 32px 20px 24px;
  }
  .lead-title,
  .checkout-title { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) {
  .lead-close,
  .checkout-close { transition: none; }
}

/* ===== Download chooser (courses page: Windows / Linux) ===== */
.dl-overlay {
  position: fixed; inset: 0; background-color: rgba(14, 10, 12, 0.66);
  -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px);
  opacity: 0; pointer-events: none; transition: opacity 0.3s ease; z-index: 1010;
}
.dl-overlay.open { opacity: 1; pointer-events: auto; }
.dl-modal {
  position: fixed; top: 50%; left: 50%;
  width: min(94vw, 560px); max-height: calc(100vh - 32px); overflow-y: auto;
  background: linear-gradient(180deg, rgb(72, 62, 66), rgb(62, 52, 56));
  border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 24px;
  box-shadow: 0 30px 70px -24px rgba(0, 0, 0, 0.85);
  padding: 38px 32px 28px; z-index: 1011;
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(-50%, -50%) scale(0.94);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
}
.dl-modal.open { opacity: 1; visibility: visible; pointer-events: auto; transform: translate(-50%, -50%) scale(1); }
.dl-modal::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: rgb(255, 204, 34); }
.dl-close {
  position: absolute; top: 20px; right: 20px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08); background: rgba(255, 255, 255, 0.07); cursor: pointer;
  transition: transform 0.25s ease, background-color 0.2s ease;
}
.dl-close::before, .dl-close::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 14px; height: 2px; margin: -1px 0 0 -7px;
  border-radius: 1px; background: #fff; opacity: 0.85;
}
.dl-close::before { transform: rotate(45deg); }
.dl-close::after { transform: rotate(-45deg); }
.dl-close:hover { transform: rotate(90deg); background: rgba(255, 204, 34, 0.2); }
.dl-title { font-size: 1.55rem; font-weight: 800; letter-spacing: -0.015em; line-height: 1.2; margin: 0 44px 8px 0; color: #fff; }
.dl-sub { font-size: 0.95rem; line-height: 1.5; color: rgba(255, 255, 255, 0.6); margin: 0 0 22px; }
.dl-options { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.dl-opt {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 6px;
  padding: 20px 18px 18px; border-radius: 18px; text-decoration: none; color: #fff;
  background: rgba(24, 18, 20, 0.45); border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}
.dl-opt:hover { transform: translateY(-3px); border-color: rgb(255, 204, 34); background: rgba(24, 18, 20, 0.62); }
.dl-opt.recommended { border-color: rgba(255, 204, 34, 0.6); }
.dl-ic { width: 44px; height: 44px; border-radius: 12px; background: rgb(255, 204, 34); color: rgb(56, 46, 50); display: flex; align-items: center; justify-content: center; margin-bottom: 6px; }
.dl-ic svg { width: 24px; height: 24px; }
.dl-name { font-size: 1.2rem; font-weight: 800; }
.dl-meta { font-size: 0.85rem; color: rgba(255, 255, 255, 0.6); }
.dl-go { margin-top: 10px; font-size: 0.9rem; font-weight: 700; color: rgb(255, 204, 34); }
.dl-badge {
  display: none; position: absolute; top: 14px; right: 14px; font-size: 0.68rem; font-weight: 800;
  letter-spacing: 0.04em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: rgba(255, 204, 34, 0.18); color: rgb(255, 204, 34);
}
.dl-opt.recommended .dl-badge { display: block; }
.dl-help { margin-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 14px; font-size: 0.9rem; color: rgba(255, 255, 255, 0.75); }
.dl-help summary { cursor: pointer; font-weight: 700; color: #fff; }
.dl-help ol { margin: 10px 0 0; padding-left: 1.2rem; line-height: 1.6; }
.dl-help code { background: rgba(0, 0, 0, 0.3); padding: 1px 6px; border-radius: 6px; font-size: 0.85em; word-break: break-all; }
@media (max-width: 520px) {
  .dl-modal { padding: 32px 20px 24px; }
  .dl-options { grid-template-columns: 1fr; }
  .dl-title { font-size: 1.35rem; }
}
@media (prefers-reduced-motion: reduce) { .dl-close, .dl-opt { transition: none; } }
