/*!
 * VSForge Stock Market Widgets Lite — admin.css
 * License: GPLv2 or later — https://www.gnu.org/licenses/gpl-2.0.html
 */


/* Toggle switch */
.smw-toggle {
	display: inline-flex;
	align-items: center;
	cursor: pointer;
	position: relative;
	width: 44px;
	height: 24px;
}

.smw-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.smw-toggle-slider {
	position: absolute;
	inset: 0;
	background: #ccc;
	border-radius: 24px;
	transition: background 0.2s;
}

.smw-toggle-slider::before {
	content: '';
	position: absolute;
	width: 18px;
	height: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s;
}

.smw-toggle input:checked + .smw-toggle-slider {
	background: #2271b1;
}

.smw-toggle input:checked + .smw-toggle-slider::before {
	transform: translateX(20px);
}

/* Layout picker */
.smw-layout-picker {
	display: flex;
	gap: 16px;
	flex-wrap: wrap;
	margin-top: 8px;
	margin-bottom: 4px;
}

.smw-layout-option {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	border: 2px solid #ddd;
	border-radius: 8px;
	padding: 12px;
	width: 130px;
	transition: border-color .15s;
	box-sizing: border-box;
}

.smw-layout-option:hover {
	border-color: #2271b1;
}

.smw-layout-option input[type="radio"] {
	display: none;
}

.smw-layout-option:has(input:checked) {
	border-color: #2271b1;
	background: #f0f6fc;
}

.smw-layout-preview {
	width: 106px;
	height: 60px;
	background: #f6f7f7;
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

/* Horizontal preview — 3 pills in a row */
.smw-prev-row {
	display: flex;
	gap: 4px;
}

.smw-prev-row span {
	display: block;
	width: 28px;
	height: 14px;
	background: #c3d4e6;
	border-radius: 3px;
}

/* Vertical preview — 3 rows stacked */
.smw-prev-col {
	display: flex;
	flex-direction: column;
	gap: 5px;
	width: 80%;
}

.smw-prev-col span {
	display: block;
	height: 12px;
	background: #c3d4e6;
	border-radius: 3px;
}

/* Sparkline preview — card with a mini SVG line */
.smw-prev-sparkline {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.smw-prev-sparkline span {
	display: block;
	width: 60px;
	height: 44px;
	background: #c3d4e6;
	border-radius: 5px;
	border: 1px solid #a0b8d4;
}

/* Single card preview — one card */
.smw-prev-single {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.smw-prev-single span {
	display: block;
	width: 54px;
	height: 44px;
	background: #c3d4e6;
	border-radius: 5px;
	border: 1px solid #a0b8d4;
}

/* Grid preview — 2×2 cards */
.smw-prev-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 4px;
	width: 75%;
}

.smw-prev-grid span {
	display: block;
	height: 22px;
	background: #c3d4e6;
	border-radius: 3px;
}

.smw-layout-label {
	font-size: 12px;
	text-align: center;
	color: #1d2327;
}

/* Copy-code shortcut chips */
.smw-copy-code {
	cursor: pointer;
	padding: 2px 6px;
	border-radius: 3px;
	background: #e8f0fe;
	border: 1px solid #b0c4f5;
	transition: background 0.15s;
	position: relative;
}

.smw-copy-code:hover {
	background: #c8d8fc;
}

.smw-copy-code::after {
	content: ' 📋';
	font-size: 11px;
	opacity: 0.6;
}

.smw-copy-code.smw-copied {
	background: #d4edda;
	border-color: #7ec898;
}

.smw-copy-code.smw-copied::after {
	content: ' ✓ Copied!';
	font-size: 11px;
	color: #1a7a3c;
	opacity: 1;
}

/* Layout attribute reference table */
.smw-shortcode-table {
	max-width: 900px;
}

.smw-shortcode-table td:first-child code {
	white-space: nowrap;
}
