/* =========================
   Etsy Research Tool UI
   Black / White / Orange
   ========================= */

:root{
  --bg: #0b0b0d;
  --panel: rgba(255,255,255,0.06);
  --panel2: rgba(255,255,255,0.08);
  --border: rgba(255,255,255,0.12);
  --text: #ffffff;
  --muted: rgba(255,255,255,0.72);
  --muted2: rgba(255,255,255,0.55);

  --orange: #F56400;
  --orange2: #ff7a1a;

  --shadow: 0 24px 80px rgba(0,0,0,0.65);
  --radius: 18px;

  --maxw: 980px;
  --cardw: 640px;
}

*,
*::before,
*::after{ box-sizing: border-box; }

html, body{ height: 100%; }

body{
  margin: 0;
  font-family: 'Tajawal', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(245,100,0,0.25), transparent 60%),
    radial-gradient(900px 500px at 10% 30%, rgba(255,255,255,0.08), transparent 55%),
    radial-gradient(900px 500px at 90% 60%, rgba(255,255,255,0.06), transparent 55%),
    var(--bg);

  /* Center everything */
  display: grid;
  place-items: center;
  padding: 24px;
}

.min-max-price {
  margin-bottom: 10px;
}

/* MAIN WRAPPER (your existing .container) */
.container{
  width: min(100%, var(--maxw));
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;

  /* Centered "mini app card" feel */
  padding: 22px;
}

/* Turn the page into a centered card + readable sections */
.container{
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

/* HEADER */
header{
  text-align: center;
  padding: 8px 8px 0;
}

h1{
  margin: 6px 0 8px;
  font-family: 'Changa One', system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.2px;
  font-size: clamp(28px, 3.2vw, 30px);
  line-height: 1.05;
}

h2{
  margin: 6px 0 8px;
  font-family: 'Changa One', system-ui, sans-serif;
  font-weight: 400;
  letter-spacing: 0.2px;
  font-size: clamp(28px, 3.2vw, 80px);
  line-height: 1.05;
}

.subhead{
  margin: 0 auto;
  max-width: 62ch;
  color: var(--muted);
  font-size: 15.5px;
  line-height: 1.5;
}

.user-tier{
  margin: 14px auto 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(245,100,0,0.12);
  border: 1px solid rgba(245,100,0,0.35);
  color: #ffd6bb;
  font-weight: 700;
  font-size: 13px;
}

.user-tier::before{
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 0 4px rgba(245,100,0,0.18);
}

/* DIVIDER */
.line-break{
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(245,100,0,0.9), transparent);
  margin: 6px 0 2px;
  opacity: 0.9;
}

/* SEO INTRO + FAQ: keep readable but not huge */
.seo-intro,
.faq{
  margin: 0 auto;
  width: min(100%, 860px);
  padding: 16px 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius);
}

.seo-intro h2,
.faq h2{
  margin: 0 0 8px;
  font-size: 16px;
  letter-spacing: 0.3px;
  color: rgba(255,255,255,0.92);
}

.seo-intro p,
.faq p{
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
  font-size: 14.5px;
}

/* TOOL CARD: this is the mini app in the middle */
.tool{
  width: min(100%, var(--cardw));
  margin: 0 auto;
  padding: 18px;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(800px 200px at 50% 0%, rgba(245,100,0,0.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  box-shadow: 0 18px 60px rgba(0,0,0,0.55);
}

/* INPUTS */
input,
select{
  width: 100%;
  padding: 12px 12px;
  margin: 0 0 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(12,12,15,0.55);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input::placeholder{
  color: rgba(255,255,255,0.50);
}

input:focus,
select:focus{
  border-color: rgba(245,100,0,0.85);
  box-shadow: 0 0 0 4px rgba(245,100,0,0.18);
  background: rgba(12,12,15,0.75);
}

select{
  cursor: pointer;
}

/* =========================================
   CHECKBOXES TO TOGGLES (MODERNIZED)
   ========================================= */

/* Layout for the toggles section */
.filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 4px 0 12px; /* Bottom margin creates space before Star Seller/Location */
  text-align: left;
}

/* General label styling inside the tool */
.tool label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: rgba(255,255,255,0.92);
  font-size: 17px;
  font-weight: 500;
  user-select: none;
  cursor: pointer;
}

/* Ensure the standalone "Star Seller" aligns nicely */
.tool > label:has(input[type="checkbox"]) {
  display: flex;
  margin-bottom: 16px; /* Spacing before the Location filter */
}

/* Transform the native checkbox into a Toggle Switch */
.tool input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 44px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 99px;
  cursor: pointer;
  outline: none;
  flex-shrink: 0;
  margin: 0; /* Reset default margin */
  transition: background 0.3s ease, border-color 0.3s ease;
}

