/* Main container for logos */
.esto-pay-logos {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	margin-bottom: 20px;
}

/* Country containers as flex containers */
.esto-pay-logos__country {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	width: 100%;
}

/* Dynamic column layouts with better scaling */
.esto-pay-logos-layout-columns-1 .esto-pay-logo {
	flex: 0 1 100%;
}

.esto-pay-logos-layout-columns-2 .esto-pay-logo {
	flex: 0 1 calc(50% - 20px);
}

.esto-pay-logos-layout-columns-3 .esto-pay-logo {
	flex: 0 1 calc(33.333% - 20px);
	min-width: 140px;
}

/* Ensure Logos Stay Properly Sized */
.esto-pay-logo img {
	min-height: 75px;
	max-height: 100px;
	max-width: 90%;
	object-fit: contain;
}

/* Default Logo Styling */
.esto-pay-logo {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	padding: 15px;
	border: 2px solid transparent;
	border-radius: 8px;
	background-color: #ffffff;
	text-align: center;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
	transition: border-color 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
	cursor: pointer;
	height: auto;
	min-height: 100px;
}

/* Hover and selected effects */
.esto-pay-logo.selected {
	border-color: #004080;
	background-color: #e6f0ff;
	box-shadow: 0 4px 10px rgba(0, 64, 128, 0.5);
}

.esto-pay-logo:hover {
	border-color: #004080;
	background-color: #f0f8ff;
	box-shadow: 0 3px 8px rgba(0, 64, 128, 0.3);
}

/* Adjustments for mobile view */
@media (max-width: 768px) {
	.esto-pay-logo {
		padding: 20px;
	}

	.esto-pay-logo img {
		min-height: 80px;
		max-height: 110px;
	}

	.esto-pay-logos-layout-columns-2 .esto-pay-logo {
		flex: 0 1 100%;
	}

	.esto-pay-logos-layout-columns-3 .esto-pay-logo {
		flex: 0 1 calc(50% - 20px);
	}
}

/* Esto Pay logo dimensions */
label[for="payment_method_esto_pay"] img,
label[for="payment_method_esto_card"] img,
label[for="payment_method_esto"] img,
label[for="payment_method_esto_x"] img,
label[for="payment_method_pay_later"] img {
	height: 25px !important;
}

/* Country selection */
.esto-pay-countries {
	appearance: none;
	background-color: #f8f9fa;
	border: 2px solid #ddd;
	border-radius: 8px;
	padding: 1px 10px;
	font-size: 16px;
	color: #333;
	cursor: pointer;
	outline: none;
	transition: all 0.3s ease-in-out;
	width: 140px;
	margin-top: 20px;
	margin-bottom: 20px;
	display: block;
}

/* Add a custom dropdown arrow */
.esto-pay-countries {
	background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="20" height="20" fill="%23333"><path d="M7 10l5 5 5-5z"></path></svg>');
	background-repeat: no-repeat;
	background-position: right 15px center;
	background-size: 16px;
	padding-right: 35px;
}

/* Hover Effect */
.esto-pay-countries:hover {
	border-color: #007bff;
}

/* Focus Effect */
.esto-pay-countries:focus {
	border-color: #007bff;
	box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

/* Style for disabled state */
.esto-pay-countries:disabled {
	background-color: #e9ecef;
	cursor: not-allowed;
	opacity: 0.6;
}
