/**
 * Elegant Labels Frontend Styles
 * Styles for displaying badges on WooCommerce products
 */

/* Base badge container styles */
.elegant-labels-container {
    position: relative;
    z-index: 10;
}

.elegant-labels-image-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 5;
}

.elegant-labels-title-container {
    display: inline-block;
    margin: 5px 0;
}

/* Base badge styles */
.elegant-label {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    pointer-events: auto;
}

.elegant-label:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Image placement positioning */
.elegant-label-image {
    position: absolute;
}

.elegant-label-image.elw-top-right {
    top: 10px;
    right: 10px;
}

.elegant-label-image.elw-top-left {
    top: 10px;
    left: 10px;
}

.elegant-label-image.elw-bottom-right {
    bottom: 10px;
    right: 10px;
}

.elegant-label-image.elw-bottom-left {
    bottom: 10px;
    left: 10px;
}

/* Title placement styles */
.elegant-label-title {
    display: inline-block;
    margin: 0 5px 5px 0;
    vertical-align: top;
}

/* Context-specific styles */
.elegant-label-loop {
    font-size: 11px;
    padding: 4px 8px;
}

.elegant-label-single {
    font-size: 13px;
    padding: 6px 12px;
}

/* Layout-specific styles */
.elegant-label-label-one {
    border-radius: 3px;
    background: linear-gradient(45deg, currentColor, rgba(255, 255, 255, 0.1));
}

.elegant-label-label-two {
    border-radius: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.elegant-label-label-three {
    border-radius: 0;
    transform: rotate(-3deg);
    border: 1px dashed rgba(255, 255, 255, 0.5);
}

.elegant-label-label-four {
    border-radius: 50px;
    background: radial-gradient(ellipse at center, currentColor, rgba(0, 0, 0, 0.2));
}

.elegant-label-label-five {
    clip-path: polygon(0% 0%, 90% 0%, 100% 50%, 90% 100%, 0% 100%);
    padding-right: 15px;
}

.elegant-label-label-six {
    border-radius: 3px 15px 3px 15px;
    background: linear-gradient(135deg, currentColor, rgba(255, 255, 255, 0.2));
}

.elegant-label-label-seven {
    border-radius: 3px;
    position: relative;
    background: linear-gradient(45deg, currentColor, rgba(0, 0, 0, 0.1));
}

.elegant-label-label-seven:before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, rgba(255, 255, 255, 0.3), transparent);
    border-radius: 5px;
    z-index: -1;
}

.elegant-label-label-eight {
    border-radius: 0 10px 0 10px;
    background: linear-gradient(90deg, currentColor, rgba(255, 255, 255, 0.1));
    border-left: 3px solid rgba(255, 255, 255, 0.5);
}

.elegant-label-label-nine {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 10px;
    line-height: 1;
    padding: 5px;
}

/* WooCommerce integration styles */
.woocommerce ul.products li.product {
    position: relative;
}

.woocommerce ul.products li.product .elegant-labels-image-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 5;
}

.woocommerce ul.products li.product .woocommerce-loop-product__link {
    position: relative;
    display: block;
}

.woocommerce ul.products li.product img {
    position: relative;
}

/* Single product page styles */
.single-product .elegant-labels-container {
    margin-bottom: 10px;
}

.single-product .elegant-label {
    margin-right: 10px;
    margin-bottom: 5px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .elegant-label {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .elegant-label-image.elw-top-right,
    .elegant-label-image.elw-top-left {
        top: 5px;
    }
    
    .elegant-label-image.elw-top-right,
    .elegant-label-image.elw-bottom-right {
        right: 5px;
    }
    
    .elegant-label-image.elw-top-left,
    .elegant-label-image.elw-bottom-left {
        left: 5px;
    }
    
    .elegant-label-image.elw-bottom-right,
    .elegant-label-image.elw-bottom-left {
        bottom: 5px;
    }
    
    .elegant-label-label-nine {
        width: 40px;
        height: 40px;
        font-size: 9px;
    }
}

/* Animation keyframes */
@keyframes badge-fade-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.elegant-label {
    animation: badge-fade-in 0.3s ease-out;
}

/* Special effects for different contexts */
.elegant-label-loop:hover {
    transform: scale(1.05);
}

.elegant-label-single:hover {
    transform: translateY(-2px);
}

/* Accessibility improvements */
.elegant-label {
    outline: none;
    transition: all 0.3s ease;
}

.elegant-label:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.8);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .elegant-label {
        border: 1px solid;
        font-weight: 700;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .elegant-label {
        animation: none;
        transition: none;
    }
    
    .elegant-label:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .elegant-label {
        background: transparent !important;
        color: black !important;
        border: 1px solid black;
        box-shadow: none;
    }
}