/* WooCommerce Checkout Terms Modal */

body.wcctm-modal-open {
	overflow: hidden;
}

.wcctm-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	box-sizing: border-box;
}

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

.wcctm-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	cursor: pointer;
}

.wcctm-modal__panel {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 42rem;
	max-height: min(90vh, 40rem);
	background: #fff;
	color: #1a1a1a;
	border-radius: 4px;
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
	outline: none;
}

@media (prefers-reduced-motion: no-preference) {
	.wcctm-modal__panel {
		animation: wcctm-modal-in 0.2s ease-out;
	}

	@keyframes wcctm-modal-in {
		from {
			opacity: 0;
			transform: translateY(8px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
}

.wcctm-modal__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1rem 0.5rem;
	border-bottom: 1px solid #e0e0e0;
	flex-shrink: 0;
}

.wcctm-modal__title {
	margin: 0;
	font-size: 1.25rem;
	line-height: 1.3;
	font-weight: 600;
}

.wcctm-modal__close {
	flex-shrink: 0;
	margin: 0;
	padding: 0.25rem 0.5rem;
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
	color: #444;
	border-radius: 2px;
}

.wcctm-modal__close:hover {
	color: #000;
}

.wcctm-modal__close:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

.wcctm-modal__scroll {
	flex: 1 1 auto;
	min-height: 0;
	overflow: auto;
	padding: 1rem 1.25rem;
	-webkit-overflow-scrolling: touch;
}

.wcctm-modal__scroll .woocommerce-terms-and-conditions {
	max-height: none !important;
	overflow: visible !important;
}

.wcctm-modal__empty {
	margin: 0;
	color: #666;
}

.wcctm-modal__footer {
	flex-shrink: 0;
	padding: 1rem 1.25rem 1.25rem;
	border-top: 1px solid #e0e0e0;
}

.wcctm-modal__agree {
	width: 100%;
}

.wcctm-modal__agree:focus {
	outline: 2px solid currentColor;
	outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
	.wcctm-modal__panel {
		animation: none;
	}
}

/* Hide WooCommerce checkout privacy policy text */
.woocommerce-privacy-policy-text {
	display: none !important;
}
