/* Dynamic price rules (discount codes) */
.dynamic-price-rules {
	margin-top: 24px;
	padding: 0;
	background: #fafafa;
	border-radius: 8px;
	border: 1px solid rgba(0, 0, 0, 0.08);
	overflow: hidden;
}
.dynamic-price-rules-header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 20px;
	font-weight: 600;
	font-size: 15px;
	color: #333;
	background: transparent;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.dynamic-price-rules-header .mdi {
	font-size: 22px;
	color: #ca064d;
}
.dynamic-price-section {
	padding: 0 20px 16px;
}
.dynamic-price-rules > .dynamic-price-section ~ .dynamic-price-section {
	margin-top: 4px;
	border-top: 1px solid rgba(202, 6, 77, 0.28);
}
.dynamic-price-section-title {
	display: flex;
	align-items: center;
	gap: 8px;
	width: calc(100% + 40px);
	box-sizing: border-box;
	margin: 0 -20px 12px;
	padding: 10px 20px;
	background: rgba(202, 6, 77, 0.08);
	border-radius: 0;
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.01em;
	color: #ca064d;
}
.dynamic-price-section-title .mdi {
	font-size: 20px;
	color: #ca064d;
}
.dynamic-price-hint {
	margin: 0 0 12px 0 !important;
	font-size: 12px;
	line-height: 1.4;
	color: rgba(0, 0, 0, 0.6);
}
.dynamic-price-subsection {
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px dashed rgba(0, 0, 0, 0.08);
}
.dynamic-price-subsection:first-of-type {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}
.dynamic-price-label {
	display: block;
	margin-bottom: 6px;
	font-weight: 500;
	font-size: 13px;
	color: #555;
}
.dynamic-price-days-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin-bottom: 6px;
}
.dynamic-price-day-item {
	margin: 0;
}
.dynamic-price-date-add-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}
.dynamic-price-date-input {
	margin: 0 !important;
	min-width: 220px;
	flex: 0 1 280px;
}
.dynamic-price-date-input .md-errors-spacer {
	display: none;
}
.dynamic-price-date-add-btn {
	margin: 0 !important;
	align-self: center;
}
.dynamic-price-dates-wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 10px;
}
.dynamic-price-trips-picker {
	margin-top: 8px;
}
.dynamic-price-trips-list {
	max-height: 220px;
	overflow-y: auto;
	padding: 8px 12px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 6px;
}
.dynamic-price-trip-item {
	margin: 2px 0;
}
.dynamic-price-trip-item .md-label {
	white-space: normal;
	line-height: 1.35;
}
.dynamic-price-trip-time {
	font-weight: 700;
	margin-right: 8px;
}
.dynamic-price-trip-od {
	margin-right: 8px;
}
.dynamic-price-trip-meta,
.dynamic-price-trip-id {
	color: rgba(0, 0, 0, 0.55);
	font-size: 12px;
	margin-right: 6px;
}
.dynamic-price-trips-selected {
	margin-top: 12px;
}
.dynamic-price-holidays-footer {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px dashed rgba(0, 0, 0, 0.08);
}
.dynamic-price-holidays-footer .dynamic-price-hint {
	margin-top: 8px !important;
	margin-bottom: 0 !important;
}
.dynamic-price-date-chip {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	background: #fff;
	border: 1px solid rgba(202, 6, 77, 0.25);
	border-radius: 16px;
	font-size: 13px;
	color: #333;
}
.dynamic-price-date-chip .mdi {
	font-size: 16px;
	color: #ca064d;
}
.dynamic-price-row {
	margin-top: 4px;
}

/* Dynamic price conditions in list table */
.dynamic-price-table-conditions {
	margin-top: 8px;
	padding: 8px 10px;
	background: rgba(202, 6, 77, 0.05);
	border-radius: 6px;
	border-left: 3px solid #ca064d;
}
.dynamic-price-conditions-header {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #ca064d;
	margin-bottom: 6px;
}
.dynamic-price-conditions-header .mdi {
	font-size: 16px;
}
.dynamic-price-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
}
.dynamic-price-chip {
	display: inline-flex;
	align-items: center;
	gap: 4px 6px;
	padding: 3px 8px;
	background: #fff;
	border-radius: 4px;
	font-size: 11px;
	line-height: 1.3;
	box-shadow: 0 1px 2px rgba(0,0,0,0.06);
	border: 1px solid rgba(0,0,0,0.06);
}
.dynamic-price-chip .mdi {
	font-size: 14px;
	color: #ca064d;
	opacity: 0.85;
}
.dynamic-price-chip-label {
	color: rgba(0,0,0,0.55);
	white-space: nowrap;
}
.dynamic-price-chip-value {
	font-weight: 600;
	color: #333;
}
.dynamic-price-chip.dynamic-price-chip-empty {
	background: transparent;
	box-shadow: none;
	border: none;
	color: rgba(0,0,0,0.45);
	font-style: italic;
}
.dynamic-price-chip.dynamic-price-chip-empty .mdi {
	display: none;
}
.dynamic-price-table-conditions .departure-time-only {
	font-variant-numeric: tabular-nums;
}

/* Badge add/sub in colonna discount (dynamic price) */
.discount-type-badge {
	display: inline-block;
	min-width: 1.4em;
	height: 1.4em;
	line-height: 1.35;
	text-align: center;
	font-weight: 700;
	font-size: 14px;
	border-radius: 4px;
	margin-right: 6px;
}
.discount-type-badge.discount-type-add {
	background: rgba(76, 175, 80, 0.2);
	color: #2e7d32;
}
.discount-type-badge.discount-type-sub {
	background: rgba(244, 67, 54, 0.2);
	color: #c62828;
}

/* Fascia partenza: solo ora, senza data */
.departure-time-only {
	display: inline-block;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
	letter-spacing: 0.02em;
}

.chart-selected-codes {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 0 5px 8px;
}
.chart-selected-codes .dynamic-price-chip {
	cursor: default;
}
.chart-selected-codes .mdi-close {
	cursor: pointer;
	font-size: 16px;
	margin-left: 2px;
}
.chart-income-positive {
	color: #2e7d32;
}
.chart-income-negative {
	color: #c62828;
}

/* md-select menu is teleported outside the page; style via md-container-class */
.md-select-menu-container.discountCodesChartSelect md-content {
	max-height: 360px;
}
.md-select-menu-container.discountCodesChartSelect .chart-code-search {
	display: block;
	position: sticky;
	top: 0;
	z-index: 2;
	padding: 8px 10px 6px;
	background: #fff;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.md-select-menu-container.discountCodesChartSelect .chart-code-search-input {
	width: 100%;
	box-sizing: border-box;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 4px;
	padding: 6px 8px;
	font-size: 13px;
	outline: none;
	background: transparent;
}
.md-select-menu-container.discountCodesChartSelect .chart-code-search-input:focus {
	border-color: #ca064d;
}
.md-select-menu-container.discountCodesChartSelect .chart-code-search-empty {
	color: rgba(0, 0, 0, 0.54);
	font-size: 13px;
}
