/**
 * Woo Templates List Page Styles
 *
 * @package Shortcodeglut
 */

/* Page Container */
.shortcodeglut-woo-templates-page {
	margin: 20px;
}

.shortcodeglut-woo-templates-page .description {
	color: #646970;
	font-size: 14px;
	margin: 0 0 20px 0;
}

/* Template Table Styles */
.wp-list-table .column-template_name {
	width: 30%;
}

.wp-list-table .column-template_id {
	width: 40%;
}

.wp-list-table .column-actions {
	width: 30%;
	text-align: right;
}

/* Badge for Prebuilt Templates */
.scg-badge {
	display: inline-block;
	padding: 2px 8px;
	font-size: 11px;
	font-weight: 500;
	line-height: 1.4;
	border-radius: 3px;
	margin-left: 8px;
}

.scg-badge--default {
	background: #edfaef;
	color: #006600;
}

/* Template ID Wrapper */
.shopglut-template-id-wrapper {
	display: flex;
	align-items: center;
	gap: 8px;
}

.shopglut-template-id-code {
	background: #f0f0f1;
	padding: 4px 8px;
	border-radius: 4px;
	font-family: Monaco, Consolas, monospace;
	font-size: 12px;
	color: #50575e;
}

/* Copy Button */
.shopglut-copy-btn {
	background: none;
	border: none;
	cursor: pointer;
	padding: 4px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #50575e;
	transition: color 0.2s;
}

.shopglut-copy-btn:hover {
	color: #2271b1;
}

.shopglut-copy-btn.copied {
	color: #00a32a;
}

/* Action Buttons */
.shopglut-template-actions {
	display: flex;
	gap: 8px;
	justify-content: flex-end;
}

.shopglut-action-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 8px;
	font-size: 12px;
	line-height: 1.4;
	border: 1px solid #c3c4c7;
	background: #f6f7f7;
	color: #50575e;
	cursor: pointer;
	border-radius: 3px;
	transition: all 0.2s;
}

.shopglut-action-btn:hover {
	background: #f0f0f1;
	border-color: #8c8f94;
	color: #1d2327;
}

.shopglut-action-btn .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

/* Preview Modal */
#shopglut-preview-modal {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100000;
}

.shopglut-modal-container {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 25px 50px rgba(0,0,0,0.25);
	max-width: 1100px;
	width: 92%;
	max-height: 90vh;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	z-index: 100001;
	animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
	from {
		opacity: 0;
		transform: translate(-50%, -48%);
	}
	to {
		opacity: 1;
		transform: translate(-50%, -50%);
	}
}

.shopglut-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0,0,0,0.75);
	backdrop-filter: blur(2px);
	z-index: 100000;
}

.shopglut-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #e0e0e0;
	background: #f8f9fa;
	border-radius: 12px 12px 0 0;
}

.shopglut-modal-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #1d2327;
}

.shopglut-modal-close {
	background: none;
	border: none;
	cursor: pointer;
	padding: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #50575e;
	transition: all 0.15s ease;
	border-radius: 6px;
	min-width: 36px;
	min-height: 36px;
}

.shopglut-modal-close:hover {
	background: #e0e0e0;
	color: #1d2327;
}

.shopglut-modal-close .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
}

.shopglut-modal-body {
	padding: 32px;
	overflow-y: auto;
	overflow-x: hidden;
	max-height: calc(90vh - 100px);
	background: #f8f9fa;
}

/* Preview Content Styles */
.shopglut-preview-content {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
	padding: 32px;
	background: #fff;
	border-radius: 12px;
	border: 1px solid #e0e0e0;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	min-height: 200px;
}

/* Responsive */
@media (max-width: 782px) {
	.shortcodeglut-woo-templates-page {
		margin: 10px;
	}

	.wp-list-table .column-template_id,
	.wp-list-table .column-actions {
		width: auto;
	}

	.shopglut-modal-container {
		max-width: 95%;
		max-height: 95%;
	}
}