/* The Toggle Knob (Circle) */
.tool input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  background-color: #ffffff;
  border-radius: 50%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

/* Checked State: Background Orange */
.tool input[type="checkbox"]:checked {
  background-color: var(--orange);
  border-color: var(--orange);
}

/* Checked State: Move Knob */
.tool input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

/* Hover effect for better UX */
.tool input[type="checkbox"]:hover {
  background: rgba(255, 255, 255, 0.15);
}
.tool input[type="checkbox"]:checked:hover {
  background: var(--orange2);
}

/* =========================================
   END CHECKBOXES
   ========================================= */

/* MIN / MAX GRID */
.min-max-price{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  text-align: left;
  margin-top: 6px;
}

.min-max-price label{
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  color: rgba(255,255,255,0.88);
  /* Reset cursor/layout from the generic label rule above if needed */
  align-items: flex-start; 
}

.min-max-price input{
  margin: 0;
}

/* BUTTON */
button{
  width: 100%;
  padding: 13px 14px;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 900;
  font-size: 15px;
  letter-spacing: 0.2px;
  color: #111;
  background: linear-gradient(180deg, var(--orange2), var(--orange));
  box-shadow:
    0 16px 34px rgba(245,100,0,0.28),
    0 2px 0 rgba(255,255,255,0.16) inset;
  transition: transform 90ms ease, filter 140ms ease, box-shadow 140ms ease;
}

button:hover{
  filter: brightness(1.03);
  box-shadow:
    0 18px 40px rgba(245,100,0,0.34),
    0 2px 0 rgba(255,255,255,0.18) inset;
}

button:active{
  transform: translateY(1px);
}

/* FAQ headings */
.faq h3{
  margin: 14px 0 6px;
  font-size: 14.5px;
  color: rgba(255,255,255,0.92);
}

.faq p{
  margin: 0 0 8px;
}

