/* ============================================================
   Smart LeadLock Lite – Frontend Styles
   by Fortunatus | UfirstDEV Technologies
   ============================================================ */

/* ── Variables ──────────────────────────────────────────── */
:root {
  --sll-primary:       #1a73e8;
  --sll-primary-dark:  #1557b0;
  --sll-primary-light: #e8f0fe;
  --sll-success:       #0f9d58;
  --sll-success-light: #e6f4ea;
  --sll-error:         #d93025;
  --sll-error-light:   #fce8e6;
  --sll-text:          #202124;
  --sll-text-muted:    #5f6368;
  --sll-border:        #dadce0;
  --sll-bg:            #ffffff;
  --sll-overlay-bg:    rgba(0, 0, 0, 0.55);
  --sll-radius:        12px;
  --sll-radius-sm:     8px;
  --sll-shadow:        0 8px 40px rgba(0, 0, 0, 0.18);
  --sll-transition:    0.2s ease;
  --sll-font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

.sll-file-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--sll-bg);
  border: 1.5px solid var(--sll-border);
  border-radius: var(--sll-radius);
  padding: 18px 22px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  transition: box-shadow var(--sll-transition), border-color var(--sll-transition);
  font-family: var(--sll-font);
}

.sll-file-card:hover {
  box-shadow: 0 4px 18px rgba(0,0,0,0.1);
  border-color: var(--sll-primary);
}

.sll-file-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--sll-primary-light);
  border-radius: var(--sll-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sll-file-icon svg {
  width: 26px;
  height: 26px;
}

.sll-file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sll-file-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sll-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sll-file-meta {
  font-size: 0.8rem;
  color: var(--sll-text-muted);
  letter-spacing: 0.01em;
}

.sll-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  background: var(--sll-primary);
  color: #fff !important;
  border: none;
  border-radius: var(--sll-radius-sm);
  padding: 10px 20px;
  font-size: 0.88rem;
  font-weight: 600;
  font-family: var(--sll-font);
  cursor: pointer;
  transition: background var(--sll-transition), transform var(--sll-transition), box-shadow var(--sll-transition);
  box-shadow: 0 2px 8px rgba(26, 115, 232, 0.3);
  white-space: nowrap;
  letter-spacing: 0.01em;
}

.sll-download-btn svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
}

.sll-download-btn:hover {
  background: var(--sll-primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(26, 115, 232, 0.4);
}

.sll-download-btn:active {
  transform: translateY(0);
}

.sll-error {
  color: var(--sll-error);
  font-size: 0.85rem;
  font-family: var(--sll-font);
}

/* ── Modal Overlay ──────────────────────────────────────── */
.sll-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: var(--sll-overlay-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

.sll-modal-overlay.sll-active {
  opacity: 1;
  pointer-events: all;
}

/* ── Modal Box ──────────────────────────────────────────── */
.sll-modal {
  position: relative;
  background: var(--sll-bg);
  border-radius: var(--sll-radius);
  box-shadow: var(--sll-shadow);
  width: 100%;
  max-width: 460px;
  font-family: var(--sll-font);
  transform: translateY(24px) scale(0.97);
  transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.25s ease;
  opacity: 0;
  overflow: hidden;
}

.sll-modal-overlay.sll-active .sll-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* ── Modal Header ───────────────────────────────────────── */
.sll-modal-header {
  background: linear-gradient(135deg, #1a73e8 0%, #0d47a1 100%);
  color: #fff;
  padding: 32px 32px 28px;
  text-align: center;
  position: relative;
}

.sll-modal-header::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 20px;
  background: var(--sll-bg);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.sll-modal-lock-icon {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  backdrop-filter: blur(4px);
}

.sll-modal-lock-icon svg {
  width: 26px;
  height: 26px;
  stroke: #fff;
}

.sll-modal-title {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 8px;
  color: #fff;
  line-height: 1.2;
}

.sll-modal-subtitle {
  font-size: 0.88rem;
  color: rgba(255,255,255,0.85);
  margin: 0;
  line-height: 1.5;
}

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

.sll-modal-close:hover {
  background: rgba(255,255,255,0.35);
}

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

/* ── Error Banner ───────────────────────────────────────── */
.sll-error-banner {
  background: var(--sll-error-light);
  border: 1px solid rgba(217, 48, 37, 0.25);
  border-radius: var(--sll-radius-sm);
  color: var(--sll-error);
  font-size: 0.85rem;
  padding: 12px 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

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

/* ── Form Fields ────────────────────────────────────────── */
.sll-field-group {
  margin-bottom: 18px;
}

.sll-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--sll-text);
  margin-bottom: 6px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sll-required {
  color: var(--sll-error);
}

.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: 12px 14px 12px 40px;
  border: 1.5px solid var(--sll-border);
  border-radius: var(--sll-radius-sm);
  font-size: 0.92rem;
  font-family: var(--sll-font);
  color: var(--sll-text);
  background: #fafafa;
  box-sizing: border-box;
  transition: border-color var(--sll-transition), box-shadow var(--sll-transition), background var(--sll-transition);
  outline: none;
}

.sll-input:focus {
  border-color: var(--sll-primary);
  box-shadow: 0 0 0 3px rgba(26, 115, 232, 0.12);
  background: #fff;
}

.sll-input.sll-input-error {
  border-color: var(--sll-error);
  box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.1);
}

.sll-field-error {
  display: block;
  font-size: 0.78rem;
  color: var(--sll-error);
  margin-top: 5px;
  min-height: 1em;
}

/* ── Submit Button ──────────────────────────────────────── */
.sll-submit-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: linear-gradient(135deg, #1a73e8, #1557b0);
  color: #fff;
  border: none;
  border-radius: var(--sll-radius-sm);
  padding: 15px 24px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--sll-font);
  cursor: pointer;
  transition: opacity var(--sll-transition), transform var(--sll-transition), box-shadow var(--sll-transition);
  box-shadow: 0 4px 16px rgba(26, 115, 232, 0.35);
  letter-spacing: 0.01em;
  margin-top: 4px;
}

