/* ================================================================
   マイページ共通シェル（上部バー＋サイドバー＋スマホ用ボトムナビ）

   デザイン元: IMP修正\aiimport-test\mypage\style.css
   include/mypage.php の show_bodyhead() / show_bodyfoot() が出力する。

   既存の style.css / style_mypage.css の後に読み込み、旧レイアウト
   （#container / #header / #side など）を打ち消して新レイアウトを敷く。
   ================================================================ */
:root{
	--sh-blue:#185FA5; --sh-blue2:#0C447C; --sh-line:#e3e3e0; --sh-gray:#f4f4f1;
	--sh-tx:#222; --sh-muted:#777; --sh-danger:#C0392B;
	--sh-side:248px; --sh-topbar:54px;
}

body{
	margin:0; background:#fafaf8; color:var(--sh-tx);
	font-family:"Segoe UI","Hiragino Kaku Gothic ProN","Meiryo",sans-serif;
}
.sh a{ color:inherit; text-decoration:none; }

/* ---- 上部バー ---- */
.sh-topbar{
	position:sticky; top:0; z-index:40; height:var(--sh-topbar);
	display:flex; align-items:center; gap:10px; padding:0 14px;
	background:#fff; border-bottom:1px solid var(--sh-line);
	box-sizing:border-box; /* 下線込みで高さを --sh-topbar ちょうどにする（左メニューの sticky 位置とずれないように） */
}
.sh-ham{ display:none; border:none; background:none; font-size:22px; cursor:pointer; padding:4px 6px; }
.sh-brand img{ height:36px; display:block; }
.sh-tbright{ margin-left:auto; display:flex; align-items:center; gap:10px; }
.sh-tbright select{
	border:1px solid var(--sh-line); background:#fff; border-radius:8px;
	padding:6px 10px; font-size:12px; cursor:pointer;
}
.sh-avatar{
	width:30px; height:30px; border-radius:50%; background:#e6f1fb; color:var(--sh-blue2);
	display:flex; align-items:center; justify-content:center; font-size:12px; font-weight:600;
}

/* ---- 全体レイアウト ---- */
.sh-body{ display:flex; align-items:flex-start; }
/* サイドバーはHTML上ではmainの後に出力しているので、表示順だけ入れ替える */
.sh-sidebar{ order:-1; }
.sh-main{ flex:1; min-width:0; padding:16px; }
.sh-main #main_inner{ max-width:1100px; margin:0 auto; }

/* ---- サイドバー ---- */
.sh-sidebar{
	/* 枠込みの幅・高さで指定（高さが画面からはみ出すとスクロールで動くため）。幅は従来の見た目と同じ */
	box-sizing:border-box; width:calc(var(--sh-side) + 29px); flex:0 0 calc(var(--sh-side) + 29px); padding:14px;
	border-right:1px solid var(--sh-line); background:#fff;
	position:sticky; top:var(--sh-topbar);
	height:calc(100vh - var(--sh-topbar)); overflow:auto;
}
.sh-cust{ border:1px solid var(--sh-line); border-radius:10px; padding:10px 12px; margin-bottom:12px; }
.sh-cust .nm{ font-weight:600; font-size:13px; }
.sh-cust .meta{ font-size:11px; color:var(--sh-muted); line-height:1.55; margin-top:3px; }
.sh-cust .more{ display:none; }
.sh-cust.open .more{ display:block; }
.sh-cust .toggle{ font-size:11px; color:var(--sh-blue); cursor:pointer; margin-top:6px; display:inline-block; }

/* 倉庫内の重量。押せる要素ではないので、下の操作ボタンとは見た目を分ける
   （枠線を消して背景だけにし、文字も小さくする） */
/* 倉庫内の重量。押せる要素ではないので操作ボタンとは見た目を分ける。
   アイコンの右に「重量」「倉庫内n件」を2行で置く */
