
/* 計算機ヘッダ部分 */
#OBJID_CALCULAATOR_HEADER {
	display: flex;
	justify-content: start;
	align-items: start;
	margin: 0 0 1em;
}

/* フローティングメニュー */
#OBJID_DIV_FLOATING_MENU {
	z-index: 5;
}

/* 展開式設定欄共通（新形式） */

/* ブロック大枠 */
.folding-block-MIG {
	width: max-content;
	border: 3px double black;
	background-color: #ddddff;
	line-height: 1.5;
}

/* 展開操作ラベル */
.folding-switch-MIG ~ label {
	display: inline-block;
	margin-right: 0.5em;
	padding: 0.125em;
}

/* 説明ページリンク */
.folding-switch-MIG ~ .folding-link-help-MIG {
	display: inline-block;
	margin: 0 0.5em;
	padding: 0.125em;
}

/* ブロック本体 */
.folding-switch-MIG:checked ~ .folding-block-body-MIG {
	padding: 0.5em;
	display: grid;
	row-gap: 0.5em;
}
.folding-switch-MIG:not(:checked) ~ .folding-block-body-MIG {
	display: none;
}
body:not([class="CLS_BODY_ALTERNATIVE"]) .folding-block-body-MIG {
	background-color : #dddddd;
}
body[class="CLS_BODY_ALTERNATIVE"] .folding-block-body-MIG {
	background-color : #ffffff;
}
.folding-block-body-MIG {
	border-top: 1px solid black;
}

/* ブロック内ボタン共通 */
.folding-block-body-MIG button {
	padding: 0.125em 1em;
	margin: 0 1em;
}


/* =======================================================
セーブ操作ブロック
======================================================= */

/* ブロック大枠 */
#OBJID_SAVE_BLOCK_MIG {
	margin-right: 1em;
}

/* 入力欄系 */
#OBJID_SELECT_SAVE_DATA_MIG {
	grid-row: 1;
	grid-column: 1 / 3;	/* 1列目から3列目までの2列を占有 */
}
#OBJID_INPUT_SAVE_NAME_MIG {
	grid-row: 2;
	grid-column: 1 / 3;	/* 1列目から3列目までの2列を占有 */
	line-height: 1.5;
}
/* セーブデータ操作ボタン系 */
#OBJID_BUTTON_LOAD_SAVE_DATA_MIG {
	grid-row: 1;
	grid-column: 3;	/* 3列目に配置 */
}
#OBJID_BUTTON_SAVE_SAVE_DATA_MIG {
	grid-row: 1;
	grid-column: 4;	/* 4列目に配置 */
}
#OBJID_BUTTON_IMAGE_SAVE_DATA_MIG {
	grid-row: 2;
	grid-column: 3;	/* 3列目に配置 */
}
#OBJID_BUTTON_DEBUG_SAVE_DATA_MIG {
	grid-row: 2;
	grid-column: 4 / span 2;	/* 4列目から2列分を占有 */
}
#OBJID_BUTTON_DELETE_SAVE_DATA_MIG {
	grid-row: 1;
	grid-column: 5;	/* 5列目に配置 */
}
/* URL出力系 */
#OBJID_BUTTON_URL_OUT_MIG {
	grid-row: 3;
	grid-column: 1;
}
#OBJID_INPUT_URL_OUT_MIG {
	grid-row: 3;
	grid-column: 2 / 5;	/* 2列目から4列分を占有 */
}
#OBJID_BUTTON_COPY_URL_OUT_MIG {
	grid-row: 3;
	grid-column: 5;
}
/* URL入力系 */
#OBJID_BUTTON_URL_IN_MIG {
	grid-row: 4;
	grid-column: 1;
}
#OBJID_INPUT_URL_IN_MIG {
	grid-row: 4;
	grid-column: 2 / 5;
}
#OBJID_BUTTON_CLEAR_URL_IN_MIG {
	grid-row: 4;
	grid-column: 5;
}
/* データ一括処理系 */
#OBJID_BUTTON_EXPORT_ALL_DATA_MIG {
	grid-row: 3;
	grid-column: 6;
}
#OBJID_BUTTON_IMPORT_ALL_DATA_MIG {
	grid-row: 4;
	grid-column: 6;
}
/* 確認ダイアログ */
#OBJID_SWITCH_CONFIRM_DIALOG_BLOCK {
	grid-row: 1;
	grid-column: 6;
	padding-left: 0.6em;
}

