/*
 * Alliance Promotions — front-end styles.
 * Intentionally scoped to .alliance-promotion-* so the plugin does not
 * alter general WooCommerce/theme styling.
 */
:root {
    --alliance-promo-blue: #0071bc;
    --alliance-promo-yellow: #f1d600;
    --alliance-promo-border: #d9dfe5;
    --alliance-promo-muted: #66727e;
    --alliance-promo-bg: #f7f9fb;
    --alliance-promo-white: #fff;
}

.alliance-promotion-box {
    width: 100%;
    margin: 0 0 24px;
    border: 1px solid var(--alliance-promo-border);
    border-radius: 6px;
    overflow: hidden;
    background: var(--alliance-promo-white);
    box-sizing: border-box;
}

.alliance-promotion-banner {
    padding: 12px 16px;
    background: var(--alliance-promo-blue);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.alliance-promotion-content {
    padding: 15px 16px 4px;
    background: var(--alliance-promo-white);
}

.alliance-promotion-reward {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 0 0 10px;
    line-height: 1.5;
}

.alliance-promotion-reward:last-child {
    margin-bottom: 7px;
}

.alliance-promotion-icon {
    flex: 0 0 auto;
    line-height: 1.5;
}

.alliance-promotion-reward-text a,
.alliance-promotion-choice-label a {
    text-decoration: underline;
    text-underline-offset: 2px;
}

.alliance-promotion-choice-group {
    min-width: 0;
    margin: 4px 0 12px;
    padding: 12px 13px 13px;
    border: 1px solid var(--alliance-promo-border);
    border-radius: 5px;
    background: var(--alliance-promo-bg);
}

.alliance-promotion-choice-group legend {
    max-width: 100%;
    margin: 0 0 8px;
    padding: 0 6px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

.alliance-promotion-choice-group legend small {
    display: block;
    margin-top: 3px;
    color: var(--alliance-promo-muted);
    font-size: 12px;
    font-weight: 400;
}

.alliance-promotion-choice-options {
    display: grid;
    gap: 8px;
}

.alliance-promotion-choice-option {
    position: relative;
    /*display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 9px;*/
    align-items: start;
    width: 100%;
    margin: 0;
    padding: 10px 11px;
    border: 1px solid var(--alliance-promo-border);
    border-radius: 4px;
    background: #fff;
    /*cursor: pointer;*/
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.alliance-promotion-choice-option:hover {
    /*border-color: var(--alliance-promo-blue);*/
}

.alliance-promotion-choice-option:has(input:checked) {
    border-color: var(--alliance-promo-blue);
    box-shadow: 0 0 0 1px var(--alliance-promo-blue) inset;
    background: #fafdff;
}

.alliance-promotion-choice-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.alliance-promotion-choice-marker {
    position: relative;
    width: 17px;
    height: 17px;
    margin-top: 1px;
    border: 1px solid #747d86;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
}

.alliance-promotion-choice-option input:checked + .alliance-promotion-choice-marker {
    border-color: var(--alliance-promo-blue);
}

.alliance-promotion-choice-option input:checked + .alliance-promotion-choice-marker::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--alliance-promo-blue);
}

.alliance-promotion-choice-option input:focus-visible + .alliance-promotion-choice-marker {
    outline: 2px solid var(--alliance-promo-blue);
    outline-offset: 2px;
}

.alliance-promotion-choice-label {
    line-height: 1.45;
}

.alliance-promotion-choice-label a {
    font-weight: 600;
}

.alliance-promotion-subtext {
    margin: 0;
    padding: 12px 16px 14px;
    border-top: 1px solid var(--alliance-promo-border);
    color: var(--alliance-promo-muted);
    font-size: 13px;
    line-height: 1.5;
}

.alliance-cart-promotion-label {
    display: block;
    margin-top: 2px;
    font-size: .82em;
    opacity: .72;
}

.alliance-promotion-cart-qty {
    display: inline-block;
    min-width: 1.5em;
    text-align: center;
}

@media (max-width: 600px) {
    .alliance-promotion-banner,
    .alliance-promotion-content,
    .alliance-promotion-subtext {
        padding-left: 12px;
        padding-right: 12px;
    }

    .alliance-promotion-choice-group {
        padding: 10px;
    }

    .alliance-promotion-choice-option {
        padding: 9px 10px;
    }
}

@supports not selector(:has(*)) {
    .alliance-promotion-choice-option input:checked ~ .alliance-promotion-choice-label {
        font-weight: 600;
    }
}

.alliance-promotion-section-label{margin:10px 0 7px;font-size:12px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;opacity:.72}.alliance-promotion-section-label:first-child{margin-top:0}.alliance-promotion-reward-redemption{margin-bottom:10px}.alliance-promotion-choice-label a{font-weight:600}


/* Promotional cart children are controlled by the qualifying product. */
.alliance-promotion-child .quantity input,
.alliance-promotion-child .quantity button,
.alliance-promotion-child .quantity a,
.alliance-promotion-child input.qty,
.alliance-promotion-child button.qty,
.alliance-promotion-child .plus,
.alliance-promotion-child .minus,
.alliance-promotion-child a.remove,
.alliance-promotion-child .remove {
    cursor: not-allowed !important;
}

.alliance-promotion-child .quantity input:disabled,
.alliance-promotion-child .quantity button:disabled {
    opacity: .55;
}

.alliance-promotion-subtext + .alliance-promotion-subtext {
    border-top: 0;
    padding-top: 0;
}

/* Product thumbnails (bonus items, redemption items, choice options). */
.alliance-promotion-reward-has-thumb {
    align-items: center;
}

.alliance-promotion-thumb {
    flex: 0 0 auto;
    display: block;
    width: 48px;
    height: 48px;
    border: 1px solid var(--alliance-promo-border);
    border-radius: 4px;
    background: var(--alliance-promo-white);
    overflow: hidden;
    line-height: 0;
    box-sizing: border-box;
}

.alliance-promotion-thumb a {
    display: block;
    width: 100%;
    height: 100%;
    text-decoration: none;
}

/* Reset common theme/Woo image rules so the thumbnail stays a clean square. */
.alliance-promotion-thumb img.alliance-promotion-thumb-img {
    display: block;
    width: 100%;
    height: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    object-fit: contain;
}

/* Choice options: each item is a block-level row (replaces the old <br/>). */
/* 
 * .alliance-promotion-choice-item {
    display: block;
}

.alliance-promotion-choice-item-has-thumb { */
.alliance-promotion-choice-item {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 6px;
	font-weight:600 !important;
}

.alliance-promotion-choice-item-has-thumb:last-child {
    margin-bottom: 0;
}

.alliance-promotion-choice-item .alliance-promotion-thumb {
    width: 40px;
    height: 40px;
}

.alliance-promotion-thumb-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: 100%;
	flex: 0 0 64px;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	color: #a1a8b0;
}

.alliance-promotion-thumb-placeholder svg {
	display: block;
	width: 32px;
	height: 32px;
}