/* Clipnesia — Editorial White + Coral Pop theme (Desktop & Mobile Responsive) */

html {
  -webkit-tap-highlight-color: transparent;
}

body {
  overflow-x: clip;
  background-color: #F8F9FB;
  color: #0F172A;
}

body.modal-open {
  overflow: hidden;
}

button,
a,
label,
summary {
  touch-action: manipulation;
}

/* Prevent iOS Safari zoom on input focus while preserving desktop compact sizing */
@media (max-width: 639px) {
  input[type="text"],
  input[type="number"],
  input[type="search"],
  textarea,
  select {
    font-size: 16px !important;
  }
}

::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}

::-webkit-scrollbar-track {
  background: #F1F5F9;
}

::-webkit-scrollbar-thumb {
  background: #CBD5E1;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94A3B8;
}

.aspect-9-16 {
  aspect-ratio: 9 / 16;
}

.checkerboard-light {
  background-color: #F8FAFC;
  background-image:
    linear-gradient(45deg, #E2E8F0 25%, transparent 25%),
    linear-gradient(-45deg, #E2E8F0 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #E2E8F0 75%),
    linear-gradient(-45deg, transparent 75%, #E2E8F0 75%);
  background-size: 12px 12px;
  background-position: 0 0, 0 6px, 6px -6px, -6px 0;
}

.caption-stroke {
  text-shadow:
    -1.5px -1.5px 0 #000,
     1.5px -1.5px 0 #000,
    -1.5px  1.5px 0 #000,
     1.5px  1.5px 0 #000,
     0 2px 6px rgba(0, 0, 0, 0.75);
}

.toggle-checkbox:checked + .toggle-track {
  background-color: #F97316;
}

.toggle-checkbox:checked + .toggle-track .toggle-knob {
  transform: translateX(16px);
}

.safe-area-bottom {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Sticky mobile/tablet CTA bar positioned flush above #mobile-nav on phones and at bottom on tablets */
.mobile-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(59px + env(safe-area-inset-bottom));
  z-index: 30;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, 0.06);
  padding: 0.625rem 1rem;
}

@media (min-width: 768px) {
  .mobile-sticky-cta {
    bottom: 0;
    padding: 0.75rem 1.5rem max(0.75rem, env(safe-area-inset-bottom));
  }
}

@media (min-width: 1024px) {
  .mobile-sticky-cta {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-top: 0;
    box-shadow: none;
    padding: 0;
  }
}
