/* Base styles for payment options */
.wc-block-components-radio-control {
	position: relative;
	max-height: 120px;
	overflow: hidden;
	transition: max-height 0.3s ease;
}

.wc-block-components-radio-control.expanded {
	max-height: 100%;
}

.wc-block-components-radio-control-accordion-option {
	padding: 0 24px 0 0 !important;
	/* Reduced padding for compactness */
	border: 1px solid #e2e8f0;
	margin-bottom: 6px;
	/* Reduced margin for compactness */
	border-radius: 8px;
	background: white;
	cursor: pointer;
	transition: all 0.2s ease;
}

.wc-block-components-radio-control-accordion-option:hover {
	background: #f8fafc;
}

/* Show more button */
.show-more-button {
	width: 100%;
	padding: 0;
	color: var(--wp--preset--color--custom-primary);
	border: none;
	background: transparent;
	border-radius: 8px;
	font-size: 1rem;
	font-family: inherit;
	cursor: pointer;
	margin-top: 0;
	font-weight: 500;
	transition: background 0.2s ease;
	margin-bottom: 0;
	/* float: right; */
	float: right;
	text-align: right;
	margin-top: -22px;
}

/* Bottom-Aligned Modal styles */
.payment-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1000;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.payment-modal.active {
	visibility: visible;
	opacity: 1;
}

.modal-content {
	position: fixed;
	bottom: -100%;
	max-width: 480px;
	box-sizing: border-box;
	margin: 0 auto;
	right: 0;
	left: 0;
	width: clamp(360px, 100vw, 480px);
	max-height: 90vh;
	background: white;
	padding: 16px;
	border-radius: 6px 6px 0 0;
	overflow-y: auto;
	transition: bottom 0.3s ease;
}

.payment-modal.active .modal-content {
	bottom: 0;
	/* Stick to the bottom of the screen */
}

.modal-header {
	position: sticky;
	top: 0;
	background: white;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
	/* Reduced margin for compactness */
	padding-bottom: 12px;
	/* Reduced padding for compactness */
	border-bottom: 1px solid #e2e8f0;
	z-index: 1;
}

.modal-title {
	font-size: 1.1rem;
	font-weight: 600;
	margin: 0;
}

.close-modal {
	background: none;
	border: none;
	font-size: 1.5rem;
	cursor: pointer;
	color: #64748b;
	padding: 8px;
	margin: -8px;
	line-height: 1;
}

.close-modal:hover {
	color: #334155;
}

/* Hide all payment options except first one in main view */
.wc-block-components-radio-control>.wc-block-components-radio-control-accordion-option:not(:first-child) {
	display: none;
}

.wc-block-components-radio-control.expanded>.wc-block-components-radio-control-accordion-option {
	display: block;
}

/* Responsive adjustments */
/* @media (min-width: 768px) {
  .modal-content {
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 440px;
  }
} */

/* Animation for backdrop */
.payment-modal::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.3s ease;
}

.payment-modal.active::before {
	opacity: 1;
}

.modal-content .wc-block-components-radio-control__label img {
	height: 24px;
	max-width: 100% !important;
}


.wc-block-checkout__payment-method .wc-block-components-radio-control__option {
	padding-left: 0 !important;
}

.wc-block-checkout__payment-method .wc-block-components-radio-control__option .wc-block-components-radio-control__input {
	display: none;
}

.wc-block-components-radio-control-accordion-option.wc-block-components-radio-control-accordion-option--checked-option-highlighted {
	box-shadow: none;
}

.wc-block-components-checkout-step__content label.wc-block-components-radio-control__option.wc-block-components-radio-control__option-checked {
	padding: 4px 0 !important;
}

.wc-block-components-radio-control-accordion-option:hover {
	border: 1px solid var(--wp--preset--color--custom-primary);
	background: #fff;
}

.wc-block-components-radio-control__option-layout {
	padding: 12px;
}