/* =============================================================
   Security Widget - Estilos (Captcha grid + Antibot number-select)
   ============================================================= */

.sw-loading, .sw-error {
  padding: 20px; text-align: center;
  color: var(--vd-text-dim);
  background: var(--vd-panel); border: 1px solid var(--vd-border);
  border-radius: 10px;
}
.sw-error { color: var(--vd-danger); }

.sw-captcha, .sw-antibot {
  background: var(--vd-panel);
  border: 1px solid var(--vd-border);
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 14px;
}

.sw-header {
  font-size: 14px; font-weight: 600;
  color: var(--vd-text);
  margin-bottom: 12px;
}

.sw-hint {
  font-size: 12px; color: var(--vd-text-dim);
  margin-top: 10px;
}

/* ===== Captcha grid 3x3 ===== */
.sw-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  max-width: 320px;
}
.sw-tile {
  aspect-ratio: 1 / 1;
  background: var(--vd-panel-2);
  border: 2px solid var(--vd-border);
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  transition: transform .1s ease, border-color .15s ease;
  position: relative;
}
.sw-tile:hover { transform: scale(1.02); border-color: #475569; }
.sw-tile img { width: 100%; height: 100%; display: block; }
.sw-tile.is-selected {
  border-color: var(--vd-primary);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, .4);
}
.sw-tile.is-selected::after {
  content: '✓';
  position: absolute; top: 4px; right: 6px;
  width: 22px; height: 22px;
  background: var(--vd-primary); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700;
}

/* ===== Antibot Number Grid 4x4 ===== */
.sw-numgrid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  max-width: 240px;
}
.sw-num {
  aspect-ratio: 1 / 1;
  background: var(--vd-panel-2);
  border: 1px solid var(--vd-border);
  border-radius: 8px;
  color: var(--vd-text);
  font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.sw-num:hover:not(.is-picked) { background: #334155; transform: translateY(-1px); }
.sw-num.is-picked {
  background: var(--vd-primary); color: #fff; border-color: var(--vd-primary-h);
  cursor: not-allowed;
}
.sw-clicked span { font-weight: 700; color: var(--vd-primary); }

/* ===== Actions ===== */
.sw-actions { margin-top: 12px; display: flex; justify-content: flex-end; }
.sw-verify { min-width: 140px; }
.sw-status { margin-top: 10px; font-size: 13px; text-align: center; min-height: 18px; }
.sw-status.is-error { color: var(--vd-danger); }
.sw-status.is-ok    { color: var(--vd-primary); }

/* ===== PoW (invisible) ===== */
.sw-pow .sw-header { color: var(--vd-text-dim); }
