/* Exact EU Energy Efficiency Label Match */

.energy-efficiency-component {
    position: absolute;
    bottom: 5px;
    left: 10px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: auto;
}

.energy-efficiency-lightbox-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s ease;
    pointer-events: auto;
    position: relative;
    z-index: 1000;
}

.energy-efficiency-lightbox-link:hover {
    opacity: 0.8;
}

.energy-efficiency-lightbox-link:hover .energy-label-row {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

.energy-efficiency-lightbox-link:hover .energy-arrow {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.energy-efficiency-lightbox-link:hover .energy-letter {
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.energy-label-row {
    display: flex;
    align-items: center;
    border: none !important;
}

.energy-arrow {
    width: 45px;
    height: 40px;
    background: #008B5A; /* Default A class dark green */
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    /* Arrow pointing LEFT with proper EU shape */
    clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
}

.energy-arrow::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-right: 12px solid #008B5A;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
}

.energy-letter {
    font-size: 28px;
    font-weight: bold;
    color: white;
    font-family: Arial, sans-serif;
}

.energy-scale {
    width: 18px;
    height: 40px;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px;
    margin-left: -1px;
    border: none !important;
}

.scale-top {
    font-size: 9px;
    font-weight: bold;
    color: black;
    font-family: Arial, sans-serif;
    line-height: 1;
}

.scale-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scale-arrow svg {
    width: 10px;
    height: 10px;
}

.scale-bottom {
    font-size: 9px;
    font-weight: bold;
    color: black;
    font-family: Arial, sans-serif;
    line-height: 1;
}

.product-data-link {
    color: #666 !important;
    text-decoration: underline !important;
    font-size: 11px;
    font-family: Arial, sans-serif;
    pointer-events: auto; /* Allow clicks on the link */
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.product-data-link:hover {
    color: black !important;
    text-decoration: none !important;
}

.energy-efficiency-component .energy-label-row {
    display: flex;
    align-items: center;
    border: none !important;
    pointer-events: auto;
}

.energy-efficiency-component .energy-arrow {
    width: 45px;
    height: 40px;
    background: rgb(0, 150, 64);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    clip-path: polygon(12px 0, 100% 0, 100% 100%, 12px 100%, 0 50%);
}

.energy-efficiency-component .energy-arrow::after {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-right: 12px solid #008B5A;
    border-top: 20px solid transparent;
    border-bottom: 20px solid transparent;
}

.energy-efficiency-component .energy-letter {
    font-size: 22px;
    font-weight: bold;
    color: white;
    font-family: Arial, sans-serif;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .25);
}

.energy-efficiency-component .energy-scale {
    width: 18px;
    height: 40px;
    background: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 4px 2px;
    margin-left: -1px;
    border: none !important;
}

.energy-efficiency-component .scale-top,
.energy-efficiency-component .scale-bottom {
    font-size: 9px;
    font-weight: bold;
    color: black;
    font-family: Arial, sans-serif;
    line-height: 1;
}

.energy-efficiency-component .scale-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
}

.scale-arrow svg {
    width: 10px;
    height: 10px;
}

.energy-efficiency-component .product-data-link {
    color: #666 !important;
    text-decoration: underline !important;
    font-size: 11px;
    font-family: Arial, sans-serif;
    pointer-events: auto;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

.energy-efficiency-component .product-data-link:hover {
    color: black !important;
    text-decoration: none !important;
}
/* EU Standard Energy Efficiency Colors - Exact Match */
/* A-Varianten */
.energy-arrow.energy-a, .energy-efficiency-component .energy-arrow.energy-a { 
    /* Basis A */ 
    background: #f9ee0f !important; 
}
.energy-arrow.energy-a::after, .energy-efficiency-component .energy-arrow.energy-a::after {
    border-right-color: #f9ee0f !important;
}
.energy-arrow.energy-a-plus, .energy-efficiency-component .energy-arrow.energy-a-plus { 
    /* A+ */ 
    background: #bcd521 !important; 
}
.energy-arrow.energy-a-plus::after, .energy-efficiency-component .energy-arrow.energy-a-plus::after {
    border-right-color: #bcd521 !important;
}
.energy-arrow.energy-a-plus2, .energy-efficiency-component .energy-arrow.energy-a-plus2 { 
    /* A++ */ 
    background: #49b340 !important; 
}
.energy-arrow.energy-a-plus2::after, .energy-efficiency-component .energy-arrow.energy-a-plus2::after {
    border-right-color: #49b340 !important;
}
.energy-arrow.energy-a-plus3, .energy-efficiency-component .energy-arrow.energy-a-plus3 { 
    /* A+++ */
    background: #14a448 !important; 
}
.energy-arrow.energy-a-plus3::after, .energy-efficiency-component .energy-arrow.energy-a-plus3::after {
    border-right-color: #14a448 !important;
}
/* Plus-Zeichen separat stylbar */
.energy-plus, .energy-efficiency-component .energy-plus { /* z.B. kleinere Schrift, Versatz, Farbe */
    font-size: 75%;
    font-weight: bold;
    color: #ffffff !important;
    text-shadow: 1px 1px 1px rgba(0, 0, 0, .25);
}
.energy-arrow.energy-b, .energy-efficiency-component .energy-arrow.energy-b {
    background: #f8b510 !important; /* Lighter green for B */
}
.energy-arrow.energy-b::after, .energy-efficiency-component .energy-arrow.energy-b::after {
    border-right-color: #f8b510 !important;
}
.energy-arrow.energy-c, .energy-efficiency-component .energy-arrow.energy-c {
    background: #ec690d !important; /* Yellow-green for C */
}
.energy-arrow.energy-c::after, .energy-efficiency-component .energy-arrow.energy-c::after   {
    border-right-color: #ec690d !important;
}

.energy-arrow.energy-c .energy-letter, .energy-efficiency-component .energy-arrow.energy-c .energy-letter {
    color: white !important;
}

.energy-arrow.energy-d, .energy-efficiency-component .energy-arrow.energy-d {
    background: #e60115 !important; /* Bright yellow for D */
}

.energy-arrow.energy-d::after, .energy-efficiency-component .energy-arrow.energy-d::after {
    border-right-color: #e60115 !important;
}

.energy-arrow.energy-d .energy-letter, .energy-efficiency-component .energy-arrow.energy-d .energy-letter {
    color: white !important;
}

.energy-arrow.energy-e, .energy-efficiency-component .energy-arrow.energy-e {
    background: #FF9800 !important; /* Orange-yellow for E */
}

.energy-arrow.energy-e::after, .energy-efficiency-component .energy-arrow.energy-e::after {
    border-right-color: #FF9800 !important;
}

.energy-arrow.energy-f, .energy-efficiency-component .energy-arrow.energy-f {
    background: #FF5722 !important; /* Orange for F */
}

.energy-arrow.energy-f::after, .energy-efficiency-component .energy-arrow.energy-f::after {
    border-right-color: #FF5722 !important;
}

.energy-arrow.energy-g, .energy-efficiency-component .energy-arrow.energy-g {
    background: #F44336 !important; /* Red for G */
}

.energy-arrow.energy-g::after, .energy-efficiency-component .energy-arrow.energy-g::after {
    border-right-color: #F44336 !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .energy-efficiency-component {
        bottom: 8px;
        left: 8px;
        width: 100px;
        gap: 6px;
    }
    
    .energy-arrow {
        width: 50px;
        height: 35px;
    }
    
    .energy-arrow::after {
        right: -12px;
        border-left-width: 12px;
        border-top-width: 17px;
        border-bottom-width: 17px;
    }
    
    .energy-letter {
        font-size: 20px;
    }
    
    .energy-scale {
        width: 16px;
        height: 35px;
    }
    
    .scale-top,
    .scale-bottom {
        font-size: 9px;
    }
    
    .product-data-link {
        font-size: 12px;
    }
}

/* Ensure the component doesn't interfere with other overlays */
.produktbild-wrap {
    position: relative;
}

.energy-efficiency-component {
    pointer-events: auto;
}

/* Override any conflicting styles */
.energy-efficiency-component * {
    box-sizing: border-box;
}

/* Force white color for D level - highest specificity */
.energy-efficiency-component .energy-arrow.energy-d .energy-letter,
.energy-arrow.energy-d .energy-letter {
    color: white !important;
}

.energy-efficiency-component .energy-arrow.energy-c .energy-letter,
.energy-arrow.energy-c .energy-letter {
    color: white !important;
}

/* Single Product Page - Center and Full Width */
.single-product .energy-efficiency-component {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

/* Ensure parent containers on single product page are full width */
.single-product .et_pb_module:has(.energy-efficiency-component),
.single-product .et_pb_code:has(.energy-efficiency-component) {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Center the component wrapper on single product pages */
.single-product .et_pb_code_inner:has(.energy-efficiency-component) {
    display: flex;
    justify-content: center;
    width: 100%;
}

/* Product data link color on single product pages */
.single-product .energy-efficiency-component .product-data-link {
    color: #4CAF50 !important;
    text-decoration: underline !important;
}

.single-product .energy-efficiency-component .product-data-link:hover {
    color: black !important;
    text-decoration: none !important;
}
