/* ====== Overlay ====== */
.captcha-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
  animation: captchaFadeIn 0.2s ease;
}

.captcha-overlay.captcha-hidden {
  display: none;
}

@keyframes captchaFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ====== Modal ====== */
.captcha-modal {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.35);
  width: 100%;
  max-width: 340px;
  overflow: hidden;
}

/* ====== Header ====== */
.captcha-header {
  background: #0d9488;
  padding: 16px 18px;
  color: #fff;
}

.captcha-header h3 {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  margin: 0;
}

.captcha-header h3 strong {
  font-weight: 700;
}

/* ====== Body ====== */
.captcha-body {
  padding: 16px;
}

/* ====== Grid ====== */
.captcha-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  margin-bottom: 16px;
}

/* ====== Tile ====== */
.captcha-tile {
  position: relative;
  cursor: pointer;
  border: 2px solid #e5e7eb;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color 0.15s;
}

.captcha-tile:hover {
  border-color: #9ca3af;
}

.captcha-tile img {
  width: 100%;
  height: 96px;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

.captcha-tile.selected {
  border-color: #1351B4;
}

/* ====== Checkmark ====== */
.captcha-check {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  background: #1351B4;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.12s, transform 0.12s;
  pointer-events: none;
}

.captcha-check i {
  font-size: 11px;
  color: #fff;
}

.captcha-tile.selected .captcha-check {
  opacity: 1;
  transform: scale(1);
}

/* ====== Footer ====== */
.captcha-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.captcha-footer-left {
  display: flex;
  gap: 6px;
}

.captcha-small-btn {
  width: 32px;
  height: 32px;
  background: #f3f4f6;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 12px;
  transition: background 0.15s;
}

.captcha-small-btn:hover {
  background: #e5e7eb;
}

.captcha-hlogo {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}

.captcha-btn-submit {
  background: #1351B4;
  color: #fff;
  border: none;
  padding: 10px 24px;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.captcha-btn-submit:hover {
  background: #0C326F;
}
