/* ── Distributor page layout ──────────────────────────────────────────────── */

.aiwifi-dist-page {
  min-height: 100vh;
  background: #f5f5f5;
  padding-bottom: 90px; /* room for the fixed CTA */
}

/* Header */
.dist-header {
  background: #fff;
  border-bottom: 1px solid #e8e8e8;
  position: sticky;
  top: 0;
  z-index: 100;
}

.dist-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dist-header-logo {
  height: 40px;
  max-width: 180px;
  object-fit: contain;
}

.dist-header-name {
  font-size: 18px;
  font-weight: 700;
  color: #1e1e1e;
}

.dist-header-powered {
  font-size: 12px;
  color: #999;
}

.dist-header-powered strong {
  color: #1e1e1e;
}

/* Main content */
.dist-main {
  max-width: 1100px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Fixed CTA bar — full-width, pinned to viewport bottom */
.dist-cta-btn {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--dist-color, #1677ff);
  color: #fff;
  border: none;
  border-radius: 0;
  padding: 16px 24px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 -2px 16px rgba(0, 0, 0, .15);
  z-index: 200;
  transition: opacity .15s ease;
}

.dist-cta-btn:hover {
  opacity: .92;
}

/* ── Modal overlay ────────────────────────────────────────────────────────── */

.dist-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.dist-modal-overlay.open {
  display: flex;
}

.dist-modal {
  background: #fff;
  border-radius: 12px;
  padding: 32px 28px;
  width: 100%;
  max-width: 440px;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
  animation: dist-modal-in .2s ease;
}

@keyframes dist-modal-in {
  from { opacity: 0; transform: scale(.95) translateY(8px); }
  to   { opacity: 1; transform: scale(1)  translateY(0); }
}

.dist-modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  background: none;
  border: none;
  font-size: 18px;
  color: #aaa;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 4px;
}

.dist-modal-close:hover { color: #555; }

.dist-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e1e1e;
  margin-bottom: 20px;
}

/* ── Lead form ────────────────────────────────────────────────────────────── */

.dist-field {
  margin-bottom: 14px;
}

.dist-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #444;
  margin-bottom: 5px;
}

.dist-req {
  color: #e53e3e;
  margin-left: 2px;
}

.dist-field input[type="text"],
.dist-field input[type="email"],
.dist-field input[type="tel"] {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  font-size: 14px;
  color: #1e1e1e;
  transition: border-color .15s;
  outline: none;
}

.dist-field input:focus {
  border-color: var(--dist-color, #1677ff);
  box-shadow: 0 0 0 2px rgba(22, 119, 255, .12);
}

/* Checkboxes */
.dist-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.dist-check input[type="checkbox"] {
  margin-top: 3px;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  accent-color: var(--dist-color, #1677ff);
  cursor: pointer;
}

.dist-check label {
  font-size: 13px;
  color: #555;
  line-height: 1.5;
  cursor: pointer;
}

.dist-check a {
  color: var(--dist-color, #1677ff);
  text-decoration: none;
}

.dist-check a:hover { text-decoration: underline; }

/* Error */
.dist-form-error {
  background: #fff1f0;
  border: 1px solid #ffccc7;
  color: #cf1322;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  margin-bottom: 12px;
}

/* Submit button */
.dist-submit-btn {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: opacity .15s;
}

.dist-submit-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
}

/* ── Success state ────────────────────────────────────────────────────────── */

.dist-success {
  text-align: center;
  padding: 12px 0 4px;
}

.dist-success-icon {
  font-size: 48px;
  line-height: 1;
  margin-bottom: 16px;
}

.dist-success-title {
  font-size: 20px;
  font-weight: 700;
  color: #1e1e1e;
  margin-bottom: 10px;
}

.dist-success-msg {
  font-size: 14px;
  color: #666;
  margin-bottom: 24px;
  line-height: 1.5;
}

.dist-close-success {
  padding: 10px 32px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
