
/* ==========================================
   JADA B2B - LOOP PURCHASE
   Købsområde til gridview og listview
   ========================================== */

/* Fælles købsområde */
.jada-loop-purchase {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* ==========================================
   LÆG I KURV +
   ========================================== */

.jada-loop-purchase .jada-loop-buy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    box-sizing: border-box;

    background: #756E60;
    color: #ffffff;
    border: 0;
    border-radius: 5px;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    white-space: nowrap;

    cursor: pointer;
    transition: background 0.2s ease;
}

.jada-loop-purchase .jada-loop-buy-button:hover {
    background: #686356;
}

/* ==========================================
   I KURVEN + ANTALVÆLGER
   ========================================== */

.jada-loop-purchase .jada-loop-quantity {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 12px;

    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

/* Grøn status med flueben */
.jada-loop-purchase .jada-loop-in-cart {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    flex: 0 0 auto;
    white-space: nowrap;

    color: #4f6f57;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
}

.jada-loop-purchase .jada-loop-in-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 18px;
    height: 18px;
    flex: 0 0 18px;

    background: #5f7f63;
    color: #ffffff;
    border-radius: 50%;

    font-size: 12px;
    font-weight: 600;
    line-height: 1;
}

/* Bevar eksisterende antalvælger */
.jada-loop-purchase .item-quantity-group {
    display: flex;
    align-items: center;
    justify-content: center;

    width: auto;
    min-width: 0;
    max-width: 100%;
    margin: 0;
    box-sizing: border-box;
}

/* Vigtigt: skjulte tilstande må ikke optage plads */
.jada-loop-purchase .jada-loop-buy-button[hidden],
.jada-loop-purchase .jada-loop-quantity[hidden] {
    display: none !important;
}

/* ==========================================
   TABLET
   ========================================== */

@media (min-width: 768px) and (max-width: 1124px) {

    .jada-loop-purchase .jada-loop-quantity {
        gap: 8px;
    }

    .jada-loop-purchase .jada-loop-buy-button {
        min-height: 44px;
        padding: 10px 12px;
    }
}

/* ==========================================
   MOBIL
   ========================================== */

@media (max-width: 767px) {

    .jada-loop-purchase {
        width: 100%;
    }

    .jada-loop-purchase .jada-loop-buy-button {
        width: 100%;
        min-height: 44px;
    }

    /* Plads til både status og antalvælger */
    .jada-loop-purchase .jada-loop-quantity {
        flex-wrap: wrap;
        gap: 10px;
    }

    .jada-loop-purchase .item-quantity-group {
        max-width: 100%;
    }
}
