/**
 * MLabs Cart Blocks - Styles
 * 
 * Styles for photo displays in WooCommerce Cart & Checkout Blocks
 */

/* ==========================================================================
   Photo Display in Cart Block Items
   ========================================================================== */

.mlabs-block-photos {
    margin-top: 12px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.mlabs-block-photos-label {
    font-size: 13px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 10px;
}

.mlabs-block-photos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mlabs-block-photo-thumb {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #dee2e6;
    flex-shrink: 0;
}

.mlabs-block-photo-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mlabs-block-photo-qty {
    position: absolute;
    bottom: 2px;
    right: 2px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 3px;
    line-height: 1;
}

.mlabs-block-photo-more {
    width: 56px;
    height: 56px;
    border-radius: 6px;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
    flex-shrink: 0;
}

.mlabs-block-prints-info {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
    font-size: 13px;
    color: #6c757d;
}

/* ==========================================================================
   Quantity Display Override
   ========================================================================== */

/* Hide the quantity stepper for photo upload items */
.mlabs-photo-cart-item .wc-block-components-quantity-selector {
    display: none !important;
}

/* Also target when the class isn't applied via filter */
.wc-block-cart-items__row:has(.mlabs-block-photos) .wc-block-components-quantity-selector,
.wc-block-components-order-summary-item:has(.mlabs-block-photos) .wc-block-components-quantity-selector {
    display: none !important;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */

@media (max-width: 768px) {
    .mlabs-block-photos {
        padding: 10px;
    }
    
    .mlabs-block-photo-thumb,
    .mlabs-block-photo-more {
        width: 48px;
        height: 48px;
    }
    
    .mlabs-block-photos-label {
        font-size: 12px;
    }
}

/* ==========================================================================
   Mini Cart in Header
   ========================================================================== */

.wc-block-mini-cart__drawer .mlabs-block-photos {
    margin-top: 8px;
    padding: 8px;
}

.wc-block-mini-cart__drawer .mlabs-block-photo-thumb,
.wc-block-mini-cart__drawer .mlabs-block-photo-more {
    width: 40px;
    height: 40px;
}

.wc-block-mini-cart__drawer .mlabs-block-photos-label {
    font-size: 11px;
}
