/* ============================================================
   FREE SEARCH POPUP STYLES
   ============================================================ */

/* ── Overlay ──────────────────────────────────────────────── */
.free-search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(2, 14, 106, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.free-search-overlay.show {
  opacity: 1;
  visibility: visible;
}

.free-search-overlay.show .free-search-popup {
  transform: translateY(0);
  opacity: 1;
}

/* ── Popup Card ───────────────────────────────────────────── */
.free-search-popup {
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 20px 50px rgba(2, 14, 106, 0.15);
  max-width: 820px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* ── Close Button ─────────────────────────────────────────── */
.free-search-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.7;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 10;
}

.free-search-close:hover {
  opacity: 1;
  transform: rotate(90deg);
}

/* ── Image & Header ───────────────────────────────────────── */
.free-search-image {
  max-width: 180px;
  height: auto;
  margin-bottom: 8px;
}

.free-search-title {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.25;
  color: #020e6a;
  margin: 0;
  text-align: center;
}

.free-search-subtitle {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 15px;
  line-height: 1.5;
  color: #475569;
  margin: 0;
  text-align: center;
  max-width: 580px;
}

/* ── Form Layout ──────────────────────────────────────────── */
.free-search-form {
  width: 100%;
  margin-top: 10px;
}

.free-search-row {
  display: flex;
  gap: 16px;
  width: 100%;
}

.free-search-field {
  flex: 1;
  position: relative;
}

.free-search-field input {
  width: 100%;
  height: 52px;
  padding: 0 24px;
  border: 1px solid #cbd5e1;
  border-radius: 9999px;
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 15px;
  color: #020e6a;
  outline: none;
  background: #ffffff;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.free-search-field input:focus {
  border-color: #4A63FD;
  box-shadow: 0 0 0 3px rgba(74, 99, 253, 0.15);
}

.free-search-field input.invalid {
  border-color: #dc2626 !important;
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

.free-search-field input::placeholder {
  color: #94a3b8;
}

.free-search-submit {
  height: 52px;
  padding: 0 36px;
  background: linear-gradient(67deg, #4A63FD 10.59%, #03159D 93.98%);
  color: #ffffff;
  border: none;
  border-radius: 9999px;
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(74, 99, 253, 0.3);
}

.free-search-submit:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.free-search-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* ── Preview Table Section ────────────────────────────────── */
.free-search-preview-section {
  width: 100%;
  /* margin-top: 16px; */
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 1px solid #cbd5e1;
  /* gap: 16px; */
}

.free-search-preview-title {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 18px;
  font-weight: 700;
  color: #020e6a;
  margin: 0;
  text-align: center;
  letter-spacing: -0.01em;
  position: relative;
  top: 200px;
  z-index: 5;
  pointer-events: none;
}

.free-search-table-container {
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.02);
}

.free-search-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.free-search-table th,
.free-search-table td {
  padding: 14px 18px;
  font-size: 13px;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.free-search-table th {
  background: #f8fafc;
  font-weight: 600;
  color: #475569;
  font-family: var(--font-primary, 'Outfit', sans-serif);
}

.free-search-table tr:last-child td {
  border-bottom: none;
}

.free-search-table td {
  color: #334155;
  font-family: var(--font-primary, 'Outfit', sans-serif);
}

/* ── Blurred Rows ─────────────────────────────────────────── */
.free-search-table tr.blurred-row td {
  filter: blur(5px);
  opacity: 0.4;
  user-select: none;
  pointer-events: none;
}

/* ── Success State ────────────────────────────────────────── */
.free-search-popup .submission-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 30px 10px;
  width: 100%;
}

.free-search-popup .submission-success__icon {
  margin-bottom: 24px;
  animation: scaleIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.free-search-popup .submission-success__title {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 32px;
  font-weight: 600;
  color: #020e6a;
  margin: 0 0 12px 0;
}

.free-search-popup .submission-success__description {
  font-family: var(--font-primary, 'Outfit', sans-serif);
  font-size: 16px;
  color: #475569;
  margin: 0 0 32px 0;
  line-height: 1.5;
  max-width: 460px;
}

.free-search-popup .submission-success__button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 40px;
  background: linear-gradient(67deg, #4A63FD 10.59%, #03159D 93.98%);
  color: #ffffff;
  border-radius: 9999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 4px 14px rgba(74, 99, 253, 0.3);
}

.free-search-popup .submission-success__button:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

@keyframes scaleIn {
  0% {
    transform: scale(0.6);
    opacity: 0;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* ── Responsive styling ───────────────────────────────────── */
@media (max-width: 768px) {
  .free-search-popup {
    padding: 32px 20px;
    border-radius: 20px;
    gap: 16px;
  }

  .free-search-title {
    font-size: 26px;
  }

  .free-search-subtitle {
    font-size: 14px;
  }

  .free-search-row {
    flex-direction: column;
    gap: 12px;
  }

  .free-search-field input {
    height: 48px;
    font-size: 14px;
  }

  .free-search-submit {
    width: 100%;
    height: 48px;
    font-size: 14px;
  }

  .free-search-table-container {
    overflow-x: auto;
  }

  .free-search-table th,
  .free-search-table td {
    padding: 10px 14px;
    font-size: 12px;
  }
}

@media (max-width: 1024px) {
  .free-search-preview-title {
    top: 190px;
  }
}

@media (max-width: 480px) {
  .free-search-preview-title {
    top: 180px;
  }
}