/**
 * Frontend styles for Secret Sale plugin
 */

/* Secret Sale Badge - Shop Page (Left Side) */
.secret-sale-badge {
    position: absolute;
    top: 0px;
    left: 0px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 999px;
    color: #111;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    letter-spacing: 0.02em;
    transition: all 0.2s ease;
    animation: secret-sale-badge-fade-in 0.3s ease-out;
}

.secret-sale-badge:hover {
    background: #f2f2f2;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

.secret-sale-badge-label {
    font-size: 11px;
    font-weight: 600;
    line-height: 1.1;
    text-transform: uppercase;
    color: inherit;
}

.secret-sale-badge .screen-reader-text {
    position: absolute;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    width: 1px;
    height: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

/* Ensure badge is positioned relative to product image container */
.woocommerce ul.products li.product,
.woocommerce-page ul.products li.product {
    position: relative;
}

.woocommerce ul.products li.product .woocommerce-loop-product__link,
.woocommerce-page ul.products li.product .woocommerce-loop-product__link {
    position: relative;
    display: block;
}

/* Badge always on left side (wishlist is on right) */
.secret-sale-badge-shop {
    left: 10px;
    right: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .secret-sale-badge {
        padding: 3px 8px;
        top: 8px;
        left: 8px;
    }
    
    .secret-sale-badge-label {
        font-size: 10px;
    }
}

/* Ensure badge appears above product image */
.woocommerce ul.products li.product .attachment-woocommerce_thumbnail,
.woocommerce-page ul.products li.product .attachment-woocommerce_thumbnail {
    position: relative;
}

/* Compatibility with themes that use different product loop structures */
.products .product .secret-sale-badge,
.product .secret-sale-badge {
    position: absolute;
    top: 6px;
    left: 10px;
    right: auto;
    z-index: 10;
}

/* Single Product Page Secret Sale Notice in Sidebar */
.secret-sale-single-product-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    margin: 15px 0;
    background-color: #f8f9fa;
    border-left: 4px solid #28a745;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
}

.secret-sale-single-icon {
    font-size: 24px;
    color: #28a745;
    line-height: 1;
}

/* Responsive adjustments for single product notice */
@media (max-width: 768px) {
    .secret-sale-single-product-notice {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .secret-sale-single-icon {
        font-size: 18px;
    }
}

/* Animation for badge appearance */
@keyframes secret-sale-badge-fade-in {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