/* =======================================================
装備ブロック
======================================================= */

/* 新装備ブロック */
#OBJID_SHADOW_EQUIPS_MIG {
	margin: 0.5em 0 1.5em 3px;
}

/* 全体グリッド */
.folding-block-body-MIG.shadow-equips {
	grid-template-columns: repeat(12, auto);
	column-gap: 1em;
}

/* ラッパ要素 */
:is(.equip-block, .equip-conf, .item-conf, .card-conf, .rndopt-conf) {
	display: contents;
}
/* 表示制御チェックボックス */
:is(.equip-ctrl, .item-ctrl, .card-ctrl, .rndopt-ctrl) {
	display: none;
}
/* 設定欄ラッパ　表示動作 */
.equip-ctrl:not(:checked) ~ .equip-conf,
.item-ctrl:not(:checked) ~ .item-conf,
.card-ctrl:not(:checked) ~ .card-conf,
.rndopt-ctrl:not(:checked) ~ .rndopt-conf {
	display: none;
}

/* カード選択欄（ランダムオプションが、<select> 2個必要なので） */
.equip-conf .card-select {
	grid-column-end: span 2;
}

/* 区切り線 */
.equip-conf .divider-line {
	grid-column: 1/-1;
	border-top: 1px solid black;
	padding: 0 -0.5em;
}

/* 習得スキル欄 */
#ID_SKILL_LEARNED * {
	white-space: nowrap;
}
#OBJID_SKILL_COLUMN_HEADER_LEARNED {
	width: 650px;
}

/* 攻撃方法部分 */
#OBJID_ATTACK_BLOCK_MIG {
	display: flex;
	justify-content: start;
	align-items: start;
	margin: 0 0 0.5em;
}

/* 各種設定欄 */
#OBJID_ATTACK_SETTING_BLOCK_MIG {
	margin-left: 1em;
}

#OBJID_ATTACK_SETTING_DIGIT3_MIG {
	grid-row: 1;
	grid-column: 1;
}
#OBJID_ATTACK_SETTING_AUTO_CALC_MIG {
	grid-row: 2;
	grid-column: 1;
}
#OBJID_ATTACK_SETTING_ACTIVE_INTERVAL_MIG {
	grid-row: 3;
	grid-column: 1;
	display: flex;
	justify-content: start;
}
#OBJID_ATTACK_SETTING_CASTSIM_INTERVAL_MIG {
	grid-row: 4;
	grid-column: 1;
	display: flex;
	justify-content: start;
}

.wrapper {
	display: flex;
}
.content {
	width:100%;
}

.sidebar {
	padding-left: 4px;
}
.sidebar-layout {
	height: auto;
	display: flex;
	flex-direction: column;
	position: relative;
	z-index: 2;
}

.sidebar-header span {
	white-space: nowrap;
	text-overflow: ellipsis;
}

.sidebar .sidebar-logo {
	display: flex;
	align-items: center;
}

.sidebar .sidebar-logo div {
	width: 40px;
	min-width: 40px;
	height: 36px;
	min-height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 8px;
	color: white;
	font-size: 18px;
	font-weight: 700;
	background-color: #ff8100;
	margin-right: 4px;
	font-family: 'Poppins', sans-serif
}

.sidebar .sidebar-logo h5 {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 14px;
	line-height: 30px;
	transition: opacity 0.3s;
	opacity: 1;
}

.sidebar .menu ul {
	list-style-type: none;
	padding: 0;
	margin: 0;
}

.sidebar .menu .menu-header {
	font-weight: 600;
	padding: 10px 5px;
	font-size: 0.8em;
	letter-spacing: 2px;
	transition: opacity 0.3s;
	opacity: 0.6;
}
.sidebar .menu .menu-item {
	height: 30px;
	padding: 0px 15px;
}

.menu-item .menu-title{
	font-size: 0.9em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	flex-grow: 1;
	transition: color 0.3s;
}

.modal-container {
	width: 100%;
	height: 100%;
	position: fixed;
	top: 0;
	left: 0;
	text-align: center;
	background: rgba(0, 0, 0, 0.5);
	overflow: auto;
	opacity: 0;
	visibility: hidden;
	transition: .3s ease-out;
	z-index: 9;
}

.modal-container::before {
	content: "";
	display: inline-block;
	vertical-align: middle;
	height: 100%;
}

