/* アプリ(ホーム画面に追加)として開いたときの見え方。
 * ブラウザで開いた場合も同じタブバーを出す(操作が変わらない方が迷わない)。
 */

/* iPhoneのノッチ・ホームインジケータを避ける */
.sacct-head { padding-top: env(safe-area-inset-top); }
.sacct-main,
.sacct-foot {
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
}

/* タブバーの高さぶん、本文の下に余白を作る */
.sacct-body { padding-bottom: calc(58px + env(safe-area-inset-bottom)); }

.sacct-tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  display: flex;
  background: var(--surface-1, #fcfcfb);
  border-top: 1px solid var(--border, #dcdbd5);
  padding-bottom: env(safe-area-inset-bottom);
  /* 端末のぼかしが効く環境では下地を透かす */
  backdrop-filter: saturate(1.4) blur(12px);
}

.sacct-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  padding: 8px 4px 6px;
  min-height: 50px;
  color: var(--text-muted, #7c7b75);
  text-decoration: none;
  font-size: 11px;
  line-height: 1;
  -webkit-tap-highlight-color: transparent;
}

.sacct-tab svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.sacct-tab.is-on { color: var(--accent, #2a78d6); }
.sacct-tab:active { opacity: .6; }

/* 画面が広いときはタブバーを出さない(上部のボタンで足りる) */
@media (min-width: 820px) {
  .sacct-tabbar { display: none; }
  .sacct-body { padding-bottom: 0; }
}

/* アプリとして起動したときは、ブラウザに戻る導線が無いので上部のボタンを整理する */
@media (display-mode: standalone) {
  .sacct-head-actions .sacct-btn[href*="wp-admin"] { display: none; }
}
