/* ============================================================
   Smart LeadLock Pro – Frontend Styles
   Brand: Navy Blue (#0D1B4B) + Orange (#F97316)
   ============================================================ */

:root {
  --sll-primary:       #0D1B4B;
  --sll-primary-dark:  #08112e;
  --sll-primary-light: #e8eaf4;
  --sll-accent:        #F97316;
  --sll-accent-dark:   #ea6008;
  --sll-accent-light:  #fff4ed;
  --sll-success:       #16a34a;
  --sll-success-light: #dcfce7;
  --sll-error:         #dc2626;
  --sll-error-light:   #fee2e2;
  --sll-text:          #111827;
  --sll-text-muted:    #6b7280;
  --sll-border:        #e5e7eb;
  --sll-bg:            #ffffff;
  --sll-overlay-bg:    rgba(13, 27, 75, 0.72);
  --sll-radius:        14px;
  --sll-radius-sm:     8px;
  --sll-shadow:        0 20px 60px rgba(13, 27, 75, 0.22);
  --sll-transition:    0.2s ease;
  --sll-font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* ── File Card ──────────────────────────────────────────────── */
.sll-gate-wrap { margin: 1.5rem 0; }

.sll-file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--sll-bg);
  border: 2px solid var(--sll-border);
  border-radius: var(--sll-radius);
  padding: 18px 22px;
  box-shadow: 0 2px 12px rgba(13,27,75,0.07);
  transition: box-shadow var(--sll-transition), border-color var(--sll-transition);
  font-family: var(--sll-font);
}
.sll-file-card:hover {
  box-shadow: 0 6px 24px rgba(13,27,75,0.13);
  border-color: var(--sll-accent);
}
.sll-file-icon {
  flex-shrink: 0;
  width: 52px; height: 52px;
  background: var(--sll-primary-light);
  border-radius: var(--sll-radius-sm);
  display: flex; align-items: center; justify-content: center;
}
.sll-file-icon svg { width: 28px; height: 28px; }
.sll-file-info { flex: 1; min-width: 0; }
.sll-file-name {
  display: block;
  font-weight: 700;
  font-size: 15px;
  color: var(--sll-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sll-file-meta { display: block; font-size: 12px; color: var(--sll-text-muted); margin-top: 3px; }
.sll-download-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sll-accent);
  color: #fff;
  border: none;
  border-radius: var(--sll-radius-sm);
  padding: 11px 20px;
  font-size: 14px; font-weight: 700;
  cursor: pointer;
  transition: background var(--sll-transition), transform var(--sll-transition);
  white-space: nowrap;
  font-family: var(--sll-font);
}
.sll-download-btn:hover { background: var(--sll-accent-dark); transform: translateY(-1px); }
.sll-download-btn svg { width: 16px; height: 16px; }

/* ── Modal Overlay ──────────────────────────────────────────── */
.sll-modal-overlay {
  position: fixed; inset: 0; z-index: 99999;
  display: flex; align-items: center; justify-content: center;
  background: var(--sll-overlay-bg);
  opacity: 0; visibility: hidden;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  padding: 16px;
  backdrop-filter: blur(3px);
}
.sll-modal-overlay.sll-active { opacity: 1; visibility: visible; }
body.sll-modal-open { overflow: hidden; }

/* ── Modal Box ──────────────────────────────────────────────── */
.sll-modal {
  background: var(--sll-bg);
  border-radius: var(--sll-radius);
  box-shadow: var(--sll-shadow);
  width: 100%; max-width: 440px;
  max-height: 90vh; overflow-y: auto;
  position: relative;
  transform: scale(0.94) translateY(16px);
  transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1);
  font-family: var(--sll-font);
}
.sll-modal-overlay.sll-active .sll-modal { transform: scale(1) translateY(0); }

/* ── Modal Header ───────────────────────────────────────────── */
.sll-modal-header {
  background: linear-gradient(135deg, var(--sll-primary) 0%, #1a2f6e 100%);
  padding: 32px 32px 28px;
  text-align: center;
  border-radius: var(--sll-radius) var(--sll-radius) 0 0;
}
.sll-modal-lock-icon {
  width: 52px; height: 52px;
  background: rgba(249,115,22,0.18);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  border: 2px solid rgba(249,115,22,0.4);
}
.sll-modal-lock-icon svg { width: 24px; height: 24px; stroke: var(--sll-accent); }
.sll-modal-title {
  font-size: 22px; font-weight: 800;
  color: #fff; margin: 0 0 8px;
  line-height: 1.2;
}
.sll-modal-subtitle { font-size: 14px; color: rgba(255,255,255,0.8); margin: 0; line-height: 1.5; }

/* ── Modal Close ────────────────────────────────────────────── */
.sll-modal-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,0.15);
  border: none; color: #fff;
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1;
  cursor: pointer;
  transition: background var(--sll-transition);
  z-index: 10;
}
.sll-modal-close:hover { background: rgba(255,255,255,0.3); }