.sll-submit-btn svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
  flex-shrink: 0;
}

.sll-submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(26, 115, 232, 0.45);
  opacity: 0.95;
}

.sll-submit-btn:active:not(:disabled) {
  transform: translateY(0);
}

.sll-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.sll-submit-btn.sll-loading svg {
  animation: sll-spin 0.8s linear infinite;
}

@keyframes sll-spin {
  to { transform: rotate(360deg); }
}

/* ── Privacy Note ───────────────────────────────────────── */
.sll-privacy-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--sll-text-muted);
  margin-top: 14px;
  text-align: center;
  line-height: 1.4;
}

.sll-privacy-note svg {
  width: 13px;
  height: 13px;
  stroke: var(--sll-success);
  flex-shrink: 0;
}

/* ── Success State ──────────────────────────────────────── */
.sll-state-success {
  text-align: center;
  padding: 36px 32px 36px;
}

.sll-success-icon {
  width: 70px;
  height: 70px;
  background: var(--sll-success-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  animation: sll-pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sll-pop {
  from { transform: scale(0.5); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.sll-success-icon svg {
  width: 32px;
  height: 32px;
  stroke: var(--sll-success);
  stroke-width: 2.5;
}

.sll-success-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--sll-text);
  margin: 0 0 10px;
}

.sll-success-msg {
  font-size: 0.9rem;
  color: var(--sll-text-muted);
  margin: 0 0 24px;
  line-height: 1.5;
}

.sll-download-final-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #0f9d58, #0a7a45);
  color: #fff !important;
  text-decoration: none !important;
  border-radius: var(--sll-radius-sm);
  padding: 14px 32px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--sll-font);
  box-shadow: 0 4px 16px rgba(15, 157, 88, 0.35);
  transition: transform var(--sll-transition), box-shadow var(--sll-transition);
  letter-spacing: 0.01em;
}

.sll-download-final-btn svg {
  width: 18px;
  height: 18px;
  stroke: #fff;
}

.sll-download-final-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(15, 157, 88, 0.45);
}

.sll-expiry-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 0.75rem;
  color: var(--sll-text-muted);
  margin-top: 16px;
}

.sll-expiry-note svg {
  width: 13px;
  height: 13px;
  stroke: var(--sll-text-muted);
  flex-shrink: 0;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 520px) {
  .sll-modal-header { padding: 24px 20px 22px; }
  .sll-modal-body   { padding: 22px 20px 24px; }
  .sll-modal-title  { font-size: 1.2rem; }

  .sll-file-card {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
  }
  .sll-download-btn { width: 100%; justify-content: center; }
}

/* ── Body lock when modal open ──────────────────────────── */
body.sll-modal-open {
  overflow: hidden;
}
