/**
 * Aura Quantity Selector — Separate Cards Design
 * Plugin: Aura Quantity Boxes
 * Version: 1.7.7
 */

/* Hide old (crossed-out) price & screen-reader text when qty selector active */
body.has-aura-qty-selector .summary > .price del,
body.has-aura-qty-selector .summary > p.price del,
body.has-aura-qty-selector .summary > .price > .screen-reader-text,
body.has-aura-qty-selector .summary > p.price > .screen-reader-text {
    display: none !important;
}
body.has-aura-qty-selector .summary > .price ins,
body.has-aura-qty-selector .summary > p.price ins {
    text-decoration: none;
}

/* =============================================================
   MAIN CONTAINER
   ============================================================= */
.aura-qty-selector {
    margin: 0 0 1.5rem 0;
    width: 100%;
}

/* =============================================================
   PROMOCJA label (standalone, above boxes)
   ============================================================= */
.aura-promo-label {
    background: linear-gradient(135deg, #3f880b, #4a9c0d);
    color: #fff;
    text-align: center;
    padding: 6px 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 8px;
    margin-bottom: 8px;
}

/* =============================================================
   BOXES WRAPPER — gap between separate cards
   ============================================================= */
.aura-qty-boxes {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* =============================================================
   SINGLE OPTION — separate card
   ============================================================= */
.aura-option {
    display: flex;
    align-items: center;
    padding: 16px 12px;
    cursor: pointer;
    position: relative;
    margin: 0;
    font-size: 14px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.aura-option:hover {
    border-color: #d1d5db;
    background: #fafafa;
}

/* --- CHECKED STATE: green border only, no bg change --- */
.aura-option:has(input:checked) {
    border-color: #3f880b;
    background: #fff;
    box-shadow: none;
}

/* Hidden native radio */
.aura-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
}

/* Custom radio circle */
.aura-option__radio {
    width: 16px;
    height: 16px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: all 0.2s;
    margin-right: 8px;
}

.aura-option input:checked ~ .aura-option__radio {
    border-color: #3f880b;
    background: #3f880b;
}

.aura-option input:checked ~ .aura-option__radio::after {
    content: '';
    position: absolute;
    top: 45%;
    left: 50%;
    transform: translate(-50%, -55%) rotate(45deg);
    width: 4px;
    height: 7px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    border-radius: 0;
}

/* =============================================================
   POPULAR BADGE — top-left, shown on designated option
   ============================================================= */
.aura-option__popular {
    position: absolute;
    top: -10px;
    left: 16px;
    background: #3f880b;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 6px;
    white-space: nowrap;
    z-index: 5;
    line-height: 1.3;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

/* Extra top padding when popular badge is present */
.aura-option--popular {
    margin-top: 6px;
    padding-top: 20px;
}

.aura-option--popular:has(input:checked) {
    padding-top: 20px;
}

/* =============================================================
   BODY — two-column layout: left (info) | right (pricing)
   ============================================================= */
.aura-option__body {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: row;
    gap: 12px;
}

/* --- LEFT COLUMN: qty + tag + description --- */
.aura-option__left-col {
    flex: 1 1 0%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
    justify-content: center;
}

.aura-option__info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.aura-option__qty {
    font-size: 28px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.aura-option input:checked ~ .aura-option__body .aura-option__qty {
    color: #3f880b;
}

.aura-option__tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
    line-height: 1.4;
}

.aura-option__tag--green {
    background: #d1f542;
    color: #1a1a1a;
}

.aura-option__tag--grey {
    background: #f0f0f0;
    color: #666;
}


/* --- RIGHT COLUMN: price, totals, badges — stacked, right-aligned --- */
.aura-option__right-col {
    flex: 0 0 auto;
    min-width: 150px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    white-space: nowrap;
    border-left: 1px solid #e2e8f0;
    padding-left: 12px;
}

.aura-option__right-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
}

.aura-option__unit-price {
    font-size: 22px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
}

.aura-option input:checked ~ .aura-option__body .aura-option__unit-price {
    color: #3f880b;
}

.aura-option__unit-suffix {
    font-size: 13px;
    font-weight: 500;
    color: #9ca3af;
}

.aura-option__savings {
    display: inline-block;
    background: #EA580C;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.4px;
    white-space: nowrap;
    line-height: 1.3;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.aura-option__shipping {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 11px;
    font-weight: 600;
    color: #3f880b;
    white-space: nowrap;
    line-height: 1;
}

.aura-option__shipping svg {
    flex-shrink: 0;
}

/* =============================================================
   DESCRIPTION BANNER — green hint below selected multi-qty box
   ============================================================= */
.aura-option-desc-banner {
    display: none;
    flex-direction: column;
    gap: 0;
    font-size: 13px;
    color: #333;
    text-align: left;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
}

/* --- Description row (green) --- */
.aura-option-desc-banner__row {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
}

.aura-option-desc-banner__row svg {
    flex-shrink: 0;
    width: 18px;
    min-width: 18px;
    height: 18px;
    color: #3f880b;
}

.aura-option-desc-banner__row span {
    flex: 1 1 0%;
    line-height: 1.4;
}

.aura-option-desc-banner b {
    font-weight: 700;
    color: #374151;
}

/* --- Coupon + timer row (subtle blue inside green banner) --- */
.aura-option-desc-banner__coupon {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
    margin: 0 8px 8px 8px;
    padding: 10px 12px;
    background: #eef6ff;
    border-radius: 12px;
    font-size: 11px;
    color: #1e40af;
    flex-wrap: wrap;
}

.aura-option-desc-banner__coupon > svg {
    flex-shrink: 0;
    color: #3b82f6;
}

.aura-option-desc-banner__coupon-text {
    flex: 1 1 0%;
    min-width: 0;
}

.aura-qty-coupon-code {
    background: #dbeafe;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s;
    letter-spacing: 0.5px;
}

.aura-qty-coupon-code:hover {
    background: #bfdbfe;
}

.aura-option-desc-banner__timer {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #dbeafe;
    padding: 3px 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    font-weight: 600;
    color: #1e40af;
    letter-spacing: 0.5px;
    white-space: nowrap;
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
    margin-left: auto;
}

.aura-option-desc-banner__timer svg {
    flex-shrink: 0;
    color: #3b82f6;
}

/* =============================================================
   QTY + PRICE SUMMARY ROW (below cards)
   ============================================================= */
.aura-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.aura-qty-input-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.aura-qty-btn {
    width: 44px;
    height: 44px;
    border: none;
    background: #f9fafb;
    color: #374151;
    font-size: 20px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aura-qty-btn:hover {
    background: #f3f4f6;
    color: #111827;
}

.aura-qty-btn:active {
    background: #e5e7eb;
}

.aura-qty-input {
    width: 50px;
    height: 44px;
    border: none;
    border-left: 1px solid #e5e7eb;
    border-right: 1px solid #e5e7eb;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    background: #fff;
    -moz-appearance: textfield;
}

.aura-qty-input::-webkit-outer-spin-button,
.aura-qty-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.aura-qty-price-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.aura-qty-unit-label {
    font-size: 11px;
    font-weight: 500;
    color: #6b7280;
}

.aura-qty-savings-badge {
    display: inline-block;
    background-color: #EA580C;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 5px;
    border-radius: 4px;
}

.aura-qty-summary-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.aura-qty-summary-final {
    font-size: 26px;
    font-weight: 700;
    color: #111827;
}


/* =============================================================
   PROTOCOL OPTION (Perfect Match integration)
   ============================================================= */

/* Protocol subtitle */
.aura-protocol-subtitle {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.3;
    margin-top: 1px;
}

/* Old price (strikethrough) in protocol */
.aura-protocol-old-price {
    text-decoration: line-through;
    color: #9ca3af;
    font-size: 13px;
    font-weight: 400;
    margin-right: 4px;
}

/* Protocol banner — product list */
.aura-protocol-banner-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 14px 12px;
    border-top: 1px solid #d1fae5;
    margin-top: 0;
}

.aura-protocol-banner-list__label {
    font-size: 11px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    margin-bottom: 2px;
}

.aura-protocol-banner-list__item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #374151;
    line-height: 1.4;
}

.aura-protocol-banner-list__item svg {
    flex-shrink: 0;
    margin-top: 1px;
}

/* Spinner animation for loading state */
@keyframes aura-qb-spin {
    to { transform: rotate(360deg); }
}

/* =============================================================
   RESPONSIVE — mobile
   ============================================================= */
@media (max-width: 580px) {
    .aura-qty-selector {
        margin: 0 0 1rem 0;
    }

    .aura-promo-label {
        font-size: 10px;
        padding: 5px 12px;
        letter-spacing: 1px;
    }

    .aura-qty-boxes {
        gap: 12px;
    }

    .aura-option {
        padding: 10px;
    }

    .aura-option:has(input:checked) {
        padding: 10px;
    }

    .aura-option--popular {
        padding-top: 18px;
    }

    .aura-option--popular:has(input:checked) {
        padding-top: 18px;
    }

    .aura-option__radio {
        width: 14px;
        height: 14px;
        margin-right: 6px;
    }

    .aura-option input:checked ~ .aura-option__radio::after {
        width: 3px;
        height: 6px;
        border-width: 0 1.5px 1.5px 0;
    }

    .aura-option__qty {
        font-size: 22px;
    }

    .aura-option__tag {
        font-size: 10px;
        padding: 2px 7px;
    }

    .aura-option__unit-price {
        font-size: 16px;
    }

    .aura-option__unit-suffix {
        font-size: 10px;
    }

    .aura-option__body {
        gap: 8px;
    }

    .aura-option__left-col {
        gap: 1px;
    }

    .aura-option__info-row {
        gap: 6px;
        flex-wrap: nowrap;
    }

    .aura-option-desc-banner {
        font-size: 12px;
        padding: 10px 12px;
        gap: 8px;
    }

    .aura-option__right-col {
        gap: 2px;
        padding-left: 10px;
        min-width: 120px;
    }

    .aura-option__right-price {
        gap: 1px;
    }

    .aura-option__savings {
        font-size: 8px;
        padding: 2px 5px;
        letter-spacing: 0.2px;
    }

    .aura-option__shipping {
        font-size: 9px;
    }

    .aura-option__popular {
        font-size: 8px;
        padding: 2px 7px;
        top: -8px;
        left: 10px;
    }

    /* Qty row */
    .aura-qty-row {
        margin-top: 20px;
        padding-top: 14px;
        gap: 12px;
    }

    .aura-qty-btn {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .aura-qty-input {
        width: 44px;
        height: 40px;
        font-size: 15px;
    }

    .aura-qty-savings-badge {
        font-size: 11px;
        padding: 4px 8px;
    }

    .aura-qty-summary-final {
        font-size: 22px;
    }

    /* Protocol mobile */
    .aura-protocol-old-price {
        font-size: 11px;
    }

    .aura-protocol-subtitle {
        font-size: 10px;
    }
}
