/**
 * UXAS Warehouse - Local Stock Display Styles
 * Frontend styling for "Turime vietoje: X vnt." display
 */

/* Local stock indicator on product listings */
.frn-product-item__local-stock {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.frn-product-item__local-stock img {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.frn-product-item__local-stock span {
    line-height: 1;
    height: 12px;
}

/* Local stock on product page */
.frn-deliver--local-stock {
    background-color: #f5f5f5;
    padding: 12px 16px;
    border-radius: 6px;
    margin-top: 8px;
}

.frn-deliver--local-stock .frn-deliver__text {
    color: #198754;
    font-weight: 600;
}

.frn-deliver--local-stock .frn-deliver__text strong {
    color: #155724;
}

/* Cart overlay local stock */
.frn-cart-item__local-stock {
    font-size: 11px;
    color: #198754;
    margin-top: 2px;
}

.frn-cart-item__local-stock::before {
    content: "✓ ";
}

/* Quick view modal local stock */
.frn-quickview__local-stock {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    color: #2e7d32;
    margin-top: 8px;
}

.frn-quickview__local-stock img {
    width: 16px;
    height: 16px;
}

/* Wishlist local stock */
.wishlist-products-item .frn-product-item__local-stock {
    font-size: 11px;
    padding: 3px 6px;
    margin-top: 2px;
}

/* Mobile adjustments */
@media (max-width: 767px) {
    .frn-product-item__local-stock {
        font-size: 11px;
        padding: 3px 6px;
        gap: 4px;
    }

    .frn-product-item__local-stock img {
        width: 12px;
        height: 12px;
    }

    .frn-deliver--local-stock {
        padding: 10px 12px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .frn-product-item__local-stock {
        font-size: 11px;
    }
}

/* =====================================================
   SPLIT DELIVERY DISPLAY STYLES
   ===================================================== */

/* Container loading state */
#split-delivery-container {
    transition: opacity 0.2s ease;
}

#split-delivery-container.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Split delivery block */
.frn-deliver--split {
    background-color: rgba(108, 117, 125, 0.05);
    border-left: 3px solid #6c757d;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    margin-top: 8px;
}

.frn-deliver__title {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 10px;
    color: #495057;
}

.frn-deliver__lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.frn-deliver__line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 13px;
}

.frn-deliver__line-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.frn-deliver__line-text {
    flex: 1;
}

/* Local delivery line - green text only */
.frn-deliver__line--local {
    color: #2e7d32;
}

.frn-deliver__line--local strong {
    color: #2e7d32;
}

/* Supplier delivery line */
.frn-deliver__line--supplier {
    color: var(--cText);
}

.frn-deliver__line--supplier strong {
    color: #d84315;
}

/* Tooltip icon */
.frn-deliver__tooltip {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    cursor: help;
}

.frn-deliver__tooltip-icon {
    width: 16px;
    height: 16px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.frn-deliver__tooltip:hover .frn-deliver__tooltip-icon {
    opacity: 1;
}

/* Semi-transparent loading overlay effect */
#split-delivery-container.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 6px;
}

/* Mobile adjustments for split delivery */
@media (max-width: 767px) {
    .frn-deliver--split {
        padding: 10px 12px;
    }

    .frn-deliver__title {
        font-size: 13px;
        margin-bottom: 8px;
    }

    .frn-deliver__line {
        padding: 6px 10px;
        font-size: 12px;
    }

    .frn-deliver__line-icon {
        width: 16px;
        height: 16px;
    }
}