/* ── Audit Lead Form – Popup Styles ────────────────────────────────────────── */

:root {
  --alf-accent:      #111111;       /* Primary brand color used for buttons and headings */
  --alf-accent-dark: #000000;       /* Darker version for hover states */
  --alf-bg:          #ffffff;       /* Main background color (matches design) */
  --alf-overlay-bg:  rgba(17, 17, 17, 0.75);
  --alf-text:        #111111;       /* Primary text color throughout */
  --alf-muted:       #999999;       /* Secondary text color for descriptions */
  --alf-border:      #ebebeb;       /* Border color used consistently */
  --alf-border-focus:#111111;       /* Matches accent color for focus states */
  --alf-error:       #dc2626;       /* Error color (unchanged) */
  --alf-success:     #16a34a;       /* Success color (unchanged) */
  --alf-radius:      12px;          /* Most common border radius in the design */
  --alf-input-h:     48px;          /* Input height (unchanged) */
  --alf-font:        'Montserrat', sans-serif;  /* Font family used throughout */
}

.alf-country-code {
    font-family: Arial, "Segoe UI Emoji", "Noto Color Emoji", sans-serif;
    width: 110px;
    padding: 8px;
    display: block;
}

/* ── Overlay ──────────────────────────────────────────────────────────────── */
.alf-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--alf-overlay-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.alf-overlay.alf-open {
  opacity: 1;
  visibility: visible;
}

/* ── Modal ────────────────────────────────────────────────────────────────── */
.alf-modal {
  position: relative;
  background: var(--alf-bg);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 92vh;
  overflow-y: auto;
  padding: 40px 40px 36px;
  box-shadow: 0 24px 60px rgba(0,0,0,.18), 0 4px 16px rgba(0,0,0,.08);
  transform: translateY(20px) scale(.98);
  transition: transform .28s cubic-bezier(.34,1.56,.64,1);
  font-family: var(--alf-font);
}

.alf-overlay.alf-open .alf-modal {
  transform: translateY(0) scale(1);
}

/* scrollbar */
.alf-modal::-webkit-scrollbar { width: 5px; }
.alf-modal::-webkit-scrollbar-track { background: transparent; }
.alf-modal::-webkit-scrollbar-thumb { background: var(--alf-border); border-radius: 99px; }

/* ── Close button ─────────────────────────────────────────────────────────── */
.alf-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border: none;
  background: #f3f4f6;
  border-radius: 50%;
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  color: var(--alf-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s, color .15s;
  padding: 0;
}
.alf-close:hover { background: #e5e7eb; color: var(--alf-text); }

/* ── Header ───────────────────────────────────────────────────────────────── */
.alf-header {
  margin-bottom: 28px;
}
.alf-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #999999!important;
  margin: 0 0 8px;
}
.alf-header h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: var(--alf-text);
  line-height: 1.3;
}

/* ── Fields ───────────────────────────────────────────────────────────────── */
.alf-field {
  margin-bottom: 18px;
}
.alf-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--alf-text);
  margin-bottom: 6px;
}
.alf-field label span[aria-hidden] {
  color: var(--alf-error);
  margin-left: 2px;
}
.alf-note {
  font-weight: 400;
  color: var(--alf-muted);
  font-size: 12px;
}

.alf-field input[type="text"],
.alf-field input[type="email"],
.alf-field input[type="url"],
.alf-field input[type="tel"],
.alf-field select {
  width: 100%;
  height: var(--alf-input-h);
  padding: 0 14px;
  border: 1.5px solid var(--alf-border);
  border-radius: var(--alf-radius);
  font-size: 14px;
  font-family: var(--alf-font);
  color: var(--alf-text);
  background: #fff;
  transition: border-color .18s, box-shadow .18s;
  outline: none;
  box-sizing: border-box;
  -webkit-appearance: none;
  appearance: none;
}

.alf-field input::placeholder { color: #9ca3af; }

.alf-field input:focus,
.alf-field select:focus {
  border-color: var(--alf-border-focus);
  box-shadow: 0 0 0 3px rgba(10, 92, 255, .12);
}

/* ── Phone row ────────────────────────────────────────────────────────────── */
.alf-phone-wrap {
  display: flex;
  gap: 8px;
}
.alf-country-code {
  flex: 0 0 130px;
  width: 130px !important;
  padding: 0 10px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px !important;
  cursor: pointer;
}
.alf-phone-wrap input[type="tel"] {
  flex: 1;
}

/* ── Select wrapper (revenue) ─────────────────────────────────────────────── */
.alf-select-wrap {
  position: relative;
}
.alf-select-wrap::after {
  content: '';
  pointer-events: none;
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
}
.alf-select-wrap select {
  padding-right: 36px !important;
  cursor: pointer;
}

/* ── Notice ───────────────────────────────────────────────────────────────── */
.alf-notice {
  padding: 12px 14px;
  border-radius: var(--alf-radius);
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 16px;
}
.alf-notice.alf-error   { background: #fef2f2; color: var(--alf-error);   border: 1px solid #fecaca; }
.alf-notice.alf-success { background: #f0fdf4; color: var(--alf-success); border: 1px solid #bbf7d0; }

/* ── Submit button ────────────────────────────────────────────────────────── */
.alf-btn {
  width: 100%;
  height: 52px;
  background: var(--alf-accent);
  color: #fff;
  border: none;
  border-radius: var(--alf-radius);
  font-size: 15px;
  font-weight: 700;
  font-family: var(--alf-font);
  cursor: pointer;
  transition: background .18s, transform .1s, box-shadow .18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: .01em;
  margin-top: 4px;
}
.alf-btn:hover:not(:disabled) {
  background: #0a0a0a; /* Slightly darker than #111111 but not pure black */
  box-shadow: 0 6px 20px rgba(17,17,17, 0.28); /* Match shadow to new color */
  transform: translateY(-1px);
}
.alf-btn:active:not(:disabled) { transform: translateY(0); }
.alf-btn:disabled { opacity: .7; cursor: not-allowed; }

/* spinner animation */
.alf-btn-spinner svg {
  animation: alf-spin .8s linear infinite;
}
@keyframes alf-spin {
  to { transform: rotate(360deg); }
}

/* ── Success state ────────────────────────────────────────────────────────── */
.alf-success-state {
  text-align: center;
  padding: 20px 0 10px;
}
.alf-success-state .alf-check {
  width: 64px;
  height: 64px;
  background: #dcfce7;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 30px;
}
.alf-success-state h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: var(--alf-text);
}
.alf-success-state p {
  color: var(--alf-muted);
  font-size: 15px;
  margin: 0;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
  .alf-modal {
    padding: 28px 20px 24px;
    border-radius: 14px;
  }
  .alf-header h2 { font-size: 19px; }
  .alf-country-code { flex: 0 0 110px; width: 110px !important; }
}

@media (max-width: 380px) {
  .alf-phone-wrap { flex-direction: column; gap: 10px; }
  .alf-country-code { flex: none; width: 100% !important; }
}
