/* Pricing tables admin (/admin/pricing-tables/) — list badges + sidebar editor.
   Loaded automatically via css_content.php (03_pcadmin glob). */

/* ── list badges ─────────────────────────────────────────────── */

.rd-pricing-tables .rd-sortable-table-row[data-has-row-click-handler="true"] .rd-sortable-table-cell[data-key="Vorschau"] {
	pointer-events: all;
}

.pt-badge {
	display: inline-block;
	border-radius: 12px;
	padding: 2px 10px;
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.pt-badge-active {
	background: #e2f0d3;
	color: #4b7d1f;
}

.pt-badge-scheduled {
	background: #fdeeca;
	color: #9c6f0e;
}

.pt-badge-manual {
	background: #e8eaef;
	color: #6a7386;
}

.pt-usage-locked {
	font-weight: 600;
	white-space: nowrap;
}

.pt-muted {
	color: #8a93a5;
}

.pt-new-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.pt-new-btn .material-icons {
	font-size: 18px;
}

/* ── editor (sidebar content) ────────────────────────────────── */

pc-pricing-table-editor {
	display: block;
}

.pt-editor {
	padding: 18px 22px 24px 22px;
	min-width: 620px;
	max-width: 760px;
	font-size: 14px;
	color: #2c3345;
}

.pt-loading {
	padding: 40px;
	text-align: center;
	color: #8a93a5;
}

.pt-info-banner {
	background: #f1f3f6;
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 13px;
	color: #4a5264;
	margin-bottom: 18px;
}

.pt-locked-banner {
	background: #fdf3e0;
	border-left: 4px solid #e6a817;
	border-radius: 6px;
	padding: 12px 16px;
	font-size: 13px;
	color: #7a5b0d;
	margin-bottom: 18px;
}

.pt-section {
	border: 1px solid #e6eaf0;
	border-radius: 10px;
	padding: 16px 18px;
	margin-bottom: 18px;
}

.pt-section h3 {
	font-size: 15px;
	margin: 0 0 14px 0;
}

.pt-grid2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
}

.pt-label {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	margin-bottom: 5px;
}

.pt-required {
	color: #d04545;
}

.pt-editor input[type="text"],
.pt-editor input[type="date"],
.pt-editor input[type="number"],
.pt-editor select {
	padding: 8px 10px;
	border: 1px solid #ccd2dc;
	border-radius: 6px;
	background: #fff;
	font-size: 13.5px;
	box-sizing: border-box;
}

.pt-editor input[type="text"],
.pt-editor input[type="date"] {
	width: 100%;
}

.pt-editor input:disabled,
.pt-editor select:disabled {
	background: #f2f4f7;
	color: #6a7386;
}

.pt-hint {
	font-size: 12px;
	color: #8a93a5;
	margin-top: 8px;
	line-height: 1.5;
}

/* provider chooser */

.pt-provider-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.pt-provider-option {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	border: 1px solid #ccd2dc;
	border-radius: 6px;
	padding: 6px 10px;
	cursor: pointer;
	font-size: 13px;
	background: #fff;
}

.pt-provider-option.pt-selected {
	border-color: #7cb342;
	background: #f3f9ec;
}

.rd-pricing-table-default {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--rd-spacing-md);
	margin-top: var(--rd-spacing-md);
	padding-top: var(--rd-spacing-md);
	border-top: 1px solid var(--rd-gray-200);
}

/* band matrix */

.pt-band-table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 10px;
}

.pt-band-table th {
	background: #f4f6f9;
	font-size: 12px;
	color: #5b6474;
	padding: 8px;
	border: 1px solid #e6eaf0;
	text-align: left;
}

.pt-band-table td {
	border: 1px solid #e6eaf0;
	padding: 4px 6px;
}

.pt-band-table input[type="number"] {
	width: 92px;
	text-align: right;
}

.pt-band-limit {
	white-space: nowrap;
	font-weight: 600;
	font-size: 12.5px;
}

.pt-band-limit input {
	width: 76px !important;
	text-align: center !important;
	margin-left: 4px;
}

.pt-row-monthly td {
	background: #f4f8fd;
}

.pt-row-perlicense td {
	background: #f7fbf2;
}

.pt-band-remove {
	border: none !important;
	background: #fff !important;
	width: 30px;
}

.pt-icon-btn {
	border: none;
	background: none;
	color: #8a93a5;
	cursor: pointer;
	font-size: 14px;
}

.pt-icon-btn:hover {
	color: #d04545;
}

