/**
 * Tariff list widget — front-end styles.
 *
 * Deliberately minimal: colours, spacing and typography are driven by the
 * widget's Elementor style controls so the site's own design wins.
 */

.rpmew-tariffs {
	width: 100%;
}

.rpmew-tariff-panel {
	margin-top: 16px;
}

.rpmew-tariff-panel[hidden] {
	display: none;
}

.rpmew-panel-title {
	margin: 0 0 12px;
}

.rpmew-tariff-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rpmew-tariff-item {
	margin: 0;
}

.rpmew-tariff-item + .rpmew-tariff-item {
	border-top: 1px solid rgba(255, 255, 255, .12);
}

.rpmew-tariff-link {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: 100%;
	padding: 14px 8px;
	background: none;
	border: 0;
	border-radius: 4px;
	color: inherit;
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}

.rpmew-tariff-icon {
	flex: 0 0 auto;
	opacity: .6;
	transition: transform .15s ease;
}

.rpmew-tariff-link:hover .rpmew-tariff-icon {
	transform: translateX(3px);
}

.rpmew-tariff-empty {
	margin: 0;
	opacity: .7;
}

/* Details are storage for the modal, never shown inline. */
.rpmew-tariff-details[hidden] {
	display: none;
}

/* ---------- modal ---------- */

.rpmew-modal-backdrop {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background-color: rgba(0, 0, 0, .7);
	animation: rpmew-fade .18s ease-out;
}

.rpmew-modal-backdrop[hidden] {
	display: none;
}

@keyframes rpmew-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

.rpmew-modal-box {
	position: relative;
	width: 100%;
	max-width: 640px;
	max-height: 85vh;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 28px;
	border-radius: 10px;
	background: #fff;
	color: #1d2327;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.rpmew-modal-box:focus {
	outline: none;
}

.rpmew-modal-close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 34px;
	height: 34px;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 50%;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	opacity: .6;
	transition: opacity .15s ease, background-color .15s ease;
}

.rpmew-modal-close:hover {
	opacity: 1;
	background-color: rgba(0, 0, 0, .07);
}

.rpmew-modal-title {
	margin: 0 34px 16px 0;
	font-size: 1.25em;
	line-height: 1.3;
}

.rpmew-modal-content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 12px;
}

.rpmew-modal-content th,
.rpmew-modal-content td {
	padding: 8px 10px;
	border: 1px solid rgba(0, 0, 0, .12);
	text-align: left;
	vertical-align: top;
}

.rpmew-modal-content > :last-child {
	margin-bottom: 0;
}

/* Stop the page scrolling behind an open modal. */
body.rpmew-modal-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.rpmew-modal-box {
		padding: 20px;
		max-height: 90vh;
	}
}
