/* Consolidated mobile WebView compatibility stylesheet for NeochicKids.
   Legacy captured theme CSS is replaced by HSL variables controlled by .dark. */
:root {
  --legacy-page-bg: 0 0% 100%;
  --legacy-text: 0 0% 4%;
  --legacy-card: 0 0% 100%;
  --legacy-border: 0 0% 4%;
  --divi-primary: 320 100% 56%;
  --divi-secondary: 186 100% 50%;
  --divi-accent: 84 100% 50%;
  --divi-danger: 348 100% 50%;
  --divi-orange: 22 100% 50%;
  --divi-violet: 258 90% 66%;
}

.dark {
  --legacy-page-bg: 0 0% 7%;
  --legacy-text: 0 0% 98%;
  --legacy-card: 0 0% 10%;
  --legacy-border: 0 0% 98%;
  --divi-primary: 320 100% 64%;
  --divi-secondary: 186 100% 56%;
  --divi-accent: 84 100% 58%;
  --divi-danger: 348 100% 62%;
  --divi-orange: 22 100% 58%;
  --divi-violet: 258 90% 74%;
}

body,
.woocommerce,
.et-db,
.et_pb_section {
  background-color: hsl(var(--legacy-page-bg));
  color: hsl(var(--legacy-text));
}

.woocommerce select,
select {
  min-height: 44px;
  border: 2px solid hsl(var(--legacy-border));
  background: hsl(var(--legacy-card));
  color: hsl(var(--legacy-text));
}

.et_pb_button,
.woocommerce button,
.woocommerce a.button {
  background-color: hsl(var(--divi-primary));
  border-color: hsl(var(--legacy-border));
  color: hsl(var(--legacy-text));
}

.mobile-select-action-sheet {
  position: fixed;
  inset: 0;
  z-index: 100000;
}

.mobile-select-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  min-height: 100%;
  border: 0;
  background: rgba(0, 0, 0, 0.45);
}

.mobile-select-panel {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  max-height: 72vh;
  overflow-y: auto;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom));
  border: 4px solid hsl(var(--legacy-border));
  border-bottom: 0;
  border-radius: 28px 28px 0 0;
  background: hsl(var(--legacy-card));
  color: hsl(var(--legacy-text));
  box-shadow: 0 -6px 0 hsl(var(--legacy-border));
}

.mobile-select-handle {
  width: 64px;
  height: 6px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: hsl(var(--legacy-border) / 0.25);
}

.mobile-select-panel h3 {
  margin: 0 0 14px;
  font: 900 18px/1.2 Inter, sans-serif;
}

.mobile-select-options {
  display: grid;
  gap: 8px;
}

.mobile-select-option {
  min-height: 44px;
  padding: 12px 14px;
  border: 2px solid hsl(var(--legacy-border));
  border-radius: 16px;
  background: hsl(var(--legacy-card));
  color: hsl(var(--legacy-text));
  font: 800 14px/1.2 Inter, sans-serif;
  text-align: left;
  box-shadow: 3px 3px 0 hsl(var(--legacy-border));
}

.mobile-select-option.is-selected {
  background: hsl(var(--divi-secondary));
  color: #000;
}

html,
body {
  overscroll-behavior: none;
  -webkit-overflow-scrolling: touch;
}

button,
a,
[role='button'],
[role='menuitem'],
header,
nav {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

button,
a,
[role='button'],
[role='menuitem'] {
  min-height: 44px;
  touch-action: manipulation;
}
