/* ==========================================================================
   Standby - admin UI
   Scoped to #scsmm-wrap. Loaded after the scoped Bootstrap copy.
   ========================================================================== */

#scsmm-wrap {
	--scsmm-accent: #2c58ff;
	--scsmm-accent-dark: #1f43d6;
	--scsmm-ink: #0f172a;
	--scsmm-text: #334155;
	--scsmm-muted: #64748b;
	--scsmm-line: #e5e9f2;
	--scsmm-line-soft: #eef1f6;
	--scsmm-radius: 16px;
	--bs-body-bg: transparent;
	font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.55;
	color: var(--scsmm-text);
	background: transparent;
}

/* Page spacing: Bootstrap's scoped reset removed the .wrap margin. */
#scsmm-wrap.wrap {
	margin: 24px 24px 40px 12px;
	max-width: 1180px;
	padding: 0;
}

#scsmm-wrap * {
	box-sizing: border-box;
}

#scsmm-wrap a {
	color: var(--scsmm-accent);
}

/* ---------- Header ---------- */
#scsmm-wrap .scsmm-header-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	margin: 0 0 20px;
	padding: 24px 30px;
	color: #fff;
	border-radius: var(--scsmm-radius);
	background:
		radial-gradient(600px 220px at 100% 0%, rgba(44, 88, 255, 0.35), transparent 70%),
		linear-gradient(135deg, #0b1220 0%, #1b2438 100%);
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.18);
}

#scsmm-wrap .scsmm-brand {
	display: flex;
	align-items: center;
	gap: 16px;
	min-width: 0;
}

#scsmm-wrap .scsmm-brand img {
	width: 48px;
	height: auto;
	flex: 0 0 auto;
}

#scsmm-wrap .standby-heading {
	margin: 0;
	padding: 0;
	font-size: 22px;
	font-weight: 700;
	line-height: 1.3;
	color: #fff;
	letter-spacing: -0.01em;
}

#scsmm-wrap .scsmm-subtitle {
	margin: 4px 0 0;
	font-size: 13px;
	color: rgba(255, 255, 255, 0.7);
}

#scsmm-wrap .scsmm-header-meta {
	display: flex;
	align-items: center;
	gap: 10px;
}

#scsmm-wrap .scsmm-status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 14px;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.14);
}

#scsmm-wrap .scsmm-dot {
	width: 9px;
	height: 9px;
	border-radius: 50%;
	background: #94a3b8;
}

#scsmm-wrap .scsmm-status.is-on {
	background: rgba(34, 197, 94, 0.16);
	border-color: rgba(34, 197, 94, 0.4);
	color: #bbf7d0;
}

#scsmm-wrap .scsmm-status.is-on .scsmm-dot {
	background: #22c55e;
	box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.25);
}

#scsmm-wrap .scsmm-version {
	padding: 6px 10px;
	border-radius: 8px;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.65);
	background: rgba(255, 255, 255, 0.08);
}

/* ---------- Tabs ---------- */
#scsmm-wrap .scsmm-tabs {
	display: flex;
	flex-wrap: nowrap;
	gap: 6px;
	margin: 0 0 20px;
	padding: 6px;
	list-style: none;
	overflow-x: auto;
	background: #fff;
	border: 1px solid var(--scsmm-line);
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

#scsmm-wrap .scsmm-tabs .nav-item {
	margin: 0;
	flex: 0 0 auto;
}

#scsmm-wrap .scsmm-tabs .nav-link {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	border: 0;
	border-radius: 10px;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.2;
	color: var(--scsmm-muted);
	text-decoration: none;
	white-space: nowrap;
	background: transparent;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

#scsmm-wrap .scsmm-tabs .nav-link .dashicons {
	width: 18px;
	height: 18px;
	font-size: 18px;
}

#scsmm-wrap .scsmm-tabs .nav-link:hover {
	background: #f1f5f9;
	color: var(--scsmm-ink);
}

#scsmm-wrap .scsmm-tabs .nav-link:focus-visible {
	outline: 2px solid var(--scsmm-accent);
	outline-offset: 2px;
	box-shadow: none;
}

#scsmm-wrap .scsmm-tabs .nav-link.active {
	color: #fff;
	background: var(--scsmm-accent);
	box-shadow: 0 6px 16px rgba(44, 88, 255, 0.32);
}

/* ---------- Cards ---------- */
#scsmm-wrap .scsmm-section {
	padding: 0 32px 8px;
	background: #fff;
	border: 1px solid var(--scsmm-line);
	border-radius: var(--scsmm-radius);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 10px 28px rgba(15, 23, 42, 0.05);
}

#scsmm-wrap .scsmm-section-head {
	padding: 26px 0 20px;
	border-bottom: 1px solid var(--scsmm-line-soft);
}

#scsmm-wrap .scsmm-section-head h3 {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: var(--scsmm-ink);
	letter-spacing: -0.01em;
}

#scsmm-wrap .scsmm-section-head p {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--scsmm-muted);
}

