/* Custom Fixes */

/* ============================================================
   OFFER INFO BUTTON TOOLTIP
   ============================================================ */

/* Tooltip container — hidden by default */
.info-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
  transform: translateY(4px);
  z-index: 10000;
}

/* Show on hover of the trigger button */
.info-btn-trigger:hover ~ .info-tooltip,
.info-btn-trigger:focus ~ .info-tooltip,
.info-tooltip.show {
  opacity: 1 !important;
  transform: translateY(0) !important;
  pointer-events: none;
}

/* Tooltip card design */
.info-tooltip-card {
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px;
  padding: 7px 10px;
  min-width: 120px;
  max-width: 180px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.3);
  white-space: normal;
  /* Arrow pointing down-right */
  position: relative;
}

.info-tooltip-card::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 8px;
  border: 6px solid transparent;
  border-top-color: #1e293b;
}

.info-tooltip-label {
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.45);
  margin-bottom: 3px;
}

.info-tooltip-text {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.92);
  line-height: 1.4;
}

/* ============================================================
   BACKGROUND IMAGE
   ============================================================ */

html, body {
  background-image: url('../background.webp') !important;
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}


/* ============================================================
   MOBILE OPTIMIZATIONS
   ============================================================ */



/* ── Touch targets ──────────────────────────────────────── */
@media (max-width: 768px) {
  button:not(.info-btn-trigger),
  a[role="button"],
  input[type="button"],
  input[type="submit"],
  input[type="reset"] {
    min-height: 44px !important;
    touch-action: manipulation; /* kill 300ms tap delay */
  }

  /* Quest / action buttons */
  .quest-button-gradient,
  .quest-button-waiting,
  .primary-button-gradient,
  .success-button-gradient,
  .danger-button-gradient {
    min-height: 52px !important;
    padding: 12px 16px !important;
    font-size: 15px !important;
    touch-action: manipulation;
  }

  /* All interactive elements */
  a, button, input, select, textarea, label {
    touch-action: manipulation;
  }
}

