/*
 * domain-checker.css
 * SPINLYTICS — Verifica Legalità Casino
 * Widget mobile-first per verificare se un dominio è nella blacklist ADM
 */

/* ══ SEZIONE WRAPPER ════════════════════════════════════════════════ */
.checker-section {
  background: #fff;
  border-radius: 16px;
  padding: 24px 16px 20px;
  margin: 20px 0;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.checker-header {
  margin-bottom: 16px;
}
.checker-title {
  font-size: 16px;
  font-weight: 800;
  color: #1a1f36;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.checker-subtitle {
  font-size: 12px;
  color: #5e6c84;
  line-height: 1.5;
}
.checker-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  color: #166534;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 14px;
}

/* ══ INPUT ROW ══════════════════════════════════════════════════════ */
.checker-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}
.checker-input-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
}
.checker-input-icon {
  position: absolute;
  left: 12px;
  font-size: 16px;
  pointer-events: none;
  line-height: 1;
}
.checker-input {
  width: 100%;
  height: 52px;
  border: 2px solid #e5e9f0;
  border-radius: 12px;
  padding: 0 14px 0 38px;
  font-size: 16px; /* 16px previene zoom iOS */
  font-weight: 500;
  color: #1a1f36;
  background: #fff;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.checker-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
}
.checker-input:focus {
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102,126,234,.12);
}
.checker-input.has-value {
  border-color: #c7d2fe;
}
.checker-btn {
  height: 52px;
  padding: 0 20px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: box-shadow .2s, transform .15s, opacity .15s;
  -webkit-tap-highlight-color: transparent;
  display: flex;
  align-items: center;
  gap: 6px;
}
.checker-btn:hover {
  box-shadow: 0 4px 16px rgba(102,126,234,.4);
  transform: translateY(-1px);
}
.checker-btn:active { transform: scale(.97); }
.checker-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.checker-btn:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}
.checker-btn-icon { font-size: 16px; }

/* ══ ESEMPI RAPIDI ══════════════════════════════════════════════════ */
.checker-examples {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.checker-examples-label {
  font-size: 11px;
  color: #94a3b8;
  font-weight: 600;
  flex-shrink: 0;
}
.checker-example-btn {
  font-size: 11px;
  font-weight: 600;
  color: #667eea;
  background: #f0f4ff;
  border: none;
  border-radius: 20px;
  padding: 4px 10px;
  cursor: pointer;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.checker-example-btn:hover { background: #e0e7ff; }
.checker-example-btn:focus-visible {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

/* ══ RISULTATO ══════════════════════════════════════════════════════ */
.checker-result {
  border-radius: 14px;
  padding: 18px 16px;
  display: none;
  animation: resultSlideIn .3s ease;
}
.checker-result.visible { display: block; }

@keyframes resultSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stato: BLOCCATO (nella blacklist ADM) */
.checker-result.blocked {
  background: linear-gradient(135deg, #fff1f2, #fff5f5);
  border: 1.5px solid #fecdd3;
}
/* Stato: PULITO (non in blacklist, non verificato ADM) */
.checker-result.clean {
  background: linear-gradient(135deg, #f0fdf4, #f0f9ff);
  border: 1.5px solid #bbf7d0;
}
/* Stato: LICENZA ADM confermata */
.checker-result.adm_licensed {
  background: linear-gradient(135deg, #f0fdf4, #f0fff4);
  border: 1.5px solid #6ee7b7;
}
/* Stato: loading */
.checker-result.loading {
  background: #f8faff;
  border: 1.5px solid #e0e7ff;
}
/* Stato: errore */
.checker-result.error {
  background: #fffbeb;
  border: 1.5px solid #fde68a;
}

.result-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.result-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}
.result-title-wrap { flex: 1; min-width: 0; }
.result-title {
  font-size: 16px;
  font-weight: 800;
  color: #1a1f36;
  margin-bottom: 2px;
  line-height: 1.2;
}
.result-domain {
  font-size: 13px;
  font-weight: 600;
  color: #667eea;
  word-break: break-all;
}

/* Badge risultato */
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  flex-shrink: 0;
}
.result-badge.blocked   { background: #fee2e2; color: #dc2626; }
.result-badge.clean     { background: #dcfce7; color: #16a34a; }
.result-badge.licensed  { background: #d1fae5; color: #065f46; }
.result-badge.loading   { background: #e0e7ff; color: #4338ca; }

/* Descrizione */
.result-desc {
  font-size: 13px;
  color: #4a5568;
  line-height: 1.6;
  margin-bottom: 12px;
}
.result-desc strong { color: #1a1f36; }

/* Dettagli tecnici */
.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.result-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #5e6c84;
  background: rgba(255,255,255,.7);
  border-radius: 8px;
  padding: 4px 10px;
}
.result-meta-item svg { flex-shrink: 0; }

/* CTA nel risultato (per casino ADM nei nostri partner) */
.result-cta-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,.06);
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.result-cta-btn {
  flex: 1;
  min-width: 120px;
  height: 40px;
  border-radius: 10px;
  border: none;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity .15s, transform .15s;
  -webkit-tap-highlight-color: transparent;
}
.result-cta-btn:active { transform: scale(.97); }
.result-cta-btn.primary {
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  box-shadow: 0 3px 10px rgba(102,126,234,.3);
}
.result-cta-btn.secondary {
  background: #f0f2f8;
  color: #667eea;
}

/* Loading spinner */
.checker-spinner {
  width: 20px; height: 20px;
  border: 2px solid #c7d2fe;
  border-top-color: #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ══ INFO STRIP ADM ═════════════════════════════════════════════════ */
.checker-adm-info {
  margin-top: 14px;
  padding: 10px 12px;
  background: #f8faff;
  border-radius: 10px;
  border: 1px solid #e0e7ff;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: #5e6c84;
  line-height: 1.5;
}
.checker-adm-info svg { flex-shrink: 0; }
.checker-adm-info a { color: #667eea; text-decoration: underline; }

/* ══ RESPONSIVE ════════════════════════════════════════════════════ */
@media (min-width: 640px) {
  .checker-section { padding: 28px 24px 24px; }
  .checker-title { font-size: 18px; }
}

/* ══ REDUCED MOTION ════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  .checker-result { animation: none; }
  .checker-spinner { animation: none; opacity: .5; }
}
