/**
 * YouTube Shortcode Editor Admin Styles
 */

.yee-shortcode-editor {
	max-width: 100%;
}

.yee-editor-container {
	display: flex;
	gap: 20px;
	margin-top: 20px;
}

/* Left Panel: Settings */
.yee-settings-panel {
	flex: 1;
	max-width: 600px;
}

.yee-settings-wrapper {
	background: #fff;
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	padding: 20px;
}

.yee-settings-wrapper h2 {
	margin-top: 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #dcdcde;
}

.yee-setting-group {
	margin-bottom: 20px;
}

.yee-setting-group label {
	display: block;
	margin-bottom: 5px;
}

.yee-setting-group input[type="text"],
.yee-setting-group input[type="number"],
.yee-setting-group select {
	width: 100%;
	max-width: 400px;
}

.yee-setting-group .description {
	margin-top: 5px;
	font-style: italic;
	color: #646970;
}

/* Accordion */
.yee-accordion {
	margin-top: 20px;
}

.yee-accordion-item {
	border: 1px solid #c3c4c7;
	margin-bottom: 10px;
}

.yee-accordion-header {
	width: 100%;
	background: #f6f7f7;
	border: none;
	padding: 12px 15px;
	text-align: left;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 8px;
	font-weight: 600;
	font-size: 14px;
	transition: background-color 0.2s ease;
}

.yee-accordion-header:hover {
	background: #f0f0f1;
}

.yee-accordion-header .dashicons {
	color: #2271b1;
}

.yee-accordion-header .dashicons-arrow-down-alt2 {
	margin-left: auto;
	transition: transform 0.2s ease;
}

.yee-accordion-item.active .yee-accordion-header .dashicons-arrow-down-alt2 {
	transform: rotate(180deg);
}

.yee-accordion-content {
	display: none;
	padding: 15px;
	background: #fff;
}

.yee-accordion-item.active .yee-accordion-content {
	display: block;
}

.yee-accordion-content label {
	display: block;
	margin-bottom: 4px;
}

.yee-accordion-content input[type="checkbox"] {
	margin-right: 8px;
}

/* Shortcode Output */
.yee-shortcode-output {
	margin-top: 20px;
	padding: 20px;
	background: #f6f7f7;
	border: 1px solid #c3c4c7;
}

.yee-shortcode-output h3 {
	margin-top: 0;
	margin-bottom: 10px;
}

.yee-shortcode-wrapper {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.yee-shortcode-wrapper code {
	flex: 1;
	display: block;
	padding: 12px;
	background: #fff;
	border: 1px solid #c3c4c7;
	word-break: break-all;
	font-size: 13px;
}

.yee-copy-button {
	padding: 8px 12px !important;
	height: auto !important;
	min-height: 0 !important;
}

.yee-copy-button .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.yee-copy-button.copied {
	background: #00a32a;
	border-color: #00a32a;
	color: #fff;
}

/* Right Panel: Preview */
.yee-preview-panel {
	flex: 1;
	min-width: 0;
}

.yee-preview-wrapper {
	background: #fff;
	border: 1px solid #c3c4c7;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	padding: 20px;
	position: sticky;
	top: 32px;
}

.yee-preview-wrapper h2 {
	margin-top: 0;
	padding-bottom: 10px;
	border-bottom: 1px solid #dcdcde;
}

.yee-preview-container {
	margin-top: 20px;
	min-height: 300px;
}

.yee-preview-placeholder {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 300px;
	color: #646970;
	border: 2px dashed #c3c4c7;
	border-radius: 4px;
}

.yee-preview-placeholder .dashicons {
	font-size: 64px;
	width: 64px;
	height: 64px;
	opacity: 0.5;
}

.yee-preview-placeholder p {
	margin-top: 10px;
	font-size: 14px;
}

/* Loading State */
.yee-preview-container.loading {
	opacity: 0.6;
	pointer-events: none;
}

/* Responsive */
@media screen and (max-width: 1280px) {
	.yee-editor-container {
		flex-direction: column;
	}

	.yee-settings-panel,
	.yee-preview-panel {
		max-width: 100%;
	}

	.yee-preview-wrapper {
		position: static;
	}
}

/* WordPress admin responsive */
@media screen and (max-width: 782px) {
	.yee-shortcode-wrapper {
		flex-direction: column;
		align-items: stretch;
	}

	.yee-copy-button {
		width: 100%;
	}
}
