.meo-camera-overlay {
  position: fixed;
  inset: 0;
  z-index: 1090;
  box-sizing: border-box;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: 100%;
  height: 100%;
  height: 100dvh;
  margin: 0;
  color: var(--meo-text, var(--main-color, #333));
  background: var(--meo-surface, var(--main-bg-color, #fff));
  overscroll-behavior: contain;
}
.meo-camera-overlay [hidden] { display: none !important; }
.meo-camera-overlay *, .meo-camera-overlay *::before, .meo-camera-overlay *::after { box-sizing: border-box; }
.meo-camera-header {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: calc(58px + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) max(60px, env(safe-area-inset-right, 0px)) 0 max(60px, env(safe-area-inset-left, 0px));
}
.meo-camera-title { margin: 0; font: inherit; font-size: 17px; font-weight: 600; line-height: 1.4; }
.meo-camera-overlay button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; cursor: pointer; }
.meo-camera-overlay button:disabled { cursor: default; opacity: .45; }
.meo-camera-close, .meo-camera-switch, .meo-camera-capture {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: inherit;
  border: 0;
  box-shadow: none;
}
.meo-camera-close {
  position: absolute;
  right: max(12px, env(safe-area-inset-right, 0px));
  bottom: 7px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
}
.meo-camera-close svg, .meo-camera-switch svg { width: 25px; height: 25px; }
.meo-camera-view { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: #000; }
.meo-camera-video, .meo-camera-preview { display: block; width: 100%; height: 100%; margin: 0; object-fit: contain; }
.meo-camera-video.is-front { transform: scaleX(-1); }
.meo-camera-status { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; color: #fff; font-size: 14px; }
.meo-camera-actions {
  display: grid;
  grid-template-columns: 1fr 76px 1fr;
  align-items: center;
  gap: 20px;
  min-height: 112px;
  padding: 18px max(24px, env(safe-area-inset-right, 0px)) max(18px, env(safe-area-inset-bottom, 0px)) max(24px, env(safe-area-inset-left, 0px));
}
.meo-camera-capture { grid-column: 2; justify-self: center; width: 72px; height: 72px; border: 2px solid currentColor; border-radius: 50%; background: transparent; }
.meo-camera-capture svg { width: 64px; height: 64px; fill: currentColor; stroke: none; }
.meo-camera-switch { grid-column: 3; justify-self: start; width: 48px; height: 48px; border-radius: 50%; background: var(--meo-soft, var(--muted-bg-color, #f4f5f7)); }
.meo-camera-overlay[data-phase="preview"] .meo-camera-actions { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.meo-camera-retake, .meo-camera-use { width: 100%; min-height: 46px; margin: 0; font: inherit; font-size: 15px; }
.meo-camera-overlay button:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
@media (min-width: 769px) {
  .meo-camera-actions { padding-left: max(24px, calc((100% - 500px) / 2)); padding-right: max(24px, calc((100% - 500px) / 2)); }
}
@media (max-height: 460px) and (orientation: landscape) {
  .meo-camera-header { min-height: calc(48px + env(safe-area-inset-top, 0px)); }
  .meo-camera-actions { min-height: 80px; padding-top: 8px; padding-bottom: max(8px, env(safe-area-inset-bottom, 0px)); }
  .meo-camera-capture { width: 60px; height: 60px; }
  .meo-camera-capture svg { width: 52px; height: 52px; }
}