/* ── Modal Body ─────────────────────────────────────────────── */
.sll-modal-body { padding: 28px 32px 32px; }

/* ── Error Banner ───────────────────────────────────────────── */
.sll-error-banner {
  background: var(--sll-error-light);
  border: 1px solid var(--sll-error);
  border-radius: var(--sll-radius-sm);
  color: var(--sll-error);
  font-size: 13px; font-weight: 600;
  padding: 10px 14px;
  margin-bottom: 18px;
}

/* ── Honeypot ───────────────────────────────────────────────── */
.sll-hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ── Form Fields ────────────────────────────────────────────── */
.sll-field-group { margin-bottom: 16px; }
.sll-label {
  display: block; font-size: 13px; font-weight: 700;
  color: var(--sll-primary); margin-bottom: 6px;
}
.sll-required { color: var(--sll-accent); margin-left: 2px; }
.sll-input-wrap { position: relative; }
.sll-input-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 17px; height: 17px;
  stroke: var(--sll-text-muted);
  pointer-events: none;
}
.sll-input {
  width: 100%;
  padding: 11px 14px 11px 40px;
  border: 1.5px solid var(--sll-border);
  border-radius: var(--sll-radius-sm);
  font-size: 14px; color: var(--sll-text);
  background: var(--sll-bg);
  transition: border-color var(--sll-transition), box-shadow var(--sll-transition);
  font-family: var(--sll-font);
  outline: none;
}
.sll-input:focus {
  border-color: var(--sll-accent);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
.sll-input.sll-input-error { border-color: var(--sll-error); }
.sll-field-error { display: block; font-size: 11px; color: var(--sll-error); margin-top: 4px; min-height: 14px; }

/* ── Submit Button ──────────────────────────────────────────── */
.sll-submit-btn {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%;
  background: var(--sll-accent);
  color: #fff;
  border: none;
  border-radius: var(--sll-radius-sm);
  padding: 14px 24px;
  font-size: 15px; font-weight: 800;
  cursor: pointer;
  margin-top: 6px;
  transition: background var(--sll-transition), transform var(--sll-transition), box-shadow var(--sll-transition);
  font-family: var(--sll-font);
  letter-spacing: 0.3px;
}
.sll-submit-btn svg { width: 18px; height: 18px; }
.sll-submit-btn:hover:not(:disabled) {
  background: var(--sll-accent-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(249,115,22,0.4);
}
.sll-submit-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.sll-submit-btn.sll-loading #sll-btn-text::after {
  content: '';
  display: inline-block;
  width: 12px; height: 12px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: sll-spin 0.6s linear infinite;
  margin-left: 8px; vertical-align: middle;
}
@keyframes sll-spin { to { transform: rotate(360deg); } }

/* ── Privacy note ───────────────────────────────────────────── */
.sll-privacy-note {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; color: var(--sll-text-muted);
  margin: 14px 0 0; text-align: center;
}
.sll-privacy-note svg { width: 13px; height: 13px; stroke: var(--sll-text-muted); flex-shrink: 0; }

/* ── Success State ──────────────────────────────────────────── */
.sll-success-icon {
  width: 64px; height: 64px;
  background: linear-gradient(135deg, #0D1B4B 0%, #1a2f6e 100%);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 4px 16px rgba(13,27,75,0.3);
}
.sll-success-icon svg { width: 30px; height: 30px; stroke: #fff; stroke-width: 2.5; }
.sll-success-title {
  font-size: 20px; font-weight: 800;
  color: var(--sll-primary); text-align: center; margin: 0 0 10px;
}
.sll-success-msg { font-size: 14px; color: var(--sll-text-muted); text-align: center; margin: 0 0 24px; line-height: 1.6; }

/* Download button in success state */
.sll-download-action { text-align: center; }
.sll-download-final-btn {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--sll-accent);
  color: #fff; text-decoration: none;
  border-radius: var(--sll-radius-sm);
  padding: 14px 32px;
  font-size: 15px; font-weight: 800;
  transition: background var(--sll-transition), transform var(--sll-transition), box-shadow var(--sll-transition);
  font-family: var(--sll-font);
  letter-spacing: 0.3px;
}
.sll-download-final-btn svg { width: 18px; height: 18px; }
.sll-download-final-btn:hover {
  background: var(--sll-accent-dark);
  color: #fff; text-decoration: none;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(249,115,22,0.4);
}

/* Email-only success message */
.sll-email-sent-note {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--sll-primary-light);
  border: 1.5px solid var(--sll-primary);
  border-radius: var(--sll-radius-sm);
  padding: 16px 18px;
  font-size: 14px; font-weight: 600;
  color: var(--sll-primary);
  text-align: left; margin: 0 0 20px;
  line-height: 1.5;
}

.sll-expiry-note {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; color: var(--sll-text-muted);
  margin: 16px 0 0; text-align: center;
}
.sll-expiry-note svg { width: 13px; height: 13px; stroke: var(--sll-text-muted); flex-shrink: 0; }

/* ── Shake animation ────────────────────────────────────────── */
@keyframes sll-shake {
  0%,100% { transform: translateX(0); }
  20%      { transform: translateX(-6px); }
  40%      { transform: translateX(6px); }
  60%      { transform: translateX(-4px); }
  80%      { transform: translateX(4px); }
}
.sll-shake { animation: sll-shake 0.45s ease; }

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 480px) {
  .sll-modal { max-width: 100%; border-radius: 16px 16px 0 0; }
  .sll-modal-overlay { align-items: flex-end; }
  .sll-modal-header { padding: 24px 22px 20px; border-radius: 16px 16px 0 0; }
  .sll-modal-body { padding: 20px 22px 28px; }
  .sll-file-card { flex-wrap: wrap; }
  .sll-download-btn { width: 100%; justify-content: center; }
}

