/**
 * RockOn Woo Variations Table - admin page.
 *
 * Built from WordPress admin colours and spacing, so the page sits naturally
 * among the other WooCommerce screens.
 */

.rwvt-admin [hidden] {
	display: none !important;
}

.rwvt-admin-title {
	align-items: baseline;
	display: flex;
	gap: 12px;
}

.rwvt-admin-version {
	color: #646970;
	font-size: 13px;
	font-weight: 400;
}

.rwvt-intro {
	font-size: 14px;
	margin: 16px 0 0;
	max-width: 760px;
}

/* ---------------------------------------------------------------------------
 * Cards
 * ------------------------------------------------------------------------ */

.rwvt-card {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	box-sizing: border-box;
	margin: 20px 0;
	max-width: 1200px;
	padding: 16px 20px 20px;
}

.rwvt-card h2 {
	font-size: 15px;
	margin: 0 0 12px;
}

.rwvt-card-head {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin-bottom: 12px;
}

.rwvt-card-head h2 {
	margin: 0;
}

.rwvt-card-head .button {
	margin-left: auto;
}

.rwvt-card-note {
	color: #646970;
	margin: 0;
}

.rwvt-card-foot {
	color: #646970;
	font-size: 12px;
	margin: 14px 0 0;
	max-width: 760px;
}

.rwvt-card .notice.inline {
	margin: 0 0 12px;
}

/* ---------------------------------------------------------------------------
 * Overview: stat tiles
 * ------------------------------------------------------------------------ */

.rwvt-tiles {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat( auto-fit, minmax( 190px, 1fr ) );
}

.rwvt-tile {
	border: 1px solid #dcdcde;
	border-radius: 4px;
	padding: 14px 16px;
}

.rwvt-tile p {
	margin: 0;
}

.rwvt-tile-label {
	color: #50575e;
	font-size: 13px;
}

/* Proportional figures: tabular digits look loose at this size. */
.rwvt-tile-value {
	color: #1d2327;
	font-size: 28px;
	font-weight: 600;
	line-height: 1.25;
	margin: 6px 0 4px !important;
}

.rwvt-tile-delta {
	color: #646970;
	font-size: 12px;
}

.rwvt-tile-delta.is-up {
	color: #007017;
}

.rwvt-tile-delta.is-down {
	color: #b32d2e;
}

/* ---------------------------------------------------------------------------
 * Overview: usage and status
 * ------------------------------------------------------------------------ */

.rwvt-usage-actions {
	text-align: right;
	white-space: nowrap;
}

.rwvt-usage-actions a + a {
	margin-left: 12px;
}

.rwvt-status {
	display: grid;
	gap: 8px 24px;
	grid-template-columns: repeat( auto-fit, minmax( 300px, 1fr ) );
	margin: 0;
}

.rwvt-status li {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 8px;
	margin: 0;
}

.rwvt-status .dashicons {
	align-self: center;
	color: #00a32a;
}

.rwvt-status .is-problem .dashicons {
	color: #dba617;
}

.rwvt-status-label {
	font-weight: 600;
}

.rwvt-status-value {
	color: #50575e;
}

.rwvt-status-need {
	color: #8a2424;
	flex-basis: 100%;
	padding-left: 28px;
}

/* ---------------------------------------------------------------------------
 * Shortcode builder
 * ------------------------------------------------------------------------ */

.rwvt-builder-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat( auto-fit, minmax( 320px, 1fr ) );
	margin-top: 20px;
	max-width: 1200px;
}

.rwvt-builder-grid .rwvt-card {
	margin: 0;
}

.rwvt-field {
	border: 0;
	margin: 0 0 16px;
	padding: 0;
}

/* Field captions; option labels inside fieldsets keep their own style. */
.rwvt-field > label:not( .rwvt-check ):not( .rwvt-choice ),
.rwvt-field > legend {
	display: block;
	font-weight: 600;
	margin-bottom: 6px;
	padding: 0;
}

.rwvt-field .description {
	display: block;
	margin-top: 4px;
}

.rwvt-field-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
}

.rwvt-check {
	display: block;
	margin: 6px 0;
}

.rwvt-choice {
	align-items: flex-start;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	display: flex;
	gap: 10px;
	margin-bottom: 8px;
	padding: 10px 12px;
}

.rwvt-choice input {
	margin-top: 2px;
}

.rwvt-choice:has( input:checked ) {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

.rwvt-output-row {
	align-items: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.rwvt-output-row textarea {
	flex: 1 1 420px;
	font-size: 13px;
	resize: vertical;
}

.rwvt-output-status {
	color: #8a2424;
	margin: 8px 0 0;
}

.rwvt-output-status:empty {
	display: none;
}

.rwvt-preview {
	min-height: 60px;
	transition: opacity 0.15s ease;
}

.rwvt-preview[aria-busy="true"] {
	opacity: 0.55;
}

.rwvt-preview-loading {
	align-items: center;
	color: #646970;
	display: flex;
	gap: 6px;
	margin: 0 0 0 auto;
}

.rwvt-preview-loading .spinner {
	float: none;
	margin: 0;
}

.rwvt-preview-note {
	background: #f0f6fc;
	border-left: 4px solid #72aee6;
	margin: 0 0 12px;
	padding: 8px 12px;
}

/* ---------------------------------------------------------------------------
 * Settings and help
 * ------------------------------------------------------------------------ */

.rwvt-settings .rwvt-card .form-table {
	margin-top: 0;
}

.rwvt-settings .rwvt-card .form-table th {
	width: 220px;
}

/* WordPress sets fieldset labels inline; choices read better stacked. */
.rwvt-admin .form-table td fieldset label.rwvt-check {
	display: block;
}

.rwvt-help ol {
	margin-left: 1.5em;
}

.rwvt-reference td:first-child {
	white-space: nowrap;
	width: 1%;
}

@media ( prefers-reduced-motion: reduce ) {
	.rwvt-preview {
		transition: none;
	}
}