/* ---------- Form rows ---------- */
#scsmm-wrap .scsmm-section .form-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
}

#scsmm-wrap .scsmm-section .form-table tr {
	border-bottom: 1px solid var(--scsmm-line-soft);
}

#scsmm-wrap .scsmm-section .form-table tr:last-child {
	border-bottom: 0;
}

#scsmm-wrap .scsmm-section .form-table th {
	width: 240px;
	padding: 24px 24px 24px 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	text-align: left;
	vertical-align: top;
	color: var(--scsmm-ink);
}

#scsmm-wrap .scsmm-section .form-table td {
	padding: 20px 0;
	margin: 0;
	line-height: 1.5;
	vertical-align: top;
}

#scsmm-wrap p.description,
#scsmm-wrap .description {
	margin: 8px 0 0;
	font-size: 13px;
	line-height: 1.5;
	color: var(--scsmm-muted);
}

/* ---------- Inputs ---------- */
#scsmm-wrap .form-control,
#scsmm-wrap .form-select,
#scsmm-wrap .regular-text,
#scsmm-wrap textarea,
#scsmm-wrap input[type="text"],
#scsmm-wrap input[type="url"],
#scsmm-wrap input[type="email"],
#scsmm-wrap input[type="number"],
#scsmm-wrap input[type="password"],
#scsmm-wrap input[type="datetime-local"] {
	width: 100%;
	min-height: 42px;
	padding: 9px 14px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--scsmm-ink);
	background-color: #fff;
	border: 1px solid #d5dbe5;
	border-radius: 10px;
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#scsmm-wrap textarea {
	min-height: 110px;
	resize: vertical;
}

#scsmm-wrap .form-select {
	padding-right: 38px;
}

#scsmm-wrap input::placeholder,
#scsmm-wrap textarea::placeholder {
	color: #94a3b8;
}

#scsmm-wrap .form-control:focus,
#scsmm-wrap .form-select:focus,
#scsmm-wrap textarea:focus,
#scsmm-wrap input[type="text"]:focus,
#scsmm-wrap input[type="url"]:focus,
#scsmm-wrap input[type="email"]:focus,
#scsmm-wrap input[type="number"]:focus,
#scsmm-wrap input[type="password"]:focus,
#scsmm-wrap input[type="datetime-local"]:focus {
	border-color: var(--scsmm-accent);
	box-shadow: 0 0 0 4px rgba(44, 88, 255, 0.14);
	outline: 0;
}

#scsmm-wrap input[type="color"] {
	width: 64px;
	height: 42px;
	min-height: 42px;
	padding: 4px;
	cursor: pointer;
	border: 1px solid #d5dbe5;
	border-radius: 10px;
	background: #fff;
}

#scsmm-wrap .scsmm-section .form-control.mx-small-input,
#scsmm-wrap .scsmm-section .form-select.mx-small-input,
#scsmm-wrap .scsmm-section .regular-text.mx-small-input {
	max-width: 420px;
}

#scsmm-wrap .scsmm-section .form-control.mx-large-input,
#scsmm-wrap .scsmm-section .form-select.mx-large-input,
#scsmm-wrap .scsmm-section .regular-text.mx-large-input {
	max-width: 720px;
}

/* Some tabs wrap the table in a Bootstrap column: use the full card width. */
#scsmm-wrap .scsmm-section > .row {
	margin: 0;
}

#scsmm-wrap .scsmm-section > .row > [class*="col-"] {
	flex: 0 0 100%;
	width: 100%;
	max-width: 100%;
	padding: 0;
}

#scsmm-wrap .scsmm-section td .form-select {
	max-width: 420px;
}

/* Social profile fields: even spacing. */
#scsmm-wrap .scsmm-section td > input.form-control.mb-1 {
	margin-bottom: 10px !important;
}

#scsmm-wrap .scsmm-section td > input.form-control.mb-1:last-child {
	margin-bottom: 0 !important;
}

/* ---------- Toggle switches ---------- */
#scsmm-wrap label:has(> .scsmm-switch) {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	font-size: 14px;
	color: var(--scsmm-text);
	cursor: pointer;
}

#scsmm-wrap .scsmm-switch[type="checkbox"] {
	-webkit-appearance: none;
	appearance: none;
	position: relative;
	flex: 0 0 auto;
	width: 42px;
	height: 24px;
	min-width: 42px;
	min-height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: #cbd5e1;
	box-shadow: none;
	cursor: pointer;
	transition: background 0.2s ease, box-shadow 0.2s ease;
}

#scsmm-wrap .scsmm-switch[type="checkbox"]::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	float: none;
	width: 18px;
	height: 18px;
	margin: 0;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.35);
	transition: transform 0.2s ease;
}

#scsmm-wrap .scsmm-switch[type="checkbox"]:checked {
	background: var(--scsmm-accent);
}