.modal-container.active {
	opacity: 1;
	visibility: visible;
}

.modal-body {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	max-width: 80%;
	width: 80%;
}

.modal-close {
	position: absolute;
	top: -30px;
	right: 0;
	font-size: 14px;
	color: #fff;
	background: rgba(0,0,0,60%);
	padding: 4px 15px;
	cursor: pointer;
	border-radius: 5px 5px 0 0;
}

.modal-content {
	background: #fff;
	text-align: left;
	padding: 0px;
	font-weight: bold;
}

.modal-content iframe {
	width: 100%;
	height: 80%;
	border: none;
}

/*
* ツールチップ
*   多用しすぎないように注意
*/
.tooltip-target {
    /* ホバー対象の要素に対する設定 */
    position: relative; /* 擬似要素（ツールチップ）の基準位置とする */
    cursor: help; /* カーソルをヘルプアイコンにする */
    padding-bottom: 2px; /* 下線とテキストの間に少しスペースを空ける */
    display: inline-block; /* リンクなど、インライン要素でも位置を調整しやすくするため */
}
.tooltip-target::before,
.tooltip-target::after {
    --tooltip-offset: 10px; /* ツールチップと要素の間の距離 */

    position: absolute;
    left: 50%; /* 親要素（.tooltip-target）の中央に配置 */
    transform: translateX(-50%); /* 中央寄せの調整 */
    opacity: 0; /* 初期状態では非表示 */
    pointer-events: none; /* ツールチップ自体がマウスイベントを邪魔しないように */
    transition: opacity 0.1s ease-out, transform 0.1s ease-out; /* フェードイン・アウトと少しの移動アニメーション */
    z-index: 1000; /* 他の要素より手前に表示 */
}
.tooltip-target::before {
    content: attr(data-tooltip); /* data-tooltip属性の値を取得して表示 */
    background-color: #333;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.85em;
    white-space: nowrap; /* テキストの折り返しを防ぐ */
    bottom: calc(100% + var(--tooltip-offset)); /* 親要素の上部に配置 */
    /* 初期のY軸位置を少しずらしておくことで、フェードイン時に上に動くアニメーション */
    transform: translateX(-50%) translateY(5px);
}
/* ツールチップの小さな矢印 */
.tooltip-target::after {
    content: '';
    border: 6px solid transparent; /* 矢印のサイズと透明な境界 */
    border-top-color: #333; /* 矢印の色 */
    bottom: calc(100% + var(--tooltip-offset) - 6px); /* 矢印の位置調整 */
    /* 初期のY軸位置を少しずらしておく */
    transform: translateX(-50%) translateY(5px);
}
/* ホバー時のスタイル */
.tooltip-target:hover::before,
.tooltip-target:hover::after {
    opacity: 1; /* ホバー時に表示 */
    transform: translateX(-50%) translateY(0); /* 通常位置に戻す（アニメーション） */
}
/* ツールチップ対象のtd要素の表示崩れ対策 */
td.tooltip-target {
    display: table-cell; /* tdのデフォルト表示に戻す */
    padding-bottom: 0;   /* tooltip-targetで追加されたパディングをリセット */
}

/* 数値入力フィールドのスタイル */
input[type="number"] {
    width: 5em; /* 入力フィールドの幅を指定 */
    padding: 0.25em; /* 入力フィールドの内側の余白 */
    border: 1px solid #ccc; /* 入力フィールドの境界線 */
    border-radius: 4px; /* 入力フィールドの角を丸くする */
}

/* 数値入力フィールドの値が不正な場合の背景色 */
input[type="number"]:invalid {
    background-color: red;
    /* Add space for the error icon */
    position: relative;
}
/* Add a visible warning icon for invalid input */
input[type="number"]:invalid::after {
    content: "⚠";
    color: #fff;
    background: #d32f2f;
    border-radius: 50%;
    font-size: 1em;
    position: absolute;
    right: 0.5em;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    /* Optional: add a border for better contrast */
    border: 1px solid #fff;
    width: 1.2em;
    height: 1.2em;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* エンチャント検索ショートカットボタン */
.ench-search-shortcut-btn {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 5px 2px;
    opacity: 0.2;
}
.ench-search-shortcut-btn::before {
    content: '🔍';
}
.ench-search-shortcut-parent:hover .ench-search-shortcut-btn {
    opacity: 1;
}
