/* SWC Product Acceptance Terms — Frontend Styles v1.3.0 */

/* ── Wrapper ───────────────────────────────────────────────── */
.swc-at-wrap {
	margin: 12px 0 16px;
	clear: both;
}

/* ── Trigger link ──────────────────────────────────────────── */
.swc-at-trigger-wrap {
	margin: 0 0 8px;
}

.swc-at-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 0.9em;
	font-weight: 600;
	text-decoration: underline;
	cursor: pointer;
	color: inherit;
}

.swc-at-trigger::before {
	content: "\1F4C4";
	font-style: normal;
}

/* ── Checkbox row ──────────────────────────────────────────── */
.swc-at-checkbox-wrap {
	margin: 0 0 12px;
}

.swc-at-checkbox-wrap label {
	display: inline-flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.9em;
	line-height: 1.5;
	cursor: pointer;
}

.swc-at-checkbox {
	margin-top: 2px;
	flex-shrink: 0;
	accent-color: currentColor;
	width: 16px;
	height: 16px;
}

/* ── Modal overlay ─────────────────────────────────────────── */
/*
 * display is NOT set here — see previous notes.
 * JS sets display:flex to open, display:none to close.
 */
.swc-at-modal {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, 0.6);
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
}

/* ── Modal container ───────────────────────────────────────── */
.swc-at-modal-inner {
	background: #fff;
	width: 100%;
	max-width: 680px;
	max-height: 85vh;
	border-radius: 8px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.25);
	animation: swcAtFadeIn 0.18s ease;
}

@keyframes swcAtFadeIn {
	from { opacity: 0; transform: translateY(-12px); }
	to   { opacity: 1; transform: translateY(0); }
}

/* ── Modal header ──────────────────────────────────────────── */
.swc-at-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: #1d2327;
	color: #fff;
	flex-shrink: 0;
}

.swc-at-modal-title {
	font-weight: 700;
	font-size: 1em;
	line-height: 1.3;
}

/* ── × close button (top right) ────────────────────────────── */
/*
 * Use !important throughout to override any Elementor .cart button
 * rules that bleed into the modal since it sits inside form.cart.
 */
.swc-at-modal-close {
	all: unset !important;
	/* Re-declare flex so it participates in the header's flex row */
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	align-self: center !important;   /* center within the flex row height */
	color: #fff !important;
	font-size: 1.9em !important;
	line-height: 1 !important;
	cursor: pointer !important;
	opacity: 0.75 !important;
	transition: opacity 0.15s !important;
	padding: 0 !important;
	margin: 0 !important;
	background: none !important;
	border: none !important;
	box-shadow: none !important;
	width: auto !important;
	height: auto !important;
	/* Nudge into the correct vertical position after unset */
	vertical-align: middle !important;
	position: relative !important;
	top: 0 !important;
}

.swc-at-modal-close:hover {
	opacity: 1 !important;
}

/* ── Modal body ────────────────────────────────────────────── */
.swc-at-modal-body {
	overflow-y: auto;
	padding: 24px;
	flex: 1;
	font-size: 0.9em;
	line-height: 1.75;
	color: #333;
}

.swc-at-modal-body h1,
.swc-at-modal-body h2,
.swc-at-modal-body h3,
.swc-at-modal-body h4 {
	margin-top: 1.4em;
	margin-bottom: 0.5em;
	color: #1d2327;
}

.swc-at-modal-body h1:first-child,
.swc-at-modal-body h2:first-child,
.swc-at-modal-body h3:first-child {
	margin-top: 0;
}

.swc-at-modal-body ul,
.swc-at-modal-body ol {
	padding-left: 1.4em;
}

.swc-at-modal-body p {
	margin: 0 0 1em;
}

.swc-at-modal-body a {
	color: inherit;
}

/* ── Modal footer ──────────────────────────────────────────── */
.swc-at-modal-footer {
	padding: 14px 20px;
	border-top: 1px solid #e0e0e0;
	background: #f9f9f9;
	text-align: right;
	flex-shrink: 0;
}

/* ── Footer Close button ───────────────────────────────────── */
/*
 * Elementor targets .cart button and .cart .button with its own
 * padding, background, and transition rules. We reset everything
 * and re-declare our own styles with !important to win the specificity
 * battle without needing to know the Elementor element IDs.
 */
.swc-at-modal-close-btn {
	all: unset !important;
	display: inline-block !important;
	background: #1d2327 !important;
	color: #fff !important;
	border: none !important;
	padding: 9px 22px !important;
	border-radius: 4px !important;
	font-size: 0.88em !important;
	font-weight: 600 !important;
	line-height: 1.4 !important;
	cursor: pointer !important;
	transition: opacity 0.15s !important;
	box-shadow: none !important;
	text-decoration: none !important;
	letter-spacing: normal !important;
}

.swc-at-modal-close-btn:hover {
	opacity: 0.85 !important;
	background: #1d2327 !important;
	color: #fff !important;
}

/* ── Accessibility: no focus outline on modal container ─────── */
.swc-at-modal-inner:focus {
	outline: none;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 480px) {
	.swc-at-modal-inner {
		max-height: 92vh;
		border-radius: 6px;
	}
	.swc-at-modal-body {
		padding: 16px;
	}
}

/* ── ATC button disabled state ─────────────────────────────── */
.single_add_to_cart_button.swc-at-btn-disabled,
.single_add_to_cart_button[disabled].swc-at-btn-disabled {
	opacity: 0.45 !important;
	cursor: not-allowed !important;
	pointer-events: auto !important;
	box-shadow: none !important;
}

/* ── Prevent body scroll while modal is open ───────────────── */
body.swc-at-modal-open {
	overflow: hidden;
}
