
/* ===============================
        image Modal
   =============================== */

/* 共用圖片 Modal */
.image-modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.95);
	padding: 50px 20px;
}

.image-modal.show {
	display: flex;
	align-items: center;
	justify-content: center;
}

.image-modal-img {
	margin: auto;
	display: block;
	max-width: 90%;
	max-height: 90vh;
	object-fit: contain;
	animation: modalZoom 0.3s ease;
}



.image-modal-close {
	position: absolute;
	top: 20px;
	right: 35px;
	color: #fff;
	font-size: 40px;
	font-weight: bold;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 10001;
}

.image-modal-close:hover {
	color: #00d9ff;
	transform: rotate(90deg);
}


/* ========================================
   通用 Modal 樣式
   ======================================== */

/* Modal 背景遮罩 */
.sys-modal {
	display: none;
	position: fixed;
	z-index: 1000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.7);
	backdrop-filter: blur(5px);
	align-items: center;
	justify-content: center;
	animation: fadeIn 0.3s ease;
}



/* Modal 內容容器 */
.sys-modal-content {
	background: linear-gradient(135deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.95) 100%);
	border: 1px solid rgba(0, 217, 255, 0.2);
	border-radius: 16px;
	width: 90%;
	max-width: 900px;
	max-height: 90vh;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(0, 217, 255, 0.1), 0 0 100px rgba(0, 217, 255, 0.05);
	animation: slideUp 0.3s ease;
	display: flex;
	flex-direction: column;
}



/* 小型 Modal */
.sys-modal-content.modal-sm {
	max-width: 500px;
}

/* 中型 Modal */
.sys-modal-content.modal-md {
	max-width: 700px;
}

/* 大型 Modal (預設) */
.sys-modal-content.modal-lg {
	max-width: 900px;
}

/* 超大型 Modal */
.sys-modal-content.modal-xl {
	max-width: 1200px;
}

/* Modal 標題 */
.sys-modal-header {
	padding: 20px 30px;
	background: linear-gradient(135deg, rgba(14, 165, 233, 0.2) 0%, rgba(6, 182, 212, 0.2) 100%);
	border-bottom: 1px solid rgba(0, 217, 255, 0.2);
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.sys-modal-header h2 {
	margin: 0;
	font-size: 1.5rem;
	color: white;
	display: flex;
	align-items: center;
	gap: 10px;
}

/* 關閉按鈕 */
.sys-modal-close {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: white;
	font-size: 1.2rem;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sys-modal-close:hover {
	background: rgba(255, 255, 255, 0.2);
	transform: rotate(90deg);
}

/* Modal 頁籤 */
.sys-modal-tabs {
	display: flex;
	padding: 0 30px;
	background: rgba(15, 23, 42, 0.5);
	border-bottom: 1px solid rgba(0, 217, 255, 0.1);
	gap: 10px;
}

.sys-modal-tab {
	background: transparent;
	border: none;
	color: rgba(255, 255, 255, 0.6);
	padding: 15px 20px;
	cursor: pointer;
	transition: all 0.3s ease;
	border-bottom: 3px solid transparent;
	font-size: 0.95rem;
	font-weight: 500;
}

.sys-modal-tab:hover {
	color: rgba(255, 255, 255, 0.9);
	background: rgba(255, 255, 255, 0.05);
}

.sys-modal-tab.active {
	color: white;
	border-bottom-color: #00d9ff;
	background: rgba(0, 217, 255, 0.1);
}

/* Modal 內容 */
.sys-modal-body {
	padding: 30px;
	overflow-y: auto;
	max-height: calc(90vh - 200px);
	flex: 1;
}

/* Modal 底部 */
.sys-modal-footer {
	padding: 20px 30px;
	background: rgba(15, 23, 42, 0.5);
	border-top: 1px solid rgba(0, 217, 255, 0.1);
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

/* 載入動畫 */
.sys-modal-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px;
	color: rgba(255, 255, 255, 0.7);
}

.sys-modal-loading i {
	font-size: 3rem;
	margin-bottom: 20px;
	color: #00d9ff;
}

/* 頁籤內容 */
.sys-modal-tab-content {
	display: none;
	animation: fadeIn 0.3s ease;
}

.sys-modal-tab-content.active {
	display: block;
}



/* ========================================
   詳細資訊網格
   ======================================== */

.detail-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 20px;
}

.detail-item {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.detail-item.full-width {
	grid-column: 1 / -1;
}

.detail-item label {
	color: rgba(255, 255, 255, 0.6);
	font-size: 0.85rem;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.detail-item div {
	color: white;
	font-size: 1rem;
	padding: 10px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.detail-message {
	color: white;
	font-size: 1rem;
	padding: 15px;
	background: rgba(255, 255, 255, 0.05);
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	white-space: pre-wrap;
	word-break: break-word;
}

.detail-item pre {
	margin: 0;
	padding: 15px;
	background: rgba(0, 0, 0, 0.3);
	border-radius: 6px;
	border: 1px solid rgba(255, 255, 255, 0.1);
	overflow-x: auto;
}

.detail-item code {
	color: #a8dadc;
	font-family: 'Courier New', monospace;
	font-size: 0.9rem;
	line-height: 1.6;
}




/* ========================================
   響應式設計
   ======================================== */

@media (max-width: 768px) {
	.sys-modal-content {
		width: 95%;
		max-height: 95vh;
	}
	
	.sys-modal-tabs {
		overflow-x: auto;
		flex-wrap: nowrap;
	}
	
	.sys-modal-tab {
		white-space: nowrap;
		padding: 12px 15px;
		font-size: 0.85rem;
	}
	
	.sys-modal-footer {
		flex-direction: column;
	}
	
	.sys-modal-footer .btn {
		width: 100%;
	}
}
