/**
 * Store Stock Info - Frontend Styles
 */

/* Button Styles */
.bm-store-stock-btn {
    display: inline-block;
    padding: 5px;
    margin: 0 0 5px 10px;
    background-color: #48312B;
    color: #fff; 
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.bm-store-stock-btn:hover {
    background-color: #48312B;
    color: #fff;
    text-decoration: none;
}

.bm-store-stock-btn:active {
    transform: scale(0.98);
}

/* Popup Overlay */
.bm-ssi-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.bm-ssi-overlay.active {
    opacity: 1;
}

/* Popup Container */
.bm-ssi-popup {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.bm-ssi-overlay.active .bm-ssi-popup {
    transform: scale(1);
}

/* Content */
.bm-ssi-content {
    padding: 30px;
    position: relative;
}

.bm-ssi-content h3 {
    margin: 0 0 20px 0;
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

/* Close Button */
.bm-ssi-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 30px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.bm-ssi-close:hover {
    color: #333;
}

/* Store List */
.bm-ssi-stores {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Store Item */
.bm-ssi-store-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #ddd;
}

/* Store Icon */
.bm-ssi-store-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.bm-ssi-store-icon.in-stock {
    background-color: #28a745;
    color: #fff;
}

.bm-ssi-store-icon.out-of-stock {
    background-color: #dc3545;
    color: #fff;
}

/* Store Info */
.bm-ssi-store-info {
    flex: 1;
}

.bm-ssi-store-name {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.bm-ssi-store-status {
    font-size: 14px;
    line-height: 1.5;
}

.bm-ssi-store-status.in-stock {
    color: #28a745;
    font-weight: 500;
}

.bm-ssi-store-status.partial-stock {
    color: #ffc107;
    font-weight: 500;
}

.bm-ssi-store-status.out-of-stock {
    color: #dc3545;
}

/* Loading State */
.bm-ssi-loading {
    padding: 40px;
    text-align: center;
    font-size: 16px;
    color: #666;
}

/* Error State */
.bm-ssi-error {
    padding: 40px;
    text-align: center;
    font-size: 16px;
    color: #dc3545;
}

/* Update border color based on stock status */
.bm-ssi-store-item:has(.bm-ssi-store-icon.in-stock) {
    border-left-color: #28a745;
}

.bm-ssi-store-item:has(.bm-ssi-store-icon.out-of-stock) {
    border-left-color: #dc3545;
}

/* Responsive */
@media (max-width: 768px) {
    .bm-ssi-popup {
        width: 95%;
        max-width: none;
    }

    .bm-ssi-content {
        padding: 20px;
    }

    .bm-ssi-content h3 {
        font-size: 20px;
    }

    .bm-ssi-store-item {
        gap: 10px;
        padding: 12px;
    }

    .bm-ssi-store-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
}
