/*
 * Trex Dual Preview — dual-page.css
 * 全画面デュアルプレビューページ専用スタイル
 *
 * @package TrexDualPreview
 * @author  Pro Engineer Trex
 */

*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	height: 100%;
	overflow: hidden;
	font-family: system-ui, -apple-system, 'Segoe UI', sans-serif;
	background: #0f0f23;
	color: #e2e8f0;
}

/* ----------------------------------------------------------
   全画面ローディングオーバーレイ
   ---------------------------------------------------------- */
#tdp-page-loading {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: #0f0f23;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 20px;
}
#tdp-page-loading .tdp-big-spinner {
	width: 56px;
	height: 56px;
	border: 4px solid #1e3a5f;
	border-top-color: #7c3aed;
	border-radius: 50%;
	animation: tdpSpin 0.8s linear infinite;
}
#tdp-page-loading p {
	font-size: 14px;
	color: #64748b;
	letter-spacing: 0.04em;
}
#tdp-page-loading.is-hidden {
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

/* ----------------------------------------------------------
   ヘッダー
   ---------------------------------------------------------- */
#tdp-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 50px;
	padding: 0 20px;
	flex-shrink: 0;
	background: #16213e;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
	gap: 12px;
}
#tdp-header h1 {
	font-size: 14px;
	font-weight: 700;
	color: #e2e8f0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 55%;
}
.tdp-badge {
	background: #1e3a5f;
	color: #7eb3e8;
	font-size: 11px;
	padding: 2px 9px;
	border-radius: 12px;
	white-space: nowrap;
}
.tdp-btn {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 6px 13px;
	border-radius: 5px;
	font-size: 12px;
	font-weight: 600;
	text-decoration: none;
	border: none;
	cursor: pointer;
	transition: opacity 0.15s;
	white-space: nowrap;
}
.tdp-btn:hover { opacity: 0.8; }
.tdp-btn--reload { background: #276749; color: #fff; }
.tdp-btn--edit   { background: #2d3748; color: #e2e8f0; }
.tdp-header-actions {
	display: flex;
	gap: 8px;
	flex-shrink: 0;
	align-items: center;
}

/* ----------------------------------------------------------
   メインエリア
   ---------------------------------------------------------- */
#tdp-main {
	display: flex;
	height: calc(100vh - 50px);
	padding: 12px 20px;
	gap: 28px;
	align-items: stretch;
	overflow: hidden;
}

/* ----------------------------------------------------------
   PC / SP パネル共通
   ---------------------------------------------------------- */
.tdp-panel {
	display: flex;
	flex-direction: column;
	align-items: center;
	overflow: hidden;
	flex-shrink: 0;
}
.tdp-panel-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.06em;
	color: #94a3b8;
	text-transform: uppercase;
	margin-bottom: 6px;
	flex-shrink: 0;
}

/* ----------------------------------------------------------
   スライダー UI
   ---------------------------------------------------------- */
.tdp-slider-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin-top: 10px;
	padding: 8px 12px;
	flex-shrink: 0;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 8px;
}
.tdp-slider-label {
	font-size: 11px;
	font-weight: 600;
	color: #94a3b8;
	white-space: nowrap;
}
.tdp-slider-input {
	flex: 1;
	cursor: pointer;
	accent-color: #7c3aed;
	height: 4px;
}
.tdp-slider-value {
	font-size: 12px;
	font-weight: 700;
	color: #e2e8f0;
	min-width: 54px;
	text-align: right;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* ----------------------------------------------------------
   PC デバイスシェル
   ---------------------------------------------------------- */
.tdp-shell-pc {
	border-radius: 8px;
	border: 3px solid #334155;
	background: #1e293b;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}
.tdp-browser-bar {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 7px 10px;
	background: #1e293b;
	flex-shrink: 0;
}
.tdp-traffic-light {
	display: inline-block;
	width: 9px;
	height: 9px;
	border-radius: 50%;
}
.tdp-traffic-light--red    { background: #ef4444; }
.tdp-traffic-light--yellow { background: #f59e0b; }
.tdp-traffic-light--green  { background: #22c55e; }
.tdp-address-bar {
	margin-left: 6px;
	flex: 1;
	font-size: 10px;
	color: #64748b;
	background: #0f172a;
	padding: 2px 10px;
	border-radius: 4px;
}

/* ----------------------------------------------------------
   SP デバイスシェル
   ---------------------------------------------------------- */
.tdp-shell-sp {
	border-radius: 36px;
	border: 5px solid #334155;
	background: #0f172a;
	overflow: hidden;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.7);
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
}
.tdp-sp-notch-bar,
.tdp-sp-home-bar {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 7px 0;
	background: #0f172a;
	flex-shrink: 0;
}
.tdp-sp-notch         { width: 56px; height: 6px; background: #334155; border-radius: 3px; }
.tdp-sp-home-indicator { width: 44px; height: 5px; background: #475569; border-radius: 3px; }

/* ----------------------------------------------------------
   クリップ領域
   ---------------------------------------------------------- */
.tdp-clip {
	position: relative;
	overflow: hidden;
	background: #fff;
	flex: 1 1 auto;
	min-height: 0;
}

/* ----------------------------------------------------------
   iframe
   ---------------------------------------------------------- */
.tdp-iframe {
	position: absolute;
	top: 0;
	left: 0;
	border: none;
	display: block;
	transform-origin: top left;
}

/* ----------------------------------------------------------
   クリップ内ローディングインジケーター
   ---------------------------------------------------------- */
.tdp-clip-loading {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	font-size: 13px;
	color: #64748b;
	background: #1e293b;
	z-index: 10;
	transition: opacity 0.3s;
}
.tdp-clip-loading.is-hidden {
	opacity: 0;
	pointer-events: none;
}
.tdp-spinner {
	display: inline-block;
	width: 28px;
	height: 28px;
	border: 3px solid #334155;
	border-top-color: #7c3aed;
	border-radius: 50%;
	animation: tdpSpin 0.7s linear infinite;
}

@keyframes tdpSpin {
	to { transform: rotate(360deg); }
}

/* ----------------------------------------------------------
   フッター
   ---------------------------------------------------------- */
#tdp-page-footer {
	padding: 6px 20px;
	background: #16213e;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 11px;
	color: #64748b;
	display: flex;
	gap: 20px;
	flex-shrink: 0;
}
