/* 個人リンク専用スタイル 全サイト共通CSS*/

/* --- ヘッダー：スターボタン --- */
.pl-star-btn {
	background: none;
	border: none;
	padding: 0;
	outline: none !important;
	font-size: 1.7em;
	color: #FFD966;
	display: inline-block;
	transform: translateY(4px);
}

.pl-star-btn:hover i {
	color: #FFC107;
}

/* --- ポップオーバー --- */
.pl-popover {
	width: 300px !important;
	border: 1px solid #dee2e6 !important;
}

.pl-popover .popover-header {
	background-color: #f7f7f7;
}

.pl-popover .popover-body {
	background: none;
	padding: 0.5rem 0.5rem;
}

.pl-popover-item {
	display: block;
	padding: 12px 15px;
	flex-shrink: 0;
	color: #333 !important;
	font-size: 14px;
}

.pl-popover-item:last-child {
	border-bottom: 0;
}

.pl-popover-item:hover {
	background-color: #e9ecef ;
}

/* ポップオーバー全体のコンテナ */
.pl-popover-container {
	display: flex;
	flex-direction: column;
	max-height: 400px;
	width: 280px;
	/* 幅を固定 */
}

/* リスト部分のみスクロール */
.pl-popover-scroll-area {
	flex: 1 1 auto;
	overflow-y: auto;
	overflow-x: hidden;
	min-height: 0;
}

/* フッターの固定スタイル */
.pl-popover-footer {
	flex: 0 0 auto;
	padding: 10px;
	border-top: 1px solid #dee2e6;
}

.pl-popover-msg {
	padding: 20px;
	text-align: center;
	color: #999;
	font-size: 13px;
}

/* --- モーダル・テーブル共通 --- */

/* ローディングオーバーレイ */
.pl-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(255, 255, 255, 1.0);
	z-index: 2000;
	display: none;
	align-items: center;
	justify-content: center;
	border-radius: 0 0 0.3rem 0.3rem;
}

/* 並び替えハンドル */
.pl-drag-handle {
	cursor: grab;
	text-align: center;
	font-size: 18px;
}

.pl-drag-handle:active {
	cursor: grabbing;
}

.ui-sortable-helper .pl-drag-handle {
	cursor: grabbing ;
}

/* 管理用テーブル */
.pl-table {
	table-layout: fixed;
}
.pl-table .ui-sortable-helper,
.pl-table .ui-sortable-helper * {
    cursor: grabbing !important;
}

.pl-table .col-name,
.pl-table .col-url {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.pl-row-actions {
	display: flex;
	flex-wrap: nowrap;
	gap: 4px;
}

.pl-row-actions .btn {
	width: 32px;
	height: 32px;
	padding: 0;
	flex: 0 0 32px;
}

.pl-add-btn-tooltip-trigger > .btn:disabled,
.pl-add-btn-tooltip-trigger > .btn.disabled {
	pointer-events: none;
}

/* 管理テーブルのスクロールコンテナ */
#pl-tableContainer {
	max-height: calc(100vh - 280px);
	overflow-y: auto;
	position: relative;
}

#pl-tableContainer thead th {
	position: sticky;
	top: -2px;
	z-index: 2;
	border-top: 0;
	border-bottom: 2px solid #dee2e6;
}

#pl-mainModal .tooltip {
    pointer-events: none !important;
}
#pl-mainModal .tooltip-inner {
	max-width: 220px; 
}


/* 子モーダル内のエラー・完了表示用スタイル追加 */
.invalid-feedback-custom {
	width: 100%;
	margin-top: .25rem;
	font-size: 80%;
	color: #dc3545;
}

/* 保存完了エリアのパディング微調整 */
.pl-complete-area {
	padding: 2rem 0;
}

/* --- 重なりモーダルの制御 --- */

/* 親モーダルのz-indexを明示（通常1050） */
#pl-mainModal {
	z-index: 1050;
}

/* 子モーダルのz-indexを親より高く設定 */
.child-modal {
	z-index: 1070 ;
}

/* 子モーダルが開いている時の背景（backdrop）を親モーダル(1050)より前面に出す */
/* これにより、親モーダルの上にグレーの膜がかかる */
.child-modal.show ~ .modal-backdrop,
.modal-backdrop + .modal-backdrop {
	z-index: 1060 ;
}

/* ドラッグ中の行（helper）はミニテーブルとして複製されるため、テーブル表示のまま強調表示だけ上書きする */
.ui-sortable-helper {
    margin: 0 ;
    background: #fff ;
    border: 1px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ui-sortable-helper td {
	box-sizing: border-box ;
}
