:root {
  --yammak-safe-top: env(safe-area-inset-top, 0px);
  --yammak-safe-right: env(safe-area-inset-right, 0px);
  --yammak-safe-bottom: env(safe-area-inset-bottom, 0px);
  --yammak-safe-left: env(safe-area-inset-left, 0px);
}

html.yammak-native-app {
  min-height: 100%;
  background: #f4f8f5;
  overscroll-behavior-y: none;
}

html.yammak-native-app body {
  min-height: 100%;
  padding-top: var(--yammak-safe-top);
  padding-right: var(--yammak-safe-right);
  padding-bottom: var(--yammak-safe-bottom);
  padding-left: var(--yammak-safe-left);
  -webkit-tap-highlight-color: transparent;
}

html.yammak-native-app .market-header,
html.yammak-native-app .topbar {
  scroll-margin-top: var(--yammak-safe-top);
}

html.yammak-native-app dialog,
html.yammak-native-app .modal,
html.yammak-native-app [role="dialog"] {
  max-height: calc(100dvh - var(--yammak-safe-top) - var(--yammak-safe-bottom) - 24px);
}

html.yammak-native-app input,
html.yammak-native-app textarea,
html.yammak-native-app select {
  scroll-margin-bottom: calc(var(--yammak-safe-bottom) + 96px);
}

.yammak-native-photo-button,
.yammak-native-location-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  margin: .45rem 0;
  border: 1px solid #b78a3c;
  border-radius: 12px;
  padding: .65rem .9rem;
  background: #fff8ea;
  color: #143f33;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.yammak-native-photo-button[disabled],
.yammak-native-location-button[disabled] { opacity: .55; cursor: wait; }

.yammak-native-location-status { display: block; margin-top: .25rem; color: #536b62; font-size: .84rem; }

.yammak-native-toast {
  position: fixed;
  z-index: 100000;
  right: 50%;
  bottom: calc(18px + var(--yammak-safe-bottom));
  transform: translateX(50%);
  border-radius: 999px;
  padding: .7rem 1rem;
  background: rgba(20,63,51,.94);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 8px 26px rgba(0,0,0,.24);
}

@supports (height: 100dvh) {
  html.yammak-native-app body { min-height: 100dvh; }
}
