﻿/* 樣板對話框樣式 */
.template-dialog {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	border-radius: 8px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.2);
	z-index: 1060;
	width: 90%;
	max-width: 900px;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
}
.avada-grid-dialog-header {
	padding: 20px;
	border-bottom: 1px solid #dee2e6;
	display: flex;
	justify-content: space-between;
	align-items: center;
	background: #f8f9fa;
}
.avada-grid-dialog-title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 600;
	color: #333;
}
.avada-grid-dialog-close {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: #6c757d;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.2s;
}
.avada-grid-dialog-close:hover {
	background: #e9ecef;
	color: #333;
}
.avada-grid-dialog-body {
	padding: 20px;
	overflow-y: auto;
	flex: 1;
}
.avada-grid-dialog-footer {
	padding: 15px 20px;
	border-top: 1px solid #dee2e6;
	display: flex;
	justify-content: flex-end;
	gap: 10px;
	background: #f8f9fa;
}
.template-list .list-group-item {
	transition: all 0.2s;
}
.template-list .list-group-item:hover {
	background: #f8f9fa;
}
.template-list .list-group-item.active {
	background: #e7f3ff;
	border-color: #0d6efd;
}
.template-preview {
	background: #fff;
	border: 1px solid #dee2e6;
	border-radius: 4px;
	padding: 15px;
}
.avada-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.5);
	z-index: 1055;
}
.template-edit-dialog {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: white;
	padding: 20px;
	border-radius: 8px;
	box-shadow: 0 10px 30px rgba(0,0,0,0.15);
	z-index: 1070;
	width: 80%;
	max-width: 1100px;
	max-height: 90vh;
	overflow-y: auto;
}
.template-edit-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.5);
	z-index: 1065;
}
.template-editor-view {
	min-height: 300px;
	max-height: 500px;
	overflow-y: auto;
}
.template-edit-mode {
	transition: all 0.2s;
}
/* TinyMCE 容器樣式 */
.tinymce-container {
	margin-top: 20px;
}
/* 預覽對話框樣式 */
.preview-dialog {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.95);
	z-index: 2000;
	display: flex;
	flex-direction: column;
}
.preview-toolbar {
	background: #2c3e50;
	color: white;
	padding: 15px 20px;
	display: flex;
	justify-content: space-between;
	align-items: center;
	box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.preview-device {
	transition: all 0.2s;
}
.preview-device.active {
	background: white !important;
	color: #2c3e50 !important;
}
.preview-iframe-container {
	flex: 1;
	display: flex;
	justify-content: center;
	align-items: flex-start;
	padding: 60px 20px 20px 20px;
	overflow: auto;
	background: #1a1a1a;
}
.preview-frame-wrapper {
	background: white;
	box-shadow: 0 10px 40px rgba(0,0,0,0.5);
	transition: all 0.3s ease;
	width: 100%;
	height: 100%;
	max-width: 1200px;
	position: relative;
}
.preview-frame-wrapper iframe {
	width: 100%;
	height: 100%;
	border: none;
}
/* 裝置尺寸指示器 */
.device-size-indicator {
	position: absolute;
	top: -60px;
	left: 50%;
	transform: translateX(-50%);
	background: rgba(255,255,255,0.9);
	padding: 5px 15px;
	border-radius: 4px;
	font-size: 12px;
	color: #333;
	white-space: nowrap;
	margin: 1rem auto;
}