/* =============================================================================
   CUSTOM FORM FIELDS — match static form style exactly
   Fixes: label visibility, help text size, field spacing, input appearance
   ============================================================================= */

/* Wrapper for injected custom form */
#sll-custom-form-wrap { width: 100%; }
.sll-custom-form { width: 100%; }

/* Each field wrap — same spacing as .sll-field-group */
.sll-field-wrap {
    margin-bottom: 16px;
}
.sll-field-wrap:last-child { margin-bottom: 0; }

/* Field label — identical to .sll-label in static form */
.sll-field-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--sll-primary);
    margin-bottom: 6px;
    line-height: 1.3;
}
.sll-field-label .sll-required {
    color: var(--sll-accent);
    margin-left: 2px;
}

/* Text / email / phone / number / date inputs — identical to .sll-input */
.sll-custom-form .sll-field.sll-input,
.sll-custom-form input.sll-field {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--sll-border);
    border-radius: var(--sll-radius-sm);
    font-size: 14px;
    color: var(--sll-text);
    background: var(--sll-bg);
    font-family: var(--sll-font);
    outline: none;
    box-sizing: border-box;
    transition: border-color var(--sll-transition), box-shadow var(--sll-transition);
}
.sll-custom-form .sll-field.sll-input:focus,
.sll-custom-form input.sll-field:focus {
    border-color: var(--sll-accent);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
.sll-custom-form .sll-field.sll-input.sll-input-error,
.sll-custom-form input.sll-field.sll-input-error {
    border-color: var(--sll-error);
}

/* Textarea */
.sll-custom-form .sll-textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--sll-border);
    border-radius: var(--sll-radius-sm);
    font-size: 14px;
    color: var(--sll-text);
    background: var(--sll-bg);
    font-family: var(--sll-font);
    outline: none;
    box-sizing: border-box;
    resize: vertical;
    min-height: 80px;
    transition: border-color var(--sll-transition), box-shadow var(--sll-transition);
}
.sll-custom-form .sll-textarea:focus {
    border-color: var(--sll-accent);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}

/* Select / Dropdown / Country */
.sll-custom-form .sll-select,
.sll-custom-form .sll-country-select {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--sll-border);
    border-radius: var(--sll-radius-sm);
    font-size: 14px;
    color: var(--sll-text);
    background: var(--sll-bg);
    font-family: var(--sll-font);
    outline: none;
    box-sizing: border-box;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 36px;
    cursor: pointer;
    transition: border-color var(--sll-transition), box-shadow var(--sll-transition);
}
.sll-custom-form .sll-select:focus,
.sll-custom-form .sll-country-select:focus {
    border-color: var(--sll-accent);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}

