/**
 * SR Product 360° View — Global Settings admin styles.
 * Loaded only on the plugin settings screen (see Admin\Assets).
 */

.sr360-settings .sr360-subtitle {
	max-width: 780px;
	font-size: 14px;
}

/* Visible-but-disabled placeholder tabs (License & Storage, Help). */
.sr360-nav-tabs .nav-tab-disabled {
	color: #a7aaad;
	cursor: default;
}

.sr360-settings-tab-content {
	margin-top: 16px;
}

/* ---- Toggle switch (native checkbox, role=switch) --------------------- */
.sr360-switch {
	position: relative;
	display: inline-block;
	vertical-align: middle;
	line-height: 0;
}
.sr360-switch__input {
	position: absolute;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}
.sr360-switch__track {
	display: inline-block;
	width: 42px;
	height: 22px;
	border-radius: 11px;
	background: #c3c4c7;
	transition: background .15s ease;
}
.sr360-switch__knob {
	display: block;
	width: 18px;
	height: 18px;
	margin: 2px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s ease;
}
.sr360-switch__input:checked ~ .sr360-switch__track {
	background: #2271b1;
}
.sr360-switch__input:checked ~ .sr360-switch__track .sr360-switch__knob {
	transform: translateX(20px);
}
.sr360-switch__input:focus ~ .sr360-switch__track {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
}
.sr360-switch__input:disabled ~ .sr360-switch__track {
	opacity: .5;
	cursor: default;
}

