/* ===================================================================
   ROLE PRICING - ADMIN STYLES
   Follows SMT Toolkit design system (smt-card, smt-toggle, #5e5df0)
=================================================================== */

/* Layout: sidebar + editor */
.smt-rp-layout {
	display: grid;
	grid-template-columns: 280px 1fr;
	gap: 24px;
	align-items: start;
}

/* ---------------------------------------------------------------
   SIDEBAR
--------------------------------------------------------------- */

.smt-rp-sidebar .smt-card-title h3 {
	margin-bottom: 0;
}

.smt-rp-role-list {
	list-style: none;
	margin: 16px 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.smt-rp-role-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border-radius: 10px;
	border: 1px solid #e5e5ec;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s;
	background: #fafafa;
}

.smt-rp-role-item:hover {
	background: #f0f0fa;
	border-color: #c9c9e0;
}

.smt-rp-role-item.active {
	background: #eeeeff;
	border-color: #5e5df0;
}

.smt-rp-role-label {
	font-size: 14px;
	font-weight: 500;
	color: #222;
}

.smt-rp-role-badge {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 20px;
	letter-spacing: 0.3px;
}

.smt-rp-badge-percent {
	background: #e8f5e9;
	color: #2e7d32;
}

.smt-rp-badge-fixed {
	background: #e3f2fd;
	color: #1565c0;
}

.smt-rp-empty {
	font-size: 13px;
	color: #999;
	padding: 10px 0;
}

.smt-rp-add-btn {
	width: 100%;
	justify-content: center;
}

/* ---------------------------------------------------------------
   EDITOR
--------------------------------------------------------------- */

.smt-rp-editor .smt-card-title {
	margin-bottom: 24px;
}

.smt-rp-editor .smt-card-title h3 {
	font-size: 18px;
}

/* Fields */
.smt-rp-field {
	margin-bottom: 20px;
}

.smt-rp-field label {
	display: block;
	font-weight: 600;
	font-size: 13px;
	margin-bottom: 6px;
	color: #333;
}

.smt-rp-field input[type="text"],
.smt-rp-field input[type="number"],
.smt-rp-field select {
	width: 100%;
	max-width: 400px;
}

.smt-rp-field .description {
	margin-top: 5px;
	font-size: 12px;
	color: #777;
}

/* Row (toggle + label inline) */
.smt-rp-field-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
}

.smt-rp-field-row label:first-child {
	margin-bottom: 0;
	min-width: 180px;
}

.smt-rp-field-row .description {
	flex-basis: 100%;
	margin-top: 2px;
}

/* Price type switcher */
.smt-rp-type-switcher {
	display: flex;
	gap: 12px;
}

.smt-rp-type-opt {
	display: flex !important;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border: 1px solid #ddd;
	border-radius: 8px;
	cursor: pointer;
	background: #fafafa;
	transition: all 0.2s;
	font-weight: 500 !important;
	margin-bottom: 0 !important;
}

.smt-rp-type-opt:has(input:checked) {
	border-color: #5e5df0;
	background: #eeeeff;
	color: #5e5df0;
}

/* Slider */
.smt-rp-slider-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
}

.smt-rp-slider-wrap input[type="range"] {
	flex: 1;
	max-width: 220px;
}

.smt-rp-slider-wrap input[type="number"] {
	width: 70px !important;
}

/* Actions */
.smt-rp-editor-actions {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid #eee;
}

/* ---------------------------------------------------------------
   EMPTY STATE
--------------------------------------------------------------- */

.smt-rp-empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 200px;
	color: #aaa;
	text-align: center;
}

.smt-rp-empty-icon {
	font-size: 48px !important;
	margin-bottom: 12px;
	opacity: 0.4;
}

/* ---------------------------------------------------------------
   PRODUCT PAGE - ROLE FIELDS
--------------------------------------------------------------- */

.smt-rp-product-section {
	border-top: 1px solid #eee;
	padding-top: 10px;
}

.smt-rp-product-heading {
	padding: 10px 12px 0 12px;
	font-size: 13px;
	color: #5e5df0;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

/* Variation fields */
.smt-rp-variation-section {
	border-top: 1px dashed #ddd;
	padding-top: 8px;
	margin-top: 8px;
}

.smt-rp-variation-heading {
	color: #5e5df0;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	margin-bottom: 4px !important;
}

.smt-rp-var-field {
	margin-bottom: 8px;
}

.smt-rp-var-field label {
	font-size: 12px;
	color: #555;
}

.smt-rp-var-field input[readonly] {
	background: #f5f5f5;
	color: #888;
	cursor: not-allowed;
}

/* ---------------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------------- */

@media (max-width: 900px) {
	.smt-rp-layout {
		grid-template-columns: 1fr;
	}
}

/* ---------------------------------------------------------------
   CREATE ROLE SECTION
--------------------------------------------------------------- */

.smt-rp-create-role-card {
	margin-top: 28px;
}

.smt-rp-create-role-form {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 24px;
	align-items: start;
}

.smt-rp-create-role-form .smt-rp-field {
	margin-bottom: 16px;
}

.smt-rp-create-actions {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 12px;
	padding-top: 4px;
}

/* Custom roles list */
.smt-rp-custom-roles-list {
	grid-column: 1 / -1;
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #eee;
}

.smt-rp-custom-roles-list h4 {
	font-size: 13px;
	font-weight: 600;
	color: #555;
	text-transform: uppercase;
	letter-spacing: 0.4px;
	margin: 0 0 10px 0;
}

.smt-rp-custom-roles-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.smt-rp-custom-roles-list li {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 12px;
	background: #f9f9ff;
	border: 1px solid #e5e5ec;
	border-radius: 8px;
	font-size: 13px;
}

.smt-rp-custom-roles-list li code {
	background: #eee;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
	color: #555;
}

.smt-rp-remove-role-btn {
	margin-left: auto;
	font-size: 12px;
}

/* ---------------------------------------------------------------
   CSV IMPORT HINT
--------------------------------------------------------------- */

.smt-rp-csv-hint {
	margin-top: 20px;
	padding: 14px 18px;
	background: #f0f4ff;
	border: 1px solid #c5d3ff;
	border-radius: 10px;
	font-size: 13px;
	color: #333;
}

.smt-rp-csv-hint code {
	background: #e0e8ff;
	padding: 2px 6px;
	border-radius: 4px;
	font-size: 12px;
}
/* Locked role display */
.smt-rp-role-locked {
	display: inline-block;
	padding: 5px 12px;
	background: #f0f0f5;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-family: monospace;
	font-size: 13px;
	color: #555;
}