/* Accessibility utility already referenced in your HTML */
.sr-only{
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* RESPONSIVE */
@media (max-width: 720px){
  body{ padding: 16px; }
  .container{ padding: 18px; }
  .tool{ padding: 16px; }
}

@media (max-width: 480px){
  .filter-row{ grid-template-columns: 1fr; }
  .min-max-price{ grid-template-columns: 1fr; }
  h1{ font-size: 30px; }
  .subhead{ font-size: 14.5px; }
}

/* FOOTER */
.site-footer {
  margin-top: 60px;
  padding: 30px 20px;
  text-align: center;
  font-size: 14px;
  color: #777;
  border-top: 1px solid #e5e5e5;
}

.footer-links a {
  color: #555;
  text-decoration: none;
  margin: 0 6px;
}

.footer-links a:hover {
  text-decoration: underline;
}

.divider {
  color: #bbb;
}

.footer-inner {
  max-width: 900px;
  margin: 0 auto;
}

/* PRE-TOOL SECTION */
.pre-tool-section{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin: 0 auto 14px;
}

.hero-subheading{
  margin: 10px 0 5px;
  font-size: 30px;
  font-weight: 600;
  width: 100%;
  text-align: center;
}

.hero-helper{
  margin: 0;
  font-size: 22px;
  font-weight: 500;
  opacity: 0.8;
  text-align: center;
}

/* =========================
   Lead Gate Modal
   ========================= */
.lead-gate{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  z-index: 99999;
  align-items: center;
  justify-content: center;
  padding: 24px;
  width: 100vw;
  height: 100vh;
  margin: 0;
  background:
    radial-gradient(900px 400px at 50% 0%, rgba(245,100,0,0.18), transparent 60%),
    rgba(0,0,0,0.72);
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.lead-gate.is-open{
  display: flex;
}

.lead-gate,
.lead-gate *{
  box-sizing: border-box;
}

.lead-card{
  width: min(560px, 100%);
  max-width: 560px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(700px 220px at 50% 0%, rgba(245,100,0,0.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow: 0 30px 90px rgba(0,0,0,0.72);
  padding: 20px 20px 18px;
  display: block;
  transform: translateZ(0);
}

.lead-card h2{
  margin: 0 0 6px;
  font-size: 22px;
  letter-spacing: 0.2px;
  text-align: left;
}

.lead-sub{
  margin: 0 0 14px;
  color: var(--muted);
  line-height: 1.4;
  font-size: 14.5px;
  text-align: left;
}

.lead-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 10px;
}

.lead-label{
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  font-size: 15px;
  font-weight: 600;
  color: rgba(255,255,255,0.95);
  text-align: left;
}

.lead-label span{
  color: var(--orange);
  font-weight: 900;
  margin-left: -3px;
}

.lead-label input{
  flex-basis: 100%;
  margin: 0;
}

.lead-gate input{
  width: 100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(12,12,15,0.55);
  color: var(--text);
  font-size: 15px;
  outline: none;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.lead-gate input::placeholder{
  color: rgba(255,255,255,0.45);
}

.lead-gate input:focus{
  border-color: rgba(245,100,0,0.85);
  box-shadow: 0 0 0 4px rgba(245,100,0,0.18);
  background: rgba(12,12,15,0.75);
}

.lead-gate input.is-invalid{
  border-color: rgba(255,120,120,0.85);
  box-shadow: 0 0 0 4px rgba(255,120,120,0.14);
}

.lead-actions{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
}

.lead-actions button{
  padding: 13px 14px;
  border-radius: 14px;
  font-weight: 900;
  font-size: 14.5px;
  width: 100%;
}

button.ghost{
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.92);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: none;
}

button.ghost:hover{
  filter: brightness(1.06);
}

.lead-error{
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255,120,120,0.25);
  background: rgba(255,120,120,0.10);
  color: rgba(255,210,210,0.95);
  font-size: 13px;
  line-height: 1.35;
}

@media (max-width: 520px){
  .lead-actions{
    grid-template-columns: 1fr;
  }
}

/* =========================
   Mobile Block Overlay
   ========================= */
.mobile-block-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  margin: 0;
  z-index: 9999999;
  background: rgba(0,0,0,0.95);
  align-items: center;
  justify-content: center;
  padding: 30px;
}

.mobile-block-card {
  max-width: 400px;
  padding: 30px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.14);
  background: 
    radial-gradient(400px 150px at 50% 0%, rgba(245,100,0,0.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  text-align: center;
}

.mobile-block-card h2 {
  margin: 0 0 15px;
  font-size: 22px;
  color: var(--orange);
}

.mobile-block-card p {
  margin: 0 0 20px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.85);
}

.mobile-block-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mobile-block-actions button {
  padding: 14px 20px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  transition: filter 140ms ease;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.7);
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: none;
}

.mobile-block-actions button:hover {
  filter: brightness(1.1);
}

/* Show mobile block only on mobile screens */
@media (max-width: 768px) {
  .mobile-block-overlay {
    display: flex;
  }
  
  .mobile-block-overlay.is-dismissed {
    display: none;
  }
}

/* =========================
   Incognito Warning Modal
   ========================= */
.incognito-warning {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: none;
  z-index: 99998;
  align-items: center;
  justify-content: center;
  padding: 24px;
  width: 100vw;
  height: 100vh;
  margin: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(6px);
}

.incognito-warning.is-open {
  display: flex;
}

.incognito-card {
  max-width: 480px;
  padding: 28px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(500px 180px at 50% 0%, rgba(245,100,0,0.18), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  box-shadow: 0 30px 90px rgba(0,0,0,0.72);
  text-align: center;
}

.incognito-card h2 {
  margin: 0 0 16px;
  font-size: 24px;
  color: var(--orange);
}

.incognito-card p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.9);
}

.incognito-card p:last-of-type {
  margin-bottom: 20px;
}

.incognito-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.incognito-actions button {
  padding: 13px 14px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 14.5px;
  width: 100%;
}

@media (max-width: 480px) {
  .incognito-actions {
    grid-template-columns: 1fr;
  }
}

/* Disclaimer */
.disclaimer {
  margin: 12px 0 0;
  font-size: 10px;
  color: rgba(255,255,255,0.5);
  text-align: center;
}

.disclaimer a {
  color: var(--orange);
  text-decoration: underline;
}

.disclaimer a:hover {
  color: var(--orange2);
}