/* MAPLE_IOS_SAFE_AREA_V1: device insets plus Telegram content controls. */
:root {
  --maple-device-top: var(--tg-safe-area-inset-top, env(safe-area-inset-top, 0px));
  --maple-device-bottom: var(--tg-safe-area-inset-bottom, env(safe-area-inset-bottom, 0px));
  --maple-device-left: var(--tg-safe-area-inset-left, env(safe-area-inset-left, 0px));
  --maple-device-right: var(--tg-safe-area-inset-right, env(safe-area-inset-right, 0px));
  --maple-content-top: var(--tg-content-safe-area-inset-top, 0px);
  --maple-content-bottom: var(--tg-content-safe-area-inset-bottom, 0px);
  --maple-content-left: var(--tg-content-safe-area-inset-left, 0px);
  --maple-content-right: var(--tg-content-safe-area-inset-right, 0px);
  --maple-safe-top: calc(var(--maple-device-top) + var(--maple-content-top) + 12px);
  --maple-safe-bottom: calc(var(--maple-device-bottom) + var(--maple-content-bottom));
  --maple-safe-left: calc(var(--maple-device-left) + var(--maple-content-left));
  --maple-safe-right: calc(var(--maple-device-right) + var(--maple-content-right));
}
body {padding-top:var(--maple-safe-top);padding-left:var(--maple-safe-left);padding-right:var(--maple-safe-right);}
body .modal, body .gift-show-modal {
  top:var(--maple-safe-top) !important;
  bottom:var(--maple-safe-bottom) !important;
  left:var(--maple-safe-left) !important;
  right:var(--maple-safe-right) !important;
}
body .modal .detail-sheet, body .modal .bottom-sheet, body .modal .media-preview-sheet {
  max-height:100% !important;
}
body .modal .detail-sheet > .close-btn,
body .modal .bottom-sheet > .close-btn,
body #reportListModal .close-btn,
body #reportDetailModal .close-btn,
body #reportModal .close-btn,
body .modal .media-preview-sheet > .close-btn {
  top:10px !important;
  min-width:44px !important;
  min-height:44px !important;
}