#scsmm-wrap .scsmm-switch[type="checkbox"]:checked::before {
	content: "";
	width: 18px;
	height: 18px;
	margin: 0;
	transform: translateX(18px);
}

#scsmm-wrap .scsmm-switch[type="checkbox"]:focus-visible {
	outline: 0;
	box-shadow: 0 0 0 4px rgba(44, 88, 255, 0.25);
}

/* Plain checkboxes (e.g. "Remove saved key"). */
#scsmm-wrap input[type="checkbox"]:not(.scsmm-switch):checked {
	accent-color: var(--scsmm-accent);
}

/* ---------- Buttons ---------- */
#scsmm-wrap .button {
	min-height: 38px;
	padding: 0 16px;
	line-height: 36px;
	font-size: 13px;
	font-weight: 500;
	color: var(--scsmm-text);
	background: #fff;
	border: 1px solid #d5dbe5;
	border-radius: 10px;
	box-shadow: none;
}

#scsmm-wrap .button:hover {
	color: var(--scsmm-ink);
	background: #f8fafc;
	border-color: #b8c2d3;
}

#scsmm-wrap .btn-primary,
#scsmm-wrap .scsmm-btn {
	padding: 11px 28px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(90deg, #2c58ff, #4866f7);
	border: 0;
	border-radius: 10px;
	box-shadow: 0 8px 20px rgba(44, 88, 255, 0.28);
	transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

#scsmm-wrap .btn-primary:hover,
#scsmm-wrap .btn-primary:focus {
	color: #fff;
	filter: brightness(1.06);
	transform: translateY(-1px);
	box-shadow: 0 10px 24px rgba(44, 88, 255, 0.36);
}

/* ---------- Media pickers ---------- */
#scsmm-wrap .scsmm-media-wrap {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
}

#scsmm-wrap .scsmm-media-preview {
	flex: 0 0 100%;
}

#scsmm-wrap .scsmm-media-preview:empty {
	display: none;
}

#scsmm-wrap .scsmm-media-preview img,
#scsmm-wrap .scsmm-media-preview video {
	display: block;
	max-width: 160px;
	max-height: 120px;
	margin-top: 6px;
	padding: 6px;
	background: #f8fafc;
	border: 1px solid var(--scsmm-line);
	border-radius: 10px;
}

/* ---------- Sticky save bar ---------- */
#scsmm-wrap .scsmm-savebar {
	position: sticky;
	bottom: 16px;
	z-index: 20;
	display: flex;
	align-items: center;
	gap: 16px;
	margin-top: 20px;
	padding: 14px 20px;
	background: rgba(255, 255, 255, 0.92);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border: 1px solid var(--scsmm-line);
	border-radius: 14px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, 0.1);
}

#scsmm-wrap .scsmm-savebar-note {
	font-size: 13px;
	color: var(--scsmm-muted);
}

/* ---------- Misc ---------- */
#scsmm-wrap .hidden {
	display: none;
}

#scsmm-wrap .tab-content {
	padding: 0;
}

#scsmm-wrap .scsmm-footer {
	padding: 18px 0 6px;
	text-align: center;
	color: #889;
}

#adminmenu .toplevel_page_scsmm_settings .wp-menu-image img {
	width: 18px;
	padding-top: 7px;
}

/* ---------- Small screens ---------- */
@media (max-width: 782px) {
	#scsmm-wrap.wrap {
		margin: 16px 12px 32px 12px;
	}

	#scsmm-wrap .scsmm-header-bar {
		padding: 20px;
	}

	#scsmm-wrap .scsmm-section {
		padding: 0 18px 8px;
	}

	#scsmm-wrap .scsmm-section .form-table th,
	#scsmm-wrap .scsmm-section .form-table td {
		display: block;
		width: 100%;
	}

	#scsmm-wrap .scsmm-section .form-table th {
		padding: 18px 0 6px;
	}

	#scsmm-wrap .scsmm-section .form-table td {
		padding: 0 0 18px;
	}

	#scsmm-wrap .scsmm-savebar {
		bottom: 8px;
	}
}

#scsmm-wrap .description label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-left: 12px;
}

#scsmm-wrap input[type="checkbox"]:not(.scsmm-switch) {
	width: 16px;
	height: 16px;
	margin: 0;
}

#scsmm-wrap .btn-secondary,
#scsmm-wrap .btn-outline-secondary {
	padding: 7px 16px;
	font-size: 13px;
	font-weight: 500;
	color: var(--scsmm-text);
	background: #fff;
	border: 1px solid #d5dbe5;
	border-radius: 10px;
	box-shadow: none;
}

#scsmm-wrap .btn-secondary:hover,
#scsmm-wrap .btn-outline-secondary:hover {
	color: var(--scsmm-ink);
	background: #f8fafc;
	border-color: #b8c2d3;
}

@media (max-width: 782px) {
	#scsmm-wrap .scsmm-savebar-note {
		display: none;
	}

	#scsmm-wrap .scsmm-brand {
		flex-wrap: wrap;
	}
}
