/**
 * CF7 anti-spam — brand icon challenge, shown as a modal popup on submit.
 */

/* Honeypot — always hidden (defensive, JS-independent) */
.sharks-hp {
  position: absolute !important;
  left: -9999px !important;
  top: -9999px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Modal hidden until triggered */
.sharks-iconcheck[hidden] {
  display: none !important;
}

body.sharks-ic-open {
  overflow: hidden;
}

/* Overlay */
.sharks-iconcheck {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.sharks-iconcheck__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

/* Dialog card */
.sharks-iconcheck__dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 360px;
  background: #ffffff;
  border-radius: 18px;
  padding: 30px 28px 26px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  animation: sharks-ic-in 0.18s ease-out;
  /* Never taller than the screen, and lay out as a column so the confirm
     button stays visible even on short viewports. */
  max-height: 92vh;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
}

/* Grid takes the flexible middle and may scroll if the screen is tiny. */
.sharks-iconcheck__dialog .sharks-iconcheck__grid {
  min-height: 0;
  overflow: auto;
}

@keyframes sharks-ic-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

.sharks-iconcheck__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  line-height: 1;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: #111111;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s ease, background-color 0.15s ease;
}

.sharks-iconcheck__close:hover {
  opacity: 1;
  background: #f2f2f2;
}

.sharks-iconcheck__label {
  font-family: 'Helvetica', Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  margin: 0 0 16px;
  padding-right: 24px;
  color: #111111;
}

.sharks-iconcheck__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.sharks-iconcheck__slot {
  appearance: none;
  -webkit-appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  padding: 16px;
  margin: 0;
  background: #ffffff;
  border: 1.5px solid #d9d8d4;
  border-radius: 12px;
  cursor: pointer;
  color: #111111;
  transition: border-color 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.sharks-iconcheck__slot svg {
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
}

.sharks-iconcheck__slot:hover {
  border-color: #111111;
  transform: translateY(-1px);
}

.sharks-iconcheck__slot:focus-visible {
  outline: 2px solid #f237a6;
  outline-offset: 2px;
}

.sharks-iconcheck__slot.is-selected {
  border-color: #f237a6;
  background: #fde6f4;
  box-shadow: 0 0 0 2px rgba(242, 55, 166, 0.25);
}

.sharks-iconcheck__error {
  font-family: 'Helvetica', Arial, sans-serif;
  font-size: 12.5px;
  font-weight: 500;
  color: #f237a6;
  margin: 12px 0 0;
}

.sharks-iconcheck.is-invalid .sharks-iconcheck__grid {
  outline: 1px dashed rgba(242, 55, 166, 0.6);
  outline-offset: 6px;
  border-radius: 14px;
}

.sharks-iconcheck__confirm {
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  margin-top: 20px;
  padding: 14px 18px;
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  font-family: 'Switzer', 'Helvetica', Arial, sans-serif;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.1s ease;
  flex-shrink: 0; /* always stays visible at the bottom of the dialog */
}

.sharks-iconcheck__confirm:hover {
  background: #f237a6;
  transform: translateY(-1px);
}

/* ── Mobile: keep the popup compact so the confirm button is on-screen ── */
@media (max-width: 600px) {
  .sharks-iconcheck {
    padding: 14px;
    align-items: center;
  }
  .sharks-iconcheck__dialog {
    max-width: 100%;
    padding: 22px 18px 18px;
  }
  .sharks-iconcheck__label {
    font-size: 14px;
    margin-bottom: 12px;
    padding-right: 22px;
  }
  /* 3 × 2 grid, kept narrow/compact (roughly square block) and centered */
  .sharks-iconcheck__grid {
    gap: 8px;
    max-width: 248px;
    margin: 0 auto;
  }
  .sharks-iconcheck__slot {
    padding: 14px;
    border-radius: 10px;
  }
  .sharks-iconcheck__confirm {
    margin-top: 16px;
  }
}
