/* Badge Styles for New Product Notifications Plugin */

/* Base Badge Styling */
.npnfw-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff0000;
    color: #ffffff;
    padding: 5px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    z-index: 10;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.npnfw-badge span {
    display: block;
}

/* Shop Page Badge Positioning */
.woocommerce ul.products li.product {
    position: relative;
}

.woocommerce ul.products li.product .npnfw-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Badge hover effect on shop page */
.woocommerce ul.products li.product:hover .npnfw-badge {
    transform: scale(1.05);
}

/* Single Product Page Badge */
.woocommerce div.product .images {
    position: relative;
}

.npnfw-badge-single {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 8px 12px;
    font-size: 14px;
    border-radius: 4px;
}

/* Badge Animation */
@keyframes npnfw-badge-pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.npnfw-badge {
    animation: npnfw-badge-pulse 2s infinite;
}

/* Different Badge Styles */
.npnfw-badge-new {
    background: #ff0000;
    color: #ffffff;
}

.npnfw-badge-featured {
    background: #ffa500;
    color: #ffffff;
}

.npnfw-badge-sale {
    background: #00aa00;
    color: #ffffff;
}

/* Badge Positioning for Different Themes */

/* Storefront Theme */
.storefront .woocommerce ul.products li.product .npnfw-badge {
    top: 10px;
    right: 10px;
}

/* Astra Theme */
.astra-woocommerce .woocommerce ul.products li.product .npnfw-badge {
    top: 10px;
    right: 10px;
}

/* OceanWP Theme */
.oceanwp .woocommerce ul.products li.product .npnfw-badge {
    top: 10px;
    right: 10px;
}

/* GeneratePress Theme */
.generate-woocommerce .woocommerce ul.products li.product .npnfw-badge {
    top: 10px;
    right: 10px;
}

/* Responsive Badge Sizing */
@media (max-width: 1024px) {
    .npnfw-badge {
        top: 8px;
        right: 8px;
        padding: 4px 8px;
        font-size: 11px;
    }
    
    .npnfw-badge-single {
        top: 12px;
        right: 12px;
        padding: 6px 10px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    .npnfw-badge {
        top: 5px;
        right: 5px;
        padding: 4px 6px;
        font-size: 10px;
    }
    
    .npnfw-badge-single {
        top: 10px;
        right: 10px;
        padding: 5px 8px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .npnfw-badge {
        top: 3px;
        right: 3px;
        padding: 3px 5px;
        font-size: 9px;
    }
    
    .npnfw-badge-single {
        top: 8px;
        right: 8px;
        padding: 4px 6px;
        font-size: 11px;
    }
}

/* Badge Variations */

/* Rounded Badge */
.npnfw-badge-rounded {
    border-radius: 50px;
    padding: 6px 12px;
}

/* Square Badge */
.npnfw-badge-square {
    border-radius: 0;
}

/* Outlined Badge */
.npnfw-badge-outline {
    background: transparent;
    border: 2px solid;
    color: inherit;
}

/* Badge with Icon */
.npnfw-badge-icon::before {
    content: '★';
    margin-right: 3px;
}

/* Badge Positioning Adjustments for Different Product Layouts */

/* Grid Layout */
.woocommerce.columns-2 ul.products li.product .npnfw-badge,
.woocommerce.columns-3 ul.products li.product .npnfw-badge,
.woocommerce.columns-4 ul.products li.product .npnfw-badge,
.woocommerce.columns-5 ul.products li.product .npnfw-badge {
    top: 10px;
    right: 10px;
}

/* List Layout */
.woocommerce.list-view ul.products li.product .npnfw-badge {
    top: 15px;
    right: 15px;
}

/* Badge Accessibility */
.npnfw-badge {
    speak: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Screen Reader Text */
.npnfw-badge .screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .npnfw-badge {
        border: 2px solid;
        font-weight: 900;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .npnfw-badge {
        animation: none;
        transition: none;
    }
}

/* RTL Support */
[dir="rtl"] .npnfw-badge {
    right: auto;
    left: 10px;
}

[dir="rtl"] .npnfw-badge-single {
    right: auto;
    left: 15px;
}

/* Print Styles */
@media print {
    .npnfw-badge {
        display: none;
    }
}

/* Badge Stacking (when multiple badges are present) */
.npnfw-badge + .npnfw-badge {
    top: 40px;
}

.npnfw-badge + .npnfw-badge + .npnfw-badge {
    top: 70px;
}

/* Badge Color Variations */
.npnfw-badge-red {
    background: #dc3545;
    color: #ffffff;
}

.npnfw-badge-green {
    background: #28a745;
    color: #ffffff;
}

.npnfw-badge-blue {
    background: #007bff;
    color: #ffffff;
}

.npnfw-badge-yellow {
    background: #ffc107;
    color: #212529;
}

.npnfw-badge-orange {
    background: #fd7e14;
    color: #ffffff;
}

.npnfw-badge-purple {
    background: #6f42c1;
    color: #ffffff;
}

.npnfw-badge-pink {
    background: #e83e8c;
    color: #ffffff;
}

.npnfw-badge-teal {
    background: #20c997;
    color: #ffffff;
}

/* Badge Text Effects */
.npnfw-badge-glow {
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
}

.npnfw-badge-shadow {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}