/*
 * DPRO GREEN OWNER SIDEBAR SCROLL FIX R1
 * Base owner.css: pinned commit 359d08926bbd8eaf64fd4da6f1d1cbed417ce488
 *
 * 左メニューを
 *  - ブランド: 上部固定
 *  - メニュー一覧: 独立スクロール
 *  - 補助リンク・ログアウト: 下部固定
 * に分け、画面高が低いPCやスマートフォンでも全項目へ到達できるようにします。
 */

@import url("https://cdn.jsdelivr.net/gh/dpromstk2000-lab/dpro-green-rental-line@359d08926bbd8eaf64fd4da6f1d1cbed417ce488/owner.css");

/* サイドバー全体を必ず表示領域内へ収める */
.owner-sidebar {
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  overscroll-behavior: contain;
}

/* ロゴ部分は縮めない */
.owner-side-brand {
  flex: 0 0 auto;
}

/*
 * メニュー一覧だけをスクロール可能にする。
 * min-height:0 がないと、flex子要素が内容高まで縮まず、
 * サイドバー外へ押し出されるため必須。
 */
.owner-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  padding-right: 8px;
  margin-right: -8px;
  padding-bottom: 12px;
}

/* メニュー項目を読みやすく保つ */
.owner-nav button {
  flex: 0 0 auto;
  min-height: 46px;
}

/* スクロール位置が分かる、控えめで見やすいバー */
.owner-nav {
  scrollbar-width: auto;
  scrollbar-color: rgba(255,255,255,.62) rgba(255,255,255,.10);
}

.owner-nav::-webkit-scrollbar {
  width: 10px;
}

.owner-nav::-webkit-scrollbar-track {
  border-radius: 999px;
  background: rgba(255,255,255,.10);
}

.owner-nav::-webkit-scrollbar-thumb {
  min-height: 42px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: rgba(255,255,255,.62);
  background-clip: padding-box;
}

.owner-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(255,255,255,.84);
  background-clip: padding-box;
}

/* 下部リンクは常に操作できる位置に残す */
.owner-side-bottom {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  margin-top: 0;
  padding-top: 14px;
  padding-bottom: max(2px, env(safe-area-inset-bottom));
  background: var(--green-950);
  box-shadow: 0 -14px 24px rgba(8,32,23,.22);
}

.owner-side-bottom a,
.owner-side-bottom button {
  min-height: 42px;
  display: flex;
  align-items: center;
  opacity: 1;
}

/* 狭い画面で開くドロワーメニューにも同じ高さ制御を適用 */
@media (max-width: 1100px) {
  .owner-sidebar {
    top: 0;
    bottom: 0;
    height: 100dvh;
    max-height: 100dvh;
  }
}

/* 高さが特に低いPCでは余白を少し圧縮 */
@media (max-height: 760px) and (min-width: 1101px) {
  .owner-sidebar {
    padding-top: 14px;
    padding-bottom: 12px;
  }

  .owner-side-brand {
    padding-bottom: 13px;
  }

  .owner-nav {
    margin-top: 12px;
    gap: 3px;
  }

  .owner-nav button {
    min-height: 42px;
    padding-top: 9px;
    padding-bottom: 9px;
  }

  .owner-side-bottom {
    padding-top: 9px;
  }

  .owner-side-bottom a,
  .owner-side-bottom button {
    min-height: 36px;
    padding-top: 7px;
    padding-bottom: 7px;
  }
}