.pt-chip-btn {
	background: #eef1f5;
	border: 1px dashed #b8c0cd;
	color: #4a5264;
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 12.5px;
	cursor: pointer;
}

.pt-chip-btn:hover {
	background: #e4e9ef;
}

/* errors */

.pt-errors {
	background: #fdecec;
	border-left: 4px solid #d04545;
	border-radius: 6px;
	padding: 10px 14px;
	font-size: 13px;
	color: #8b2f2f;
	margin-bottom: 18px;
}

.pt-errors ul {
	margin: 6px 0 0 0;
	padding-left: 18px;
}

/* footer */

.pt-footer {
	display: flex;
	gap: 10px;
	align-items: center;
	padding-top: 4px;
}

.pt-footer-spacer {
	flex: 1;
}

.pt-btn {
	border: none;
	border-radius: 6px;
	padding: 9px 16px;
	font-size: 14px;
	cursor: pointer;
	background: #eef1f5;
	color: #2c3345;
}

.pt-btn:hover {
	background: #e4e9ef;
}

.pt-btn-primary {
	background: #3f7ec2;
	color: #fff;
}

.pt-btn-primary:hover {
	background: #366fae;
}

.pt-btn-primary:disabled {
	opacity: 0.6;
	cursor: default;
}

.pt-btn-danger {
	background: #f6e2e2;
	color: #a33030;
}

.pt-btn-danger:hover {
	background: #f0d2d2;
}

/* pc-pricing-table-check — "Preisassistent" card directly above Monatlicher Basispreis.
   Card look: tinted background + accent left border, so it reads as guidance next to
   the field it belongs to rather than as another form row. */
.rd-pricing-table-check {
	margin: var(--rd-spacing-xx-sm) 0 var(--rd-spacing-sm);
	padding: var(--rd-spacing-x-sm) var(--rd-spacing-sm);
	background: var(--rd-blue-50);
	border-left: var(--rd-borderwidth-border-focus) solid var(--rd-secondary-active);
	border-radius: var(--rd-borderradius-border-md);
	color: var(--rd-gray-700);
	font-size: var(--rd-fontsize-3);
	line-height: var(--rd-lineheights-1);
}

.rd-ptc-title {
	display: flex;
	align-items: center;
	gap: var(--rd-spacing-xx-sm);
	margin-bottom: var(--rd-spacing-xx-sm);
	color: var(--rd-secondary-active);
	font-weight: var(--rd-fontweights-open-sans-1);
	text-transform: uppercase;
	letter-spacing: var(--rd-letterspacing-1);
	font-size: var(--rd-fontsize-2);
}

.rd-ptc-title .rd-icon-coin-stack::before {
	background-color: var(--rd-secondary-active);
}

.rd-pricing-table-check-head {
	color: var(--rd-gray-700);
}

/* why this table applies, e.g. "· Vertragsbeginn 01.09.2026" */
.rd-ptc-reason {
	color: var(--rd-gray-500);
}

/* the customer does not exist yet - resolution is re-run on save */
.rd-ptc-preliminary {
	display: inline-block;
	margin-left: var(--rd-spacing-xx-sm);
	padding: 0 var(--rd-spacing-xx-sm);
	border-radius: var(--rd-borderradius-border-sm);
	background: var(--rd-warning-50);
	color: var(--rd-warning-900);
}

/* which licence count the price is based on (payer group total, not this facility) */
.rd-ptc-basis {
	color: var(--rd-gray-500);
}

.rd-ptc-recommend {
	margin-top: var(--rd-spacing-xx-sm);
	color: var(--rd-gray-700);
}

.rd-ptc-recommend a {
	color: var(--rd-primary-active);
	font-weight: var(--rd-fontweights-open-sans-1);
}

.rd-pricing-table-check-line {
	display: flex;
	gap: var(--rd-spacing-xx-sm);
	align-items: baseline;
	margin-top: var(--rd-spacing-xx-sm);
}

.rd-ptc-ok {
	color: var(--rd-green-600);
}

.rd-ptc-warn {
	color: var(--rd-warning-900);
	background: var(--rd-warning-50);
	border-radius: var(--rd-borderradius-border-md);
	padding: var(--rd-spacing-xx-sm) var(--rd-spacing-x-sm);
}

.rd-ptc-info {
	color: var(--rd-gray-500);
}

/* quick-set links below the custom "Betrag" field (legacy 15/30% world) */
.adminContractPercentLinks a {
	color: var(--rd-primary-active);
	text-decoration: underline;
	cursor: pointer;
	margin-right: 8px;
}
