/**
 * Copyright © Bonlineco All rights reserved.
 * See COPYING.txt for license details.
 */

.bonlineco-product-labels-container {
    position: relative;
    z-index: 10;
}

.bonlineco-product-label {
    position: absolute;
    z-index: 15;
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

/* Position Classes */
.bonlineco-product-label.position-top-left {
    top: 10px;
    left: 10px;
}

.bonlineco-product-label.position-top-center {
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.bonlineco-product-label.position-top-right {
    top: 10px;
    right: 10px;
}

.bonlineco-product-label.position-middle-left {
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
}

.bonlineco-product-label.position-middle-center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.bonlineco-product-label.position-middle-right {
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}

.bonlineco-product-label.position-bottom-left {
    bottom: 10px;
    left: 10px;
}

.bonlineco-product-label.position-bottom-center {
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
}

.bonlineco-product-label.position-bottom-right {
    bottom: 10px;
    right: 10px;
}

/* Product Page: Offset left and center labels for vertical thumbnail gallery (110px width) - English store only */
@media (min-width: 992px) {
    html[lang="en"] .catalog-product-view .bonlineco-product-label.position-top-left,
    html[lang="en"] .catalog-product-view .bonlineco-product-label.position-middle-left,
    html[lang="en"] .catalog-product-view .bonlineco-product-label.position-bottom-left {
        left: 120px; /* 110px thumbnail width + 10px margin */
    }

    html[lang="en"] .catalog-product-view .bonlineco-product-label.position-top-center,
    html[lang="en"] .catalog-product-view .bonlineco-product-label.position-middle-center,
    html[lang="en"] .catalog-product-view .bonlineco-product-label.position-bottom-center {
        left: calc(50% + 55px); /* 50% + half of thumbnail width (110px/2) */
    }
}

/* Label Type Styles */
.bonlineco-product-label.type-text .label-text {
    /* Plain text label: no shape */
    padding: 0;
    background: transparent;
    color: inherit; /* allow inline style from block to control color */
    border-radius: 0;
    font-size: inherit; /* allow inline style from block to control size */
    line-height: 1.2;
    box-shadow: none;
}

.bonlineco-product-label.type-shape .label-shape {
    padding: 8px 12px;
    border-radius: 50px;
    font-size: 12px;
    line-height: 1.2;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    min-width: 60px;
}

.bonlineco-product-label.type-image img {
    max-width: 80px;
    max-height: 80px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Link Styles */
.bonlineco-product-label a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.bonlineco-product-label a:hover {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .bonlineco-product-label {
        font-size: 11px;
    }
    
    .bonlineco-product-label.type-shape .label-shape {
        padding: 6px 10px;
        font-size: 11px;
    }
    
    .bonlineco-product-label.type-image img {
        max-width: 60px;
        max-height: 60px;
    }
}

/* Animation */
.bonlineco-product-label {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