/* 倉庫内の重量。押せる要素ではないので操作ボタンとは見た目を分ける。
   左の余白を詰めて、アイコンと文字を左端に寄せている */
/* 倉庫内の重量。押せる要素ではないので操作ボタンとは見た目を分ける。
   この画像は周囲に透明な余白を持っているので、隙間を詰めて左に寄せる */
/* 倉庫内の重量。デモに合わせて [はかり] 85.1 lbs (倉庫内 80件) の形。
   画像は余白を切り落としたものを使っているので、間隔は素直に効く */
.sh-wt{
	display:flex; align-items:center; gap:7px; padding:8px 10px; margin-bottom:12px;
	border:none; border-radius:8px; background:var(--sh-gray);
}
.sh-wt img{ width:20px; height:22px; object-fit:contain; }
.sh-wt .val{ font-weight:700; font-size:14px; color:var(--sh-blue2); }
.sh-wt .pc{ font-size:11px; color:var(--sh-muted); }

.sh-acts{ display:flex; flex-direction:column; gap:8px; margin-bottom:14px; }
.sh-acts a, .sh-acts span{
	display:flex; align-items:center; justify-content:flex-start; gap:8px;
	height:40px; padding:0 12px; border-radius:9px; font-size:13px; font-weight:500;
	background:#fff; color:var(--sh-blue2); border:1px solid var(--sh-blue);
}
.sh-acts span{ color:#aaa; border-color:var(--sh-line); cursor:not-allowed; }
.sh-acts a:hover{ background:#f2f7fc; }

.sh-navhead{ font-size:11px; color:var(--sh-muted); margin:12px 4px 6px; }
.sh-nav{
	display:flex; align-items:center; gap:10px; padding:9px 10px;
	border-radius:9px; font-size:13px; color:#333;
}
.sh-nav:hover{ background:var(--sh-gray); }
.sh-nav.active{ background:#e9f1fb; color:var(--sh-blue2); font-weight:600; }
.sh-nav .ic{ width:20px; text-align:center; display:flex; align-items:center; }
.sh-nav .ic img{ width:20px; height:20px; object-fit:contain; }
.sh-nav .lb{ flex:1; }
.sh-nav .count{
	font-size:11px; color:var(--sh-muted); background:var(--sh-gray);
	border-radius:999px; padding:1px 8px; min-width:22px; text-align:center;
}
.sh-nav.active .count{ background:#cfe0f3; color:var(--sh-blue2); }
.sh-nav .badge{
	font-size:11px; color:#fff; background:var(--sh-danger);
	border-radius:999px; padding:1px 7px; font-weight:600;
}
.sh-hr{ height:1px; background:var(--sh-line); margin:12px 0; }

/* ---- スマホ ---- */
.sh-scrim{ display:none; }
.sh-bottomnav{ display:none; }
@media(max-width:900px){
	.sh-ham{ display:block; }
	.sh-sidebar{
		position:fixed; left:0; top:var(--sh-topbar); z-index:50;
		height:calc(100vh - var(--sh-topbar));
		transform:translateX(-100%); transition:transform .2s;
	}
	.sh-sidebar.open{ transform:translateX(0); }
	.sh-scrim.show{
		display:block; position:fixed; inset:var(--sh-topbar) 0 0 0;
		background:rgba(0,0,0,.35); z-index:45;
	}
	.sh-main{ padding:12px; padding-bottom:70px; }
	.sh-bottomnav{
		display:flex; position:fixed; left:0; right:0; bottom:0; z-index:60;
		background:#fff; border-top:1px solid var(--sh-line);
	}
	.sh-bottomnav a{
		flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
		gap:2px; height:56px; font-size:11px; color:#555; position:relative;
	}
	.sh-bottomnav a.active{ color:var(--sh-blue2); font-weight:600; }
	.sh-bottomnav a img{ width:22px; height:22px; object-fit:contain; }
	.sh-bottomnav .bdot{
		position:absolute; top:8px; right:calc(50% - 16px);
		width:8px; height:8px; border-radius:50%; background:var(--sh-danger);
	}
}

/* ---- 旧レイアウトの打ち消し ---- */
#header_wrap, #header, #side, #togglemenu, #header_menubtn{ display:none !important; }
#container, #inner, #main{ display:block; width:auto; margin:0; padding:0; float:none; }

/* 言語切り替え。プルダウンをやめてクリック1回のボタンにした */
.sh-lang{
	display:inline-flex; align-items:center; gap:6px;
	height:34px; padding:0 12px; border-radius:999px;
	border:1px solid var(--sh-line); background:#fff;
	font-size:13px; color:var(--sh-tx); text-decoration:none; cursor:pointer;
}
.sh-lang:hover{ border-color:var(--sh-blue); color:var(--sh-blue2); background:#f2f7fc; }
.sh-lang img{ width:16px; height:16px; object-fit:contain; margin:0; }

/* 共通の img{margin:0 auto} を打ち消す。
   flex の中では auto マージンが余白を全部吸ってしまい、
   アイコンが中央へ寄って文字が離れる */
.sh-topbar img, .sh-sidebar img, .sh-bottomnav img, .sh-wt img{ margin:0; }
.sh-wt{ justify-content:flex-start; }

/* ログイン前の「日本語｜English」トグル（本番 2026-11-15 と同じ見た目） */
.sh-langsw{ display:flex; border:1px solid #d5dbe3; border-radius:16px; overflow:hidden; background:#fff; font-size:12px; line-height:1; }
.sh-langsw a{ display:block; padding:7px 12px; color:#555; text-decoration:none; }
.sh-langsw a:hover{ background:#f1f4f8; }
.sh-langsw a.on{ background:var(--sh-blue); color:#fff; font-weight:700; pointer-events:none; }

/* サイドバーの倉庫切り替え（本番の倉庫切り替えを新デザインに載せたもの） */
.sh-whsel{ display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.sh-whsel img{ width:28px; height:auto; margin:0; border-radius:3px; }
.sh-whsel select{ flex:1; min-width:0; height:32px; border:1px solid var(--sh-line); border-radius:8px; padding:0 8px; font-size:13px; background:#fff; }

/* ---- ポップアップの外枠をデモに合わせる ------------------------------
   colorbox の枠は画像の角丸＋独自ボタン。デモは角丸の白い板だけなので、
   飾りの枠と「別窓で開く」ボタンを消し、閉じるは控えめな×にする。 */
#cboxTopLeft, #cboxTopRight, #cboxBottomLeft, #cboxBottomRight,
#cboxMiddleLeft, #cboxMiddleRight, #cboxTopCenter, #cboxBottomCenter{
	display:none !important;
}
#cboxNewwindow{ display:none !important; }
#cboxContent{ border-radius:12px; box-shadow:0 10px 40px rgba(0,0,0,.18); }
/* 影が外側の入れ物（overflow:hidden）で切れて帯に見えるので、はみ出しを許す */
#colorbox, #cboxWrapper{ overflow:visible !important; }
#cboxLoadedContent{ border-radius:12px; }
#cboxClose{
	top:10px; right:10px; width:26px; height:26px;
	background:none; border-radius:6px; opacity:.55;
	text-indent:0; font-size:0; color:transparent;
}
#cboxClose:before{
	content:"×"; display:block; font-size:20px; line-height:26px;
	text-align:center; color:#555;
}
#cboxClose:hover{ background:#f0f0ee; opacity:1; }

/* 2026-11-21 ×にカーソルを置くと再描画で角丸が消える（中の iframe の四角い角が出る）ので、枠で切り抜く */
#cboxContent{ overflow:hidden !important; }
#cboxLoadedContent, #cboxLoadedContent .cboxIframe{ border-radius:12px; overflow:hidden; }