/* ── Input fields ───────────────────────────────────────── */
@media (max-width: 768px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="search"],
  select,
  textarea {
    min-height: 48px !important;
    font-size: 16px !important; /* prevents iOS auto-zoom */
    padding: 12px 44px 12px 14px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    border-radius: 10px !important;
  }

  /* spinner/icon inside input */
  [class*="animate-spin"],
  input[type="text"] + *[class*="spin"],
  input[type="text"] ~ *[class*="spin"] {
    position: absolute !important;
    right: 12px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    pointer-events: none !important;
    z-index: 10 !important;
  }

  div:has(> input[type="text"]) {
    position: relative !important;
  }

  /* Username input: override left padding when there is a left icon (.pl-10) */
  input[type="text"].pl-10 {
    padding-left: 2.75rem !important;
  }

  input:focus,
  textarea:focus,
  select:focus {
    outline: 2px solid #335fff !important;
    outline-offset: 2px !important;
  }

  form,
  [class*="form"],
  [class*="input-container"] {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* ── Choose Your Reward cards ───────────────────────────── */
@media (max-width: 640px) {
  button.w-36 {
    width: 43vw !important;
    max-width: 176px !important;
    padding: 0.875rem !important;
    min-height: unset !important;
  }

  button.w-36 .w-16 {
    width: 4.5rem !important;
    height: 4.5rem !important;
    margin-bottom: 0.5rem !important;
  }

  button.w-36 .w-14 {
    width: 3.75rem !important;
    height: 3.75rem !important;
  }

  button.w-36 h3 {
    font-size: 0.9375rem !important;
    margin-bottom: 0.25rem !important;
  }

  button.w-36 p {
    font-size: 0.8125rem !important;
  }

  div:has(> button.w-36) {
    gap: 0.75rem !important;
  }
}

/* ── Chat box: reduce fixed height on small screens ──────── */
@media (max-width: 640px) {
  /* The live chat messages area is h-[300px]; shrink it on phones */
  .h-\[300px\] {
    height: 200px !important;
  }
}
@media (max-height: 680px) and (max-width: 640px) {
  .h-\[300px\] {
    height: 160px !important;
  }
}

/* ── Offer wall min-height: loosen on small screens ──────── */
@media (max-width: 640px) {
  .min-h-\[340px\] {
    min-height: 260px !important;
  }
}

/* ── Card padding: tighten on very small screens ─────────── */
@media (max-width: 380px) {
  .p-5 {
    padding: 0.875rem !important;
  }
  .px-4 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
}

/* ── Text sizes: comfortable reading on all phones ───────── */
@media (max-width: 640px) {
  .text-2xl { font-size: 1.375rem !important; }
  .text-xl  { font-size: 1.25rem  !important; }
  /* Cap the quest locker h1 (text-5xl) so it doesn't overflow on small phones */
  .text-5xl { font-size: 2rem     !important; }
}
@media (max-width: 380px) {
  .text-5xl { font-size: 1.75rem  !important; }
}

/* ── FAQ / Help text overflow ────────────────────────────── */
@media (max-width: 768px) {
  [class*="help"] p,
  [class*="help"] div,
  [class*="faq"] p,
  [class*="faq"] div {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    white-space: normal !important;
    max-width: 100% !important;
  }

  [class*="faq"] [class*="answer"],
  [class*="faq"] > div > div:last-child {
    font-size: 13px !important;
    line-height: 1.55 !important;
    padding: 6px 10px !important;
  }

  .xl\:w-80 {
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }
}

/* ── Offer iframes ───────────────────────────────────────── */
@media (max-width: 768px) {
  iframe[src*="offer"],
  iframe[id*="offer"],
  .offer-container iframe,
  .offer-frame {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    min-height: 500px !important;
    border: none !important;
  }

  .offer-container,
  [class*="offer-wrapper"],
  [class*="offerwall"] {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }
}

/* ============================================================
   LANGUAGE SWITCHER – DARK THEME
   ============================================================ */

div.fixed.bottom-4 > div.bg-white {
  background-color: #111827 !important;
  border-color: #374151 !important;
}

div.fixed.bottom-4 > div > button:hover {
  background-color: #1f2937 !important;
}

div.fixed.bottom-4 span.text-gray-900,
div.fixed.bottom-4 span.font-medium {
  color: #f9fafb !important;
}

div.fixed.bottom-4 svg.text-gray-600 {
  color: #9ca3af !important;
}

div.fixed.bottom-4 > div > div {
  background-color: #111827 !important;
  border-color: #374151 !important;
}

div.fixed.bottom-4 button.w-full {
  color: #f9fafb !important;
}

div.fixed.bottom-4 button.w-full:hover,
div.fixed.bottom-4 button.w-full.bg-gray-100 {
  background-color: #1f2937 !important;
}

div.fixed.bottom-4 input {
  background-color: #1f2937 !important;
  color: #f9fafb !important;
  border-color: #374151 !important;
}

div.fixed.bottom-4 input::placeholder {
  color: #6b7280 !important;
}

/* ============================================================
   OFFER BUTTON GLOW
   ============================================================ */

@keyframes quest-glow {
  0%, 100% { box-shadow: 0 0 4px 1px rgba(34, 197, 94, 0.25), 0 4px 6px -1px rgba(21, 128, 61, 0.2); }
  50%       { box-shadow: 0 0 10px 3px rgba(34, 197, 94, 0.45), 0 4px 6px -1px rgba(21, 128, 61, 0.2); }
}

.quest-button-gradient {
  animation: quest-glow 2.5s ease-in-out infinite !important;
}


/* ── Info (ⓘ) button: keep small, don't let touch-target rules inflate it ── */
.info-btn-trigger {
  min-height: unset !important;
  width: 20px !important;
  height: 20px !important;
  padding: 0 !important;
}

/* ── Tutorial button: hidden on mobile, flex on desktop ─── */
.tutorial-btn {
  display: none !important;
}
@media (min-width: 768px) {
  .tutorial-btn {
    display: flex !important;
  }
}