/* ---- Units, pairs, ranges -------------------------------------------- */
.sr360-unit {
	color: #646970;
	margin-inline-start: 4px;
}
.sr360-pair {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.sr360-pair__x,
.sr360-pair__lbl {
	color: #646970;
}
.sr360-range {
	vertical-align: middle;
	width: 180px;
	max-width: 100%;
}
.sr360-range__out {
	display: inline-block;
	min-width: 3ch;
	margin-inline-start: 8px;
	color: #646970;
	font-variant-numeric: tabular-nums;
}

/* ---- Radio group with sub-descriptions ------------------------------- */
.sr360-radio {
	margin: 0;
	padding: 0;
	border: 0;
}
/* Scoped to the parent .sr360-radio ON PURPOSE — do not "simplify" to a single class.
   WordPress core ships `.form-table td fieldset label { display: inline-block; }`
   (specificity 0,1,3), which outranks a bare `.sr360-radio__row` (0,1,0). Losing the
   flex context breaks the whole field: options wrap into two columns, the radio drops
   ABOVE its label (the flex-column .sr360-radio__text becomes a block on its own line),
   and `gap` stops applying so adjacent option descriptions run together as one sentence.
   The parent-class scope (0,2,0) wins the cascade and restores the intended layout. */
.sr360-radio .sr360-radio__row {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	padding: 4px 0;
}
.sr360-radio__text {
	display: flex;
	flex-direction: column;
	line-height: 1.4;
}
.sr360-radio__sub {
	color: #646970;
	font-size: 12.5px;
}

/* ---- Checkbox group -------------------------------------------------- */
.sr360-checkgroup {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px 16px;
}
.sr360-checkgroup__item {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

/* ---- Media picker ---------------------------------------------------- */
.sr360-media {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}
.sr360-media__preview img {
	max-height: 40px;
	width: auto;
	vertical-align: middle;
	border-radius: 3px;
}
.sr360-media__default {
	color: #646970;
	font-size: 12.5px;
}

/* Unsaved-changes indicator next to the Save button. */
.sr360-unsaved {
	margin-inline-start: 10px;
	color: #996800;
	font-style: italic;
}

/* Reset-to-defaults form sits below the main form. */
.sr360-reset-form {
	margin-top: 8px;
}

/* Section separator. WordPress renders each settings section as an <h2> followed by its own
   .form-table, so the end of a section IS the end of its table. A light rule there makes the
   grouping obvious on what is otherwise one long column of fields. Scoped to this plugin's
   form so no other admin screen is affected, and #dcdcde is core's standard rule colour so it
   reads as native. The last section drops the rule — otherwise a stray line sits immediately
   above the Save button. */
.sr360-settings-form .form-table {
	margin-bottom: 0;
	padding-bottom: 14px;
	border-bottom: 1px solid #dcdcde;
}

.sr360-settings-form .form-table:last-of-type {
	padding-bottom: 0;
	border-bottom: 0;
}

/* Per-section intro notice (e.g. the Advanced "hotspots planned" note). */
.sr360-notice {
	margin: 2px 0 14px;
	font-style: italic;
}

/* A section whose master toggle is off dims its (disabled) controls. */
.sr360-section--off .form-table td {
	opacity: .55;
}

/* ---- Live Preview panel ---------------------------------------------- */
.sr360-preview {
	margin-top: 24px;
	padding: 16px 18px 20px;
	max-width: 640px;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
}
.sr360-preview h2 {
	margin-top: 0;
}
.sr360-preview__stage {
	width: 100%;
	max-width: 320px;
	aspect-ratio: 1 / 1;
	margin: 8px 0 12px;
	background: #f0f0f1;
	border: 1px solid #dcdcde;
	border-radius: 3px;
	overflow: hidden;
}
.sr360-preview__fallback {
	color: #8a6d3b;
}
.sr360-preview__controls {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 6px 0 12px;
}
.sr360-preview__controls input[type="range"] {
	flex: 1;
	max-width: 320px;
}
.sr360-preview__label {
	color: #50575e;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.sr360-preview__pills {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}
.sr360-pill {
	display: inline-block;
	padding: 2px 9px;
	border-radius: 999px;
	font-size: 12px;
	line-height: 1.7;
	background: #f0f0f1;
	color: #50575e;
	border: 1px solid #dcdcde;
	cursor: default;       /* read-only indicators, never controls */
	user-select: none;
}
.sr360-pill.is-on {
	background: #edfaef;
	border-color: #a7d7ae;
	color: #1f7a4d;
}
.sr360-pill.is-off {
	opacity: .8;
}

/* ---- Bulk Import tab (task 058) ------------------------------------------ */
.sr360-bulk__steps {
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: 40em;
}
.sr360-bulk__step {
	margin: 0 0 1.5em;
	padding: 1em 1.25em;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	background: #fff;
}
.sr360-bulk__step > legend {
	font-weight: 600;
	padding: 0 .4em;
}
.sr360-bulk__field {
	margin: .75em 0;
}
.sr360-bulk__field > label {
	display: inline-block;
	margin-inline-end: 1em;
}
.sr360-bulk__field .description {
	display: block;
	margin-top: .25em;
}
.sr360-bulk__results {
	display: block;
	border: 1px solid #dcdcde;
	border-radius: 3px;
	margin-top: .25em;
	max-height: 12em;
	overflow-y: auto;
	background: #fff;
}
.sr360-bulk__result {
	display: block;
	width: 100%;
	text-align: start;
	padding: .4em .6em;
	border: 0;
	border-bottom: 1px solid #f0f0f1;
	background: transparent;
	cursor: pointer;
}
.sr360-bulk__result:hover,
.sr360-bulk__result:focus {
	background: #f0f6fc;
}
.sr360-bulk__selected {
	display: inline-block;
	margin-inline-start: .5em;
	font-style: italic;
}
.sr360-bulk__actions {
	display: flex;
	gap: .5em;
	flex-wrap: wrap;
}
.sr360-bulk__progress {
	margin: 1em 0;
}
.sr360-bulk__progress progress {
	width: 100%;
	max-width: 30em;
	height: 1.25em;
	vertical-align: middle;
}
.sr360-bulk__progress-label {
	margin-inline-start: .5em;
}
.sr360-bulk__summary {
	margin-top: 1em;
	text-align: center;
}
.sr360-bulk__message {
	margin: .75em 0;
	color: #50575e;
}
.sr360-bulk__banner {
	margin: 1em 0;
	padding: .6em .9em;
	border-radius: 3px;
	border-inline-start: 4px solid;
	font-weight: 600;
}
.sr360-bulk__banner.is-clean {
	border-color: #46b450;
	background: #ecf7ed;
}
.sr360-bulk__banner.is-issues {
	border-color: #dba617;
	background: #fcf9e8;
}
.sr360-bulk__history {
	margin-top: 2em;
	max-width: 40em;
}
.sr360-bulk__history-items {
	margin: 0;
	padding: 0;
	list-style: none;
}
.sr360-bulk__history-items li {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1em;
	padding: .5em .25em;
	border-bottom: 1px solid #f0f0f1;
}

/* ---- Colour field (native HTML5 picker + Clear) ------------------------- */
.sr360-color {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.sr360-color__picker {
	width: 46px;
	height: 30px;
	padding: 2px;
	border: 1px solid #8c8f94;
	border-radius: 3px;
	background: #fff;
	cursor: pointer;
}

.sr360-color__picker:disabled {
	cursor: default;
	opacity: 0.5;
}

/* ---- Help tab (task 144) ------------------------------------------------- */

/* A native <details>/<summary> accordion: no JavaScript, keyboard-operable and
   screen-reader-announced for free, and it still shows its content if this
   stylesheet never loads. Styled to read as a stack of cards like the rest of
   wp-admin rather than as raw disclosure triangles. */
.sr360-help {
	max-width: 780px;
}

.sr360-help__section {
	margin: 0 0 8px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	background: #fff;
}

.sr360-help__title {
	padding: 12px 14px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	/* The marker stays: it is the affordance that says "this opens", and it also
	   flips to indicate state without any scripting. */
	list-style-position: inside;
}

.sr360-help__title:hover {
	color: #2271b1;
}

/* Match the focus ring wp-admin uses elsewhere, so keyboard users get the same
   affordance here as on every other control. Scoped to the summary itself, NOT
   :focus-within on the section — that would keep highlighting the heading while
   focus sat on a link inside the opened panel, pointing at the wrong element. */
.sr360-help__title:focus-visible {
	outline: 2px solid #2271b1;
	outline-offset: -2px;
}

.sr360-help__body {
	padding: 0 14px 12px;
	/* Indent to the summary text, past the disclosure marker. */
	border-top: 1px solid #f0f0f1;
	padding-top: 12px;
}

.sr360-help__body p {
	margin: 0 0 10px;
	max-width: 70ch;
}

.sr360-help__list {
	margin: 0 0 10px;
	padding-inline-start: 20px;
	list-style: disc;
	max-width: 70ch;
}

.sr360-help__list--steps {
	list-style: decimal;
}

.sr360-help__list li {
	margin: 0 0 6px;
}

.sr360-help__contact {
	margin: 18px 0 0;
	padding: 14px;
	border: 1px solid #c3c4c7;
	border-inline-start: 4px solid #2271b1;
	border-radius: 4px;
	background: #fff;
}

.sr360-help__contact h2 {
	margin: 0 0 6px;
	font-size: 14px;
}

.sr360-help__contact p {
	margin: 0 0 8px;
	max-width: 70ch;
}

.sr360-help__email {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
}


/* ---- Premium-only ("locked") settings ---------------------------------------
   Free SHOWS the settings it does not offer, disabled, so people can see what
   upgrading buys. The visual job is to read as unavailable at a glance without
   becoming unreadable — a dimmed control still has to be legible to someone
   deciding whether to pay for it, and its label still has to pass contrast.

   The section note sits between core's <h2> and its <table class="form-table">,
   which is the only relationship available: do_settings_sections() emits no
   element wrapping a section, so there is nothing to put a class on. The
   adjacent-sibling selector is deliberate, and it is why the note must render
   immediately before the table rather than anywhere else in the callback. */
.sr360-upgrade__note {
	margin: 0 0 8px;
	padding: 10px 12px;
	border-left: 4px solid #c3c4c7;
	background: #f6f7f7;
	font-size: 13px;
	line-height: 1.6;
	max-width: 640px;
}
.sr360-upgrade__link {
	white-space: nowrap;
}
/* 0.7 rather than something heavier: at this value near-black label text over
   white still clears WCAG AA for normal text, which a stronger fade does not.
   "Looks disabled" must not cost the section its readability. */
.sr360-upgrade__note + .form-table {
	opacity: 0.7;
}
/* The marker is the part that has to survive the dimming, because it is the
   only thing telling you WHY the control is dead. Full opacity, own colour. */
.sr360-locked__marker {
	opacity: 1;
	color: #646970;
	font-size: 12px;
	font-style: normal;
	font-weight: 600;
	text-transform: none;
	white-space: nowrap;
}
/* Scoped through .form-table td ON PURPOSE — see the .sr360-radio note above.
   Core ships `.form-table td fieldset label` at (0,1,3); a bare
   `.sr360-locked__marker` (0,1,0) loses to it inside a radio fieldset and the
   marker would inherit the label's colour instead of its own. */
.form-table td .sr360-locked__marker {
	color: #646970;
}
