/* Out-of-stock badge, overlay, actions, and notify modal */

.altctrl-oos-badge {
	display: none !important;
}

.altctrl-deal-card.is-out-of-stock .altctrl-deal-card__media-wrap {
	position: relative;
}

.altctrl-daily-deals__card.is-out-of-stock .altctrl-daily-deals__badges .altctrl-oos-badge {
	position: static !important;
	top: auto;
	left: auto;
}

.altctrl-recently-viewed__card.is-out-of-stock .altctrl-oos-badge,
.altctrl-recently-viewed .altctrl-oos-overlay,
.altctrl-recently-viewed .altctrl-oos-overlay--card {
	display: none !important;
}

.altctrl-daily-deals__card.is-out-of-stock .altctrl-daily-deals__media,
.altctrl-recently-viewed__card.is-out-of-stock .altctrl-recently-viewed__media {
	position: relative;
}

.altctrl-daily-deals__card .altctrl-stock-notify-actions--card {
	margin-top: auto;
}

.altctrl-stock-notify-actions--card {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--ac-card-btn-gap, 0.5rem);
	width: 100%;
}

.altctrl-recently-viewed__card.is-out-of-stock .altctrl-oos-overlay--card,
.altctrl-recently-viewed .altctrl-oos-overlay,
.altctrl-recently-viewed .altctrl-oos-overlay--card,
.altctrl-recently-viewed__card .altctrl-oos-badge,
.altctrl-recently-viewed .altctrl-notify-me-btn--overlay {
	display: none !important;
}

.altctrl-daily-deals__card.is-out-of-stock .altctrl-oos-overlay--card {
	left: 0.35rem;
	right: 0.35rem;
	bottom: 0.35rem;
	gap: 0.35rem;
	padding: 0.4rem 0.5rem;
}

.altctrl-daily-deals__card.is-out-of-stock .altctrl-notify-me-btn--overlay {
	min-height: 1.65rem;
	padding: 0.25rem 0.45rem !important;
	font-size: 0.5625rem !important;
}

.altctrl-daily-deals__card .altctrl-oos-badge {
	position: static;
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	background: #dc2626;
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.altctrl-oos-overlay {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 10px 12px;
	background: rgba(15, 23, 42, 0.72);
	color: #fff;
	text-align: center;
}

.altctrl-oos-overlay:not(.altctrl-oos-overlay--card):not(.altctrl-oos-overlay--simple) span {
	font-size: 0.78rem;
	line-height: 1.35;
}

.altctrl-deal-card.is-out-of-stock .altctrl-deal-card__shop-now {
	display: none !important;
}

.altctrl-single-oos-ui {
	position: absolute;
	inset: 0;
	z-index: 4;
	pointer-events: none;
}

.woocommerce-product-gallery {
	position: relative;
}

.altctrl-purchase-block--oos {
	margin-top: 12px;
}

.altctrl-purchase-block--oos .altctrl-oos-message {
	margin: 0 0 14px;
	color: #64748b;
	font-size: 0.95rem;
}

.altctrl-stock-notify-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	width: 100%;
}

.altctrl-stock-notify-actions--single .altctrl-oos-btn,
.altctrl-stock-notify-actions--single .altctrl-notify-me-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 20px;
	border-radius: 999px;
	font-size: 0.95rem;
	font-weight: 400;
	line-height: 1.2;
}

.altctrl-stock-notify-actions--single .altctrl-oos-btn {
	gap: 6px;
	background: #0066cc;
	color: #fff;
	opacity: 0.72;
	cursor: not-allowed;
}

.altctrl-stock-notify-actions--single .altctrl-notify-me-btn {
	border: 1px solid #0066cc;
	background: #fff;
	color: #0066cc;
	cursor: pointer;
}

.altctrl-stock-notify-actions--single .altctrl-notify-me-btn:hover,
.altctrl-stock-notify-actions--single .altctrl-notify-me-btn:focus {
	background: #f0f7ff;
	color: #005bb5;
}

.altctrl-stock-notify-actions--single {
	max-width: 420px;
}

body.altctrl-stock-notify-open {
	overflow: hidden;
}

.altctrl-stock-notify-modal[hidden] {
	display: none !important;
}

.altctrl-stock-notify-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.altctrl-stock-notify-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
}

.altctrl-stock-notify-modal__dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	padding: 24px;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
}

.altctrl-stock-notify-modal__close {
	position: absolute;
	top: 10px;
	right: 12px;
	border: 0;
	background: transparent;
	color: #64748b;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.altctrl-stock-notify-modal__title {
	margin: 0 0 8px;
	font-size: 1.35rem;
	color: #0f172a;
}

.altctrl-stock-notify-modal__product {
	margin: 0 0 8px;
	color: #0066cc;
	font-weight: 600;
}

.altctrl-stock-notify-modal__intro {
	margin: 0 0 16px;
	color: #64748b;
	font-size: 0.92rem;
}

.altctrl-stock-notify-modal__label {
	display: block;
	margin-bottom: 6px;
	color: #334155;
	font-size: 0.88rem;
}

.altctrl-stock-notify-modal__label.is-hidden,
.altctrl-stock-notify-modal__input.is-hidden {
	display: none;
}

.altctrl-stock-notify-modal__input {
	width: 100%;
	min-height: 44px;
	margin-bottom: 14px;
	padding: 10px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 0.95rem;
}

.altctrl-stock-notify-modal__submit {
	width: 100%;
	min-height: 44px;
	margin-bottom: 8px;
}

.altctrl-stock-notify-modal__message {
	margin: 0;
	font-size: 0.88rem;
}

.altctrl-stock-notify-modal__message.is-success {
	color: #15803d;
}

.altctrl-stock-notify-modal__message.is-error {
	color: #b42318;
}

/* Out of Stock + Notify Me: display-only, never clickable */
.altctrl-oos-btn,
.altctrl-oos-btn--card,
.altctrl-oos-btn--single,
.altctrl-notify-me-btn,
.altctrl-notify-me-btn--card,
.altctrl-notify-me-btn--single,
.altctrl-notify-me-btn--overlay {
	pointer-events: none !important;
	cursor: not-allowed !important;
	user-select: none;
	-webkit-user-select: none;
}

.altctrl-notify-me-btn:disabled,
.altctrl-notify-me-btn[aria-disabled="true"] {
	opacity: 1;
	cursor: not-allowed !important;
}

/* Red OUT OF STOCK ticket — never intercept clicks */
.altctrl-oos-badge {
	pointer-events: none !important;
	cursor: default;
}

/* Tablet: hide the red OUT OF STOCK ticket on product cards */
@media (min-width: 768px) and (max-width: 1024px) {
	.altctrl-oos-badge,
	.altctrl-deal-card .altctrl-oos-badge,
	.altctrl-deal-card__badges .altctrl-oos-badge,
	.altctrl-daily-deals__media .altctrl-oos-badge,
	.altctrl-daily-deals__badges .altctrl-oos-badge,
	.altctrl-recently-viewed__media .altctrl-oos-badge,
	.altctrl-recently-viewed__badges .altctrl-oos-badge,
	body.altctrl-deals-archive .altctrl-deal-card .altctrl-oos-badge,
	body.altctrl-deals-archive .altctrl-deal-card__badges .altctrl-oos-badge {
		display: none !important;
	}
}
