/* Overlay background to cover the page */
.ratepayment-modal-bg {
	position: fixed;
	top: 0;
	bottom: 0;
	left: 0;
	right: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0; /* Start fully transparent */
	display: none;
	z-index: 50;
	overflow-y: auto;
	transition: opacity 0.2s;
}

/* Class for making the modal visible */
.ratepayment-modal-bg.visible {
	display: block;
	opacity: 1;
}

/* The base of the modal itself */
.ratepayment-modal {
	padding: 10px 20px 20px;
	background: #ffffff;
	border-radius: 5px;
	position: absolute;
	top: 150px;
	left: 50%;
	transform: translateX(-50%);
	width: 600px;
	min-width: 350px;
	min-height: 200px;
}

/* The title container, for title and close button */
.ratepayment-modal .ratepayment-modal-title-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

/* Styling for the title of the modal */
.ratepayment-modal-title-container .ratepayment-title {
	margin: 0;
	text-align: center;
	flex-grow: 1;
	padding-left: 35px;
	color: #000000;
	font-size: 18px;
	font-weight: 600;
}

/* Styling for the close button of the modal */
.ratepayment-modal-title-container .close-button {
	border: none;
	background: none;
	font-size: 35px;
	cursor: pointer;
	width: 35px;
	color: #000000;
}

/* Wrapper for the "selector" of the modal */
.ratepayment-modal .selector-wrapper {
	text-align: center;
	margin-bottom: 10px;
}

/* The container for the buttons in the selector */
.ratepayment-modal .selector {
	position: relative;
	display: inline-flex;
	justify-content: center;
	background: #e0e0e0;
	box-shadow: inset 0 0 5px #d9d9d9;
	border-radius: 10px;
	padding-bottom: 2px;
}

/* The slider behind the buttons in the selector */
.ratepayment-modal .selector-slider {
	position: absolute;
	height: 85%;
	border-radius: 8px;
	margin: 3px !important;
	padding: 5px 15px;
	background: #ffffff;
	transition: left 0.3s ease, width 0.3s ease;
	z-index: 1;
}

/* Styling for the buttons in the selector */
.ratepayment-modal .selector-button {
	padding: 5px 15px;
	background: transparent;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	margin: 3px !important;
	color: #000000;
	position: relative;
	z-index: 2;
	-webkit-tap-highlight-color: transparent;
}

/* Seperator between the upper section and content of the modal */
.ratepayment-modal .separator {
	border: 0;
	border-top: 1px solid #ccc;
	margin: 10px 0;
}

/* ViaBill normally appends a full-page modal directly to body. Inno7 mounts
 * that same component in its own modal while keeping the PriceTag invisible. */
.ratepayment-modal .inno7-viabill-pricetag-anchor + .viabill-pricetag-wrap {
	display: none;
}

/* Reserve the iframe's final footprint before ViaBill finishes loading. This
 * prevents the Ratepayment modal from animating to zero height first. */
.ratepayment-modal .modal-content--viabill {
	min-height: min(70vh, 730px);
}

.ratepayment-modal .inno7-viabill-details-mount #vbpt-scope.inno7-viabill-details {
	position: relative;
	width: 100%;
	height: min(70vh, 730px);
	background: transparent;
	z-index: auto;
}

.ratepayment-modal .inno7-viabill-details-mount #vbpt-scope.inno7-viabill-details .vbpt-modal__wrapper {
	position: relative !important;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	max-height: none;
	margin: 0;
	border-radius: 0;
}

.ratepayment-modal .inno7-viabill-details-mount #vbpt-scope.inno7-viabill-details .vbpt-modal-loader {
	position: absolute;
}

/* Mobile Support */
@media (max-width: 768px) {
	.ratepayment-modal {
		width: 95%;
		top: 100px;
	}
}