/* Date input */
.sll-custom-form .sll-date {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--sll-border);
    border-radius: var(--sll-radius-sm);
    font-size: 14px;
    color: var(--sll-text);
    background: var(--sll-bg);
    font-family: var(--sll-font);
    outline: none;
    box-sizing: border-box;
    transition: border-color var(--sll-transition), box-shadow var(--sll-transition);
}
.sll-custom-form .sll-date:focus {
    border-color: var(--sll-accent);
    box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}

/* Radio group */
.sll-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
}
.sll-radio-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 1.5px solid var(--sll-border);
    border-radius: var(--sll-radius-sm);
    font-size: 14px;
    color: var(--sll-text);
    cursor: pointer;
    transition: border-color var(--sll-transition), background var(--sll-transition);
    font-family: var(--sll-font);
    line-height: 1.3;
}
.sll-radio-option:hover {
    border-color: var(--sll-accent);
    background: var(--sll-accent-light);
}
.sll-radio-option input[type="radio"] {
    accent-color: var(--sll-accent);
    width: 15px; height: 15px;
    flex-shrink: 0;
    margin: 0;
}

/* Checkbox group */
.sll-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 2px;
}
.sll-checkbox-option {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 12px;
    border: 1.5px solid var(--sll-border);
    border-radius: var(--sll-radius-sm);
    font-size: 14px;
    color: var(--sll-text);
    cursor: pointer;
    transition: border-color var(--sll-transition), background var(--sll-transition);
    font-family: var(--sll-font);
    line-height: 1.3;
}
.sll-checkbox-option:hover {
    border-color: var(--sll-accent);
    background: var(--sll-accent-light);
}
.sll-checkbox-option input[type="checkbox"] {
    accent-color: var(--sll-accent);
    width: 15px; height: 15px;
    flex-shrink: 0;
    margin: 0;
}

/* Help text — small, muted, below the field */
.sll-help-text {
    font-size: 11px;
    color: var(--sll-text-muted);
    margin: 4px 0 0;
    line-height: 1.4;
    font-family: var(--sll-font);
}

/* Field error message */
.sll-custom-form .sll-field-error {
    display: block;
    font-size: 11px;
    color: var(--sll-error);
    margin: 4px 0 0;
    min-height: 14px;
    font-family: var(--sll-font);
}

/* Multi-step nav dots */
.sll-step-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-bottom: 20px;
}
.sll-step-dot {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--sll-border);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    color: var(--sll-text-muted);
    transition: background var(--sll-transition), color var(--sll-transition);
    flex-shrink: 0;
}
.sll-step-dot.sll-step-active {
    background: var(--sll-primary);
    color: #fff;
}
.sll-step-dot.sll-step-done {
    background: var(--sll-accent);
    color: #fff;
}
.sll-step-line {
    flex: 1;
    height: 2px;
    background: var(--sll-border);
    max-width: 36px;
    transition: background var(--sll-transition);
}
.sll-step-line.sll-step-done { background: var(--sll-accent); }

/* Step prev/next buttons */
.sll-step-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 14px;
    gap: 10px;
}
.sll-step-actions .sll-step-prev,
.sll-step-actions .sll-step-next {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--sll-radius-sm);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1.5px solid var(--sll-border);
    background: #fff;
    color: var(--sll-primary);
    font-family: var(--sll-font);
    transition: all var(--sll-transition);
}
.sll-step-actions .sll-step-next {
    background: var(--sll-accent);
    color: #fff;
    border-color: var(--sll-accent);
    margin-left: auto;
}
.sll-step-actions .sll-step-prev:hover {
    border-color: var(--sll-primary);
    background: var(--sll-primary-light);
}
.sll-step-actions .sll-step-next:hover {
    background: var(--sll-accent-dark);
    border-color: var(--sll-accent-dark);
}

/* Form spinner */
.sll-spinner {
    width: 28px; height: 28px;
    border: 3px solid rgba(13,27,75,0.12);
    border-top-color: var(--sll-accent);
    border-radius: 50%;
    animation: sll-spin 0.7s linear infinite;
}

/* Per-form custom modal header variables — set inline by renderer */
.sll-modal-header.sll-custom-header {
    background: var(--sll-form-header-bg, linear-gradient(135deg,#0D1B4B 0%,#1a2f6e 100%));
}
.sll-modal-header.sll-custom-header .sll-modal-title {
    color: var(--sll-form-title-color, #ffffff);
}
.sll-modal-header.sll-custom-header .sll-modal-subtitle {
    color: var(--sll-form-subtitle-color, rgba(255,255,255,0.8));
}
