/* MS Campanhas - Frontend Styles */

/* ─── Product Badge ─────────────────────────────────────────────── */

.msc-product-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 10;
    color: #fff !important;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 4px;
    line-height: 1.3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    max-width: 140px;
    text-align: center;
    background-color: #764ea0 !important;
}

.msc-badge-single {
    font-size: 13px;
    padding: 6px 14px;
    top: 12px;
    left: 12px;
}

/* ─── Promo Card (Página do Produto) ────────────────────────────── */

.msc-promo-card {
    width: 100%;
    flex-basis: 100% !important;
    order: -1;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 14px 16px;
    margin-bottom: 14px;
}

.msc-promo-card__header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.msc-promo-card__title {
    font-size: 15px;
    font-weight: 700;
    color: #333;
}

/* Radio Option */
.msc-promo-card__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    cursor: pointer;
    transition: opacity .15s;
}

.msc-promo-card__option:hover {
    opacity: 0.85;
}

.msc-promo-card__option--static {
    cursor: default;
}

.msc-promo-card__option--static:hover {
    opacity: 1;
}

/* Hidden native radio */
.msc-promo-radio {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

/* Custom radio circle */
.msc-promo-card__radio {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s ease;
}

.msc-promo-card__radio::after {
    content: '';
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: transparent;
    transition: background .2s ease;
}

/* Radio checked state */
.msc-promo-radio:checked ~ .msc-promo-card__radio {
    border-color: #764ea0;
}

.msc-promo-radio:checked ~ .msc-promo-card__radio::after {
    background: #764ea0;
}

/* Detail text */
.msc-promo-card__detail {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    color: #555;
    line-height: 1.4;
    flex: 1;
}

.msc-promo-card__detail strong {
    color: #333;
    font-size: 14px;
}

.msc-promo-card__price {
    color: #764ea0 !important;
    font-size: 15px !important;
}

/* ─── Qty Boxes (Leve X Pague Y — cards lado a lado) ─────────────── */

.msc-qty-boxes {
    display: flex;
    gap: 10px;
    flex-basis: 100% !important;
    order: -1;
    margin-bottom: 14px;
}

.msc-qty-box {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
    position: relative;
}

.msc-qty-box:hover {
    border-color: #ccc;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.msc-qty-box .msc-promo-radio:checked ~ .msc-qty-box__qty,
.msc-qty-box--selected .msc-qty-box__qty {
    color: #764ea0;
}

.msc-qty-box .msc-promo-radio:checked ~ .msc-qty-box__price {
    color: #333;
}

.msc-qty-box:has(.msc-promo-radio:checked),
.msc-qty-box--selected {
    border-color: #764ea0;
    box-shadow: 0 0 0 1px #764ea0;
}

.msc-qty-box__qty {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    margin-bottom: 2px;
    transition: color .2s;
}

.msc-qty-box__price {
    font-size: 22px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.msc-qty-box__price .woocommerce-Price-currencySymbol {
    font-size: 14px;
    font-weight: 600;
}

.msc-qty-box__label {
    font-size: 12px;
    color: #888;
    margin-top: 1px;
}

.msc-qty-box__badge {
    position: absolute;
    top: -9px;
    left: 10px;
    background: #764ea0;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

/* ─── Quantity Flash Animation ──────────────────────────────────── */

@keyframes mscQtyFlash {
    0%   { background: #fff; }
    30%  { background: #764ea0; color: #fff; }
    100% { background: #fff; color: #333; }
}

.msc-qty-flash {
    animation: mscQtyFlash .6s ease;
}

/* ─── Cart Item Campaign Label ──────────────────────────────────── */

.msc-cart-label {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    background: #764ea0;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    margin-top: 4px;
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ─── Cart Subtotal Campaign Label ──────────────────────────────── */

.msc-subtotal-label {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #764ea0;
    padding: 1px 6px;
    border-radius: 3px;
    margin-top: 4px;
    text-transform: uppercase;
}

/* ─── Cart/Checkout Totals Campaign Row ─────────────────────────── */

.msc-campaign-discount th {
    color: #764ea0 !important;
    font-weight: 600 !important;
}

.msc-campaign-discount td {
    color: #764ea0 !important;
    font-weight: 700 !important;
}

.msc-totals-icon {
    margin-right: 4px;
}

/* ─── Mini Cart Labels ──────────────────────────────────────────── */

.msc-mini-label {
    display: inline-block;
    font-size: 9px;
    font-weight: 700;
    color: #fff;
    background: #764ea0;
    padding: 1px 5px;
    border-radius: 3px;
    margin-top: 2px;
    text-transform: uppercase;
}

.msc-mini-label--gift {
    background: #a6ce39;
}

/* ─── "A partir de" price annotation ────────────────────────────── */

.msc-from-price {
    color: #764ea0;
    font-weight: 600;
    font-size: 12px;
}
