/* Custom styles layered on top of Pinpea's compiled CSS.
   Needed because the app serves pre-compiled CSS (no live Tailwind JIT), so new
   arbitrary utility classes won't exist. Put bespoke styles here instead. */

/* ---- Language switcher trigger (header/footer pill) ---- */
.lang-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 8px;
  border-radius: 9999px;
  border: 1px solid var(--color-line-weak, rgba(47, 47, 47, 0.08));
  background: rgba(255, 255, 255, 0.15);
  font-size: 15px;
  line-height: 20px;
  color: var(--color-content-heavy, #2f3033);
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.lang-trigger:hover {
  opacity: 0.9;
}
.lang-trigger--ghost {
  height: auto;
  padding: 6px 10px;
  background: transparent;
  border-color: rgba(47, 47, 47, 0.12);
}
.lang-trigger-flag {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ---- Language switcher: controlled open/close (no daisyUI focus hack) ---- */
.langdd {
  position: relative;
}
.langdd-menu {
  position: absolute;
  right: 0;
  z-index: 60;
  opacity: 0;
  visibility: hidden;
  pointer-events: none; /* closed menu is fully inert — cannot intercept clicks */
  transform: translateY(-6px);
  transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s;
}
.langdd-menu--bottom {
  top: calc(100% + 8px);
}
.langdd-menu--top {
  bottom: calc(100% + 8px);
}
.langdd.is-open .langdd-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

/* ---- Language switcher dropdown ---- */
.lang-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 268px;
  max-height: 348px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: 15px;
  border: 1px solid var(--color-line-weak, rgba(47, 47, 47, 0.08));
  background: #fff;
  padding: 8px;
  box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.18);
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: rgba(47, 47, 47, 0.25) transparent;
}
.lang-menu::-webkit-scrollbar {
  width: 6px;
}
.lang-menu::-webkit-scrollbar-track {
  background: transparent;
}
.lang-menu::-webkit-scrollbar-thumb {
  background: rgba(47, 47, 47, 0.22);
  border-radius: 9999px;
}
.lang-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(47, 47, 47, 0.38);
}
.lang-row {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  padding: 8px 11px;
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.lang-row:hover {
  background: var(--color-bg-muted, #f6f7f9);
}
.lang-row.is-active {
  background: #ffecec;
}
.lang-flag {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.lang-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 500;
  color: var(--color-content-heavy, #2f3033);
}
.lang-code {
  flex: 0 0 auto;
  font-size: 13px;
  font-weight: 600;
  color: #9aa0ab;
}
.lang-row.is-active .lang-name,
.lang-row.is-active .lang-code {
  color: #ff5650;
}

/* ---- Site footer (multi-column) ---- */
.site-footer { border-top: 1px solid var(--color-line-weak, #e9ebef); background: #fafbfc; }
.site-footer__inner {
  max-width: 1280px; margin: 0 auto; padding: 56px 24px 24px;
  display: grid; grid-template-columns: 1fr; gap: 40px;
}
@media (min-width: 720px) { .site-footer__inner { grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 40px; } }
.site-footer__brand-logo { display: inline-flex; }
.site-footer__brand-logo img { height: 32px; width: 100px; object-fit: contain; }
.site-footer__tagline { margin: 16px 0 20px; max-width: 280px; font-size: 14px; line-height: 1.6; color: #6b7280; }
.site-footer__col h4 { margin: 0 0 16px; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: #9aa0ab; }
.site-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.site-footer__col a { font-size: 15px; color: #3d424c; text-decoration: none; }
.site-footer__col a:hover { color: #ff5650; }
.site-footer__bottom {
  max-width: 1280px; margin: 0 auto; padding: 20px 24px 40px;
  border-top: 1px solid var(--color-line-weak, #e9ebef);
  display: flex; flex-direction: column; gap: 10px; align-items: center; text-align: center;
}
@media (min-width: 720px) { .site-footer__bottom { flex-direction: row; justify-content: space-between; text-align: left; } }
.site-footer__copy { font-size: 13px; color: #8d95a5; }
.site-footer__disclaimer { font-size: 12px; color: #a2a8b4; max-width: 640px; }

/* ---- Header responsive switch (hamburger on tablet, full nav on desktop) ---- */
.hdr-mobile { display: flex; }
.hdr-desktop { display: none; }
.hdr-spacer { height: 56px; }
@media (min-width: 1024px) {
  .hdr-mobile { display: none; }
  .hdr-desktop { display: flex; padding-left: 40px; padding-right: 40px; }
  .hdr-spacer { height: 64px; }
}

/* ---- SeePins brand logo ---- */
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand__img { display: block; height: 30px; width: auto; }
@media (min-width: 1024px) { .brand__img { height: 32px; } }

/* ---- "Recently searched" dropdown on the downloader input ---- */
.recents-dd {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 40;
  background: #fff; border: 1px solid var(--color-line-weak, #eee); border-radius: 16px;
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.18); padding: 6px; overflow: hidden;
}
/* Show recent-searches only on desktop — hidden on mobile & tablet. */
@media (max-width: 1023px) { .recents-dd { display: none !important; } }
.recents-dd__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--color-content-medium, #888);
}
.recents-dd__clear {
  border: none; background: none; cursor: pointer; font-size: 12px; font-weight: 600;
  text-transform: none; letter-spacing: normal; color: #ff5650; padding: 2px 4px; border-radius: 6px;
}
.recents-dd__clear:hover { background: #ffecec; }
.recents-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px;
  cursor: pointer; color: var(--color-content-heavy, #2f2f2f);
}
.recents-row:hover { background: var(--color-bg-soft, #f7f7f7); }
.recents-row__clock { width: 17px; height: 17px; flex: none; color: var(--color-content-medium, #999); }
.recents-row__url { flex: 1 1 auto; min-width: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recents-row__x {
  flex: none; width: 22px; height: 22px; border: none; border-radius: 9999px; background: none;
  color: var(--color-content-medium, #aaa); font-size: 12px; cursor: pointer; line-height: 1;
}
.recents-row__x:hover { background: #ffecec; color: #ff5650; }

/* ---- Result image/video preview box (edit `height` to resize the preview) ---- */
.media-preview {
  width: 100%;
  height: 300px;            /* <-- specific preview height; change this value */
  overflow: hidden;
  background: #f3f3f3;
  border-radius: 14px;      /* rounds all four corners of the preview box */
}
.media-preview__media { display: block; width: 100%; height: 100%; object-fit: cover; }
.media-preview__media--contain { object-fit: contain; background: #000; }

/* ---- Download modal (desktop) / drawer (mobile) ---- */
.dl-modal-backdrop {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(15, 15, 20, 0.55);
  animation: dl-fade 0.18s ease;
}
@media (min-width: 768px) { .dl-modal-backdrop { align-items: center; padding: 16px; } }
@keyframes dl-fade { from { opacity: 0; } to { opacity: 1; } }

.dl-modal {
  position: relative; display: flex; flex-direction: column; width: 100%;
  max-height: 90vh; overflow: hidden; background: #f3f4f5;
  border-radius: 28px 28px 0 0;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  animation: dl-slide-up 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}
@media (min-width: 768px) {
  .dl-modal {
    max-width: min(1100px, calc(100vw - 2rem)); max-height: min(90vh, 880px);
    border-radius: 16px; animation: dl-pop 0.18s ease;
  }
}
@keyframes dl-slide-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes dl-pop { from { opacity: 0; transform: scale(0.98); } to { opacity: 1; transform: none; } }

.dl-modal__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  flex: none; background: #fff; padding: 10px 12px;
}
@media (min-width: 768px) { .dl-modal__head { padding: 12px 16px 12px 28px; } }
.dl-modal__title { display: none; font-size: 18px; font-weight: 700; color: var(--color-content-heavy, #2f2f2f); }
.dl-modal__actions { display: flex; align-items: center; gap: 6px; flex: 1 1 auto; justify-content: space-between; }
@media (min-width: 768px) {
  .dl-modal__title { display: block; }
  .dl-modal__actions { flex: none; justify-content: flex-end; gap: 12px; }
}
.dl-modal__all {
  display: inline-flex; align-items: center; gap: 8px; border: none; background: none; cursor: pointer;
  padding: 8px 12px; border-radius: 9999px; font-size: 15px; font-weight: 600; color: #ff5650;
  transition: background 0.15s;
}
.dl-modal__all:hover { background: #ffe8e7; }
.dl-modal__all svg { width: 20px; height: 20px; }
.dl-modal__close {
  display: inline-flex; align-items: center; justify-content: center; border: none; background: none;
  width: 40px; height: 40px; border-radius: 9999px; cursor: pointer; color: var(--color-content-heavy, #2f2f2f);
  transition: background 0.15s;
}
.dl-modal__close:hover { background: #f0f0f0; }
.dl-modal__close svg { width: 24px; height: 24px; }

.dl-modal__body { min-height: 0; flex: 1 1 auto; overflow-y: auto; padding: 16px 12px; }
@media (min-width: 768px) { .dl-modal__body { padding: 24px; } }
.dl-modal__grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 640px) { .dl-modal__grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .dl-modal__grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1280px) { .dl-modal__grid { grid-template-columns: repeat(4, 1fr); } }

/* Mobile: horizontal card — square thumb on the left, content on the right. */
.dl-card {
  display: flex; flex-direction: row; align-items: stretch; width: 100%; height: 118px;
  background: #fff; border-radius: 16px; overflow: hidden;
}
.dl-card__thumb { position: relative; width: 118px; height: 118px; flex: none; overflow: hidden; background: #ebebeb; }
.dl-card__media { width: 100%; height: 100%; object-fit: cover; display: block; }
.dl-card__media--contain { object-fit: contain; background: #000; }
.dl-card__foot {
  flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center;
  gap: 12px; padding: 10px 16px;
}
.dl-card__type {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding-bottom: 10px; border-bottom: 1px solid var(--color-line-weak, #e8ebf3);
  font-size: 14px; font-weight: 700; color: var(--color-content-heavy, #2f2f2f);
}
.dl-card__type svg { width: 18px; height: 18px; }
/* Desktop: vertical card — thumb on top, content below. */
@media (min-width: 768px) {
  .dl-card { flex-direction: column; height: auto; max-width: 340px; margin: 0 auto; }
  .dl-card__thumb { width: 100%; height: auto; aspect-ratio: 1 / 1; }
  .dl-card__foot { justify-content: flex-start; gap: 14px; padding: 12px 10px 16px; }
}
/* ---- Cookie consent bar ---- */
.cookie-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.97); backdrop-filter: blur(8px);
  border-top: 1px solid rgba(47, 47, 47, 0.1);
  box-shadow: 0 -8px 30px -12px rgba(0, 0, 0, 0.18);
}
.cookie-consent__inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; flex-direction: column; gap: 12px; align-items: stretch;
}
.cookie-consent__text { font-size: 14px; line-height: 20px; color: #4f4f4f; margin: 0; }
.cookie-consent__text a { color: #ff5650; font-weight: 600; text-decoration: underline; }
.cookie-consent__actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.cookie-consent__btn {
  height: 40px; padding: 0 18px; border-radius: 9999px; border: 0;
  font-size: 14px; font-weight: 700; font-family: inherit; cursor: pointer;
  -webkit-appearance: none; appearance: none; transition: opacity 0.15s;
}
.cookie-consent__btn:hover { opacity: 0.9; }
.cookie-consent__btn--solid { background: #ff5650; color: #fff; }
.cookie-consent__btn--ghost { background: #f2f2f2; color: #2f3033; }
@media (min-width: 720px) {
  .cookie-consent__inner { flex-direction: row; align-items: center; justify-content: space-between; }
  .cookie-consent__actions { flex-shrink: 0; }
}

.dl-card__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px; border: 0; border-radius: 9999px; text-decoration: none;
  background: #ffe8e7; color: #d93f3a; font-size: 16px; font-weight: 700;
  font-family: inherit; cursor: pointer; -webkit-appearance: none; appearance: none;
  transition: opacity 0.15s;
}
.dl-card__btn:hover { opacity: 0.9; }
.dl-card__btn:disabled { cursor: default; opacity: 0.85; }
.dl-card__btn svg { width: 20px; height: 20px; }
