/**
 * Slotify Staff Editor – professional tabbed UI, cards, chips.
 * Used only on slotify_staff edit (post.php / post-new.php).
 */

/* ---- Wrapper ---- */
.slotify-staff-editor {
	max-width: 760px;
	margin: 0 0 1.5rem;
	font-size: 14px;
}

/* ---- Tabs ---- */
.slotify-staff-editor__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem;
	margin: 0 0 1.25rem;
	padding: 0;
	list-style: none;
	border-bottom: 1px solid #dcdcde;
}

.slotify-staff-editor__tab {
	margin: 0;
	padding: 0.65rem 1rem;
	font-weight: 600;
	font-size: 13px;
	color: #50575e;
	background: transparent;
	border: 1px solid transparent;
	border-radius: 4px 4px 0 0;
	cursor: pointer;
	transition: color 0.15s ease, background 0.15s ease;
}

.slotify-staff-editor__tab:hover {
	color: #1d2327;
	background: #f6f7f7;
}

.slotify-staff-editor__tab.is-active {
	color: #2271b1;
	background: #fff;
	border-color: #dcdcde;
	border-bottom-color: #fff;
	margin-bottom: -1px;
}

/* ---- Panels ---- */
.slotify-staff-editor__panel {
	display: none;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.slotify-staff-editor__panel.is-active {
	display: block;
}

.slotify-staff-editor__panel-inner {
	padding: 1.25rem 1.5rem;
}

/* ---- Photo panel ---- */
.slotify-staff-editor__photo-preview {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	margin-bottom: 1rem;
	min-height: 120px;
	padding: 1rem;
	background: #f9fafb;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
}

.slotify-staff-editor__photo-preview img {
	max-width: 140px;
	max-height: 140px;
	width: auto;
	height: auto;
	border-radius: 8px;
	object-fit: cover;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.slotify-staff-editor__panel-inner > p:first-of-type {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	margin: 0 0 0.5rem;
}

.slotify-staff-editor__panel-inner .slotify-help {
	margin-top: 0.5rem;
	font-size: 13px;
	color: #646970;
	line-height: 1.45;
}

/* ---- Card per day (Schedule / Breaks) ---- */
.slotify-staff-editor__day {
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	margin-bottom: 0.75rem;
	overflow: hidden;
}

.slotify-staff-editor__day-header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 1rem;
	border-bottom: 1px solid #e5e7eb;
	background: #fff;
	font-weight: 600;
	font-size: 13px;
	color: #1d2327;
}

.slotify-staff-editor__day-title {
	min-width: 4.5rem;
}

.slotify-staff-editor__day-working {
	margin: 0;
	font-size: 12px;
	color: #646970;
	font-weight: 500;
}

.slotify-staff-editor__day-body {
	padding: 0.85rem 1rem;
	background: #fff;
}

.slotify-staff-editor__day-body.is-empty {
	padding: 0.6rem 1rem;
	color: #646970;
	font-size: 13px;
	font-style: italic;
}

/* Time range row */
.slotify-staff-editor__range {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 0.5rem;
}

.slotify-staff-editor__range:last-child {
	margin-bottom: 0;
}

.slotify-staff-editor__range input[type="time"] {
	padding: 6px 10px;
	font-size: 13px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
}

.slotify-staff-editor__range input[type="time"]:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.slotify-staff-editor__range-remove {
	padding: 5px 10px;
	font-size: 12px;
	color: #b32d2e;
	background: transparent;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.slotify-staff-editor__range-remove:hover {
	background: #fcf0f1;
	border-color: #b32d2e;
	color: #b32d2e;
}

.slotify-staff-editor__add-range {
	margin-top: 0.6rem;
}

.slotify-staff-editor__add-range button {
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.slotify-staff-editor__add-range button:hover {
	background: #135e96;
}

/* Copy Monday to all */
.slotify-staff-editor__copy-mon {
	margin-bottom: 1rem;
}

.slotify-staff-editor__copy-mon button {
	padding: 6px 14px;
	font-size: 13px;
	font-weight: 500;
	background: #f6f7f7;
	color: #1d2327;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.slotify-staff-editor__copy-mon button:hover {
	background: #f0f0f1;
	border-color: #8c8f94;
}

/* ---- Days Off: date input + chips ---- */
.slotify-staff-editor__days-off-add {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 1.25rem;
	flex-wrap: wrap;
}

.slotify-staff-editor__days-off-add input[type="date"] {
	padding: 8px 12px;
	font-size: 14px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	background: #fff;
}

.slotify-staff-editor__days-off-add input[type="date"]:focus {
	border-color: #2271b1;
	outline: none;
}

.slotify-staff-editor__days-off-add button {
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 500;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.slotify-staff-editor__days-off-add button:hover {
	background: #135e96;
}

/* Chips */
.slotify-staff-editor__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.slotify-staff-editor__chip {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.45rem 0.75rem;
	font-size: 13px;
	background: #eff6ff;
	color: #1d4ed8;
	border: 1px solid #bfdbfe;
	border-radius: 6px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.slotify-staff-editor__chip-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	padding: 0;
	font-size: 14px;
	line-height: 1;
	color: #1d4ed8;
	background: transparent;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.slotify-staff-editor__chip-remove:hover {
	background: #bfdbfe;
	color: #1e40af;
}

/* ---- Services ---- */
.slotify-staff-editor__allow-all {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.25rem;
	padding: 0.75rem 1rem;
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 6px;
}

.slotify-staff-editor__allow-all input {
	margin: 0;
	width: 18px;
	height: 18px;
}

.slotify-staff-editor__allow-all label {
	font-weight: 600;
	font-size: 14px;
	color: #1d2327;
	cursor: pointer;
}

.slotify-staff-editor__services-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 0.6rem 1.25rem;
}

.slotify-staff-editor__services-grid label {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 14px;
	color: #1d2327;
	cursor: pointer;
	padding: 0.5rem 0.75rem;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 6px;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.slotify-staff-editor__services-grid label:hover {
	background: #f3f4f6;
	border-color: #d1d5db;
}

.slotify-staff-editor__services-grid input[type="checkbox"] {
	margin: 0;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.slotify-staff-editor__services-grid.is-disabled {
	opacity: 0.55;
	pointer-events: none;
}

/* ---- Priority ---- */
.slotify-staff-editor__panel[data-panel="priority"] .slotify-help {
	margin-bottom: 1rem;
	font-size: 13px;
	color: #646970;
	line-height: 1.45;
}

.slotify-staff-editor__priority-row {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
	padding: 1rem;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
}

.slotify-staff-editor__priority-row input[type="number"] {
	width: 88px;
	padding: 8px 12px;
	font-size: 15px;
	font-weight: 600;
	border: 1px solid #8c8f94;
	border-radius: 6px;
	background: #fff;
}

.slotify-staff-editor__priority-row input[type="number"]:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.slotify-staff-editor__priority-slider-wrap {
	flex: 1;
	min-width: 200px;
	max-width: 340px;
}

.slotify-staff-editor__priority-slider-wrap input[type="range"] {
	width: 100%;
	height: 8px;
	border-radius: 4px;
}

.slotify-staff-editor__priority-value {
	font-weight: 700;
	font-size: 16px;
	color: #1d2327;
	min-width: 2.5rem;
	text-align: right;
}

/* ---- Advanced / Raw JSON ---- */
.slotify-staff-editor__advanced {
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid #c3c4c7;
}

.slotify-staff-editor__advanced-toggle {
	background: none;
	border: none;
	color: #2271b1;
	font-size: 12px;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
}

.slotify-staff-editor__advanced-toggle:hover {
	color: #135e96;
}

.slotify-staff-editor__advanced-content {
	display: none;
	margin-top: 0.75rem;
}

.slotify-staff-editor__advanced-content.is-open {
	display: block;
}

.slotify-staff-editor__advanced-content textarea {
	width: 100%;
	min-height: 80px;
	font-family: monospace;
	font-size: 12px;
	padding: 8px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	display: block;
	margin-bottom: 0.5rem;
}

.slotify-staff-editor__advanced-content label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #50575e;
	margin-bottom: 0.25rem;
}

/* ---- Hidden fields (kept for form submit) ---- */
.slotify-staff-editor__hidden {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

/* ---- Validation message (only shown when it has content) ---- */
.slotify-staff-editor__error {
	display: none;
	margin-top: 0.5rem;
	padding: 0.5rem 0.75rem;
	font-size: 12px;
	background: #fcf0f1;
	color: #b32d2e;
	border: 1px solid #f1aeb5;
	border-radius: 4px;
}

.slotify-staff-editor__error:empty {
	display: none !important;
}

.slotify-staff-editor__error.is-visible:not(:empty) {
	display: block;
}
