/**
 * NOTICE OF LICENSE
 *
 * This source file is subject to the EULA for Prestashop Module
 * that is bundled with this package in the file LICENSE.md.
 *
 *
 * @copyright Since 2025 Christos A. Daggas
 * @author    Christos A. Daggas <info@hotwebdesign.gr>
 * @license   End‑User License Agreement (EULA) for Prestashop Module. V1 Effective as of 22/07/2025
 * All rights reserved.
 */

/* Main Energy Label Styles */
.dx-energy-label {
  width: 100%;
  max-width:360px;
  border: 2px solid #f8f8f8;
  padding: 10px;
  background: #fff;
  box-sizing: border-box;
  margin: 15px 0;
  margin: 0 auto;
}

.dx-label-enrg-text {
  font-size: 48px;
  font-family: "Impact";
  color: #039;
  text-align: center;
}

.dx-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.dx-eu-logo ,
.dx-qr {
    text-align: center;
}

.dx-qr img,
.dx-eu-logo img {
    width:60px;
    height:auto;
}


.dx-info {
    font-size: 11px;
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
    margin-top: 5px;
    padding: 5px 0;
}

.dx-scale {
    margin: 10px 0 12px 0;
    position: relative;
}

.dx-bar-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px 0;
}

.dx-bar {
    height: 22px;
    font-size: 12px;
    font-weight: bold;
    color: white;
    padding-left: 10px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    clip-path: polygon(0 0, 85% 0, 95% 50%, 85% 100%, 0 100%);
}

/* Energy class colors and widths */
.dx-bar.dx-A { background: #007F00; width: 50%; }
.dx-bar.dx-B { background: #66B933; width: 55%; }
.dx-bar.dx-C { background: #CEDC00; width: 60%; }
.dx-bar.dx-D { background: #FFD700; width: 65%; }
.dx-bar.dx-E { background: #FF9A00; width: 70%; }
.dx-bar.dx-F { background: #FF6000; width: 75%; }
.dx-bar.dx-G { background: #FF0000; width: 80%; }

.dx-bar-label {
    height: 22px;
    width: 40px;
    font-size: 12px;
    font-weight: bold;
    color: #fff;
    background: #fff;
    text-align: center;
    line-height: 22px;
    clip-path: polygon(25% 0%, 100% 1%, 100% 100%, 25% 100%, 0% 51%);
}

.dx-bar-label.dx-active {
    background: #000;
    color: #fff;
    border: 1px solid #000;
}

.dx-kwh {
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    margin: 10px 0;
    padding: 8px 0;
    border-top: 2px solid #000;
    border-bottom: 2px solid #000;
}

.dx-icons {
    display: flex;
    justify-content: space-around;
    margin-top: 15px;
    font-size: 12px;
    flex-wrap: wrap;
    gap: 10px;
}

.dx-icons-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.dx-label {
    color: #555;
    font-size: 10px;
}

.dx-feature {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 50px;
}

.dx-icon {
    display: block;
    margin: 0 auto 4px auto;
    width: 22px;
    height: 22px;
}

.dx-value {
    font-weight: bold;
    color: #333;
}

.dx-noise {
    text-align: center;
    font-size: 12px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.dx-noise-value {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
}

.dx-noise-icon {
    width: 16px;
    height: 16px;
}

.dx-noise-class {
    font-weight: bold;
    font-size: 14px;
}

/* Compact Energy Label for Category Pages */
.dx-energy-label-compact {
    width: 120px;
    text-align:center;
    padding: 8px;
    background: #fff;
    box-sizing: border-box;
    font-family: Arial, sans-serif;
    margin: 8px 0;
    text-align: center;
}

.dx-compact-scale {
  align-items: flex-start;
  display: flex;
  flex-wrap: wrap;
  left: 0;
  padding: .25rem;
  position: absolute;
  top: -271px;
  z-index: 1;
  width: 75px;
}

.dx-compact-header {
    font-size: 10px;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.dx-eu-text {
    color: #000;
}

.dx-energy-text {
    color: #666;
}

.dx-compact-scale {
    margin: 8px 0;
}

.dx-compact-bar {
    height: 30px;
    font-size: 18px;
    font-weight: bold;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    clip-path: polygon(0 0, 85% 0, 95% 50%, 85% 100%, 0 100%);
    margin: 0 auto;
    width: 80%;
}

/* Compact energy class colors */
.dx-compact-bar.dx-A { background: #007F00; }
.dx-compact-bar.dx-B { background: #66B933; }
.dx-compact-bar.dx-C { background: #CEDC00; }
.dx-compact-bar.dx-D { background: #FFD700; }
.dx-compact-bar.dx-E { background: #FF9A00; }
.dx-compact-bar.dx-F { background: #FF6000; }
.dx-compact-bar.dx-G { background: #FF0000; }

.dx-compact-letter {
    font-size: 16px;
    font-weight: bold;
}

.dx-compact-consumption {
    font-size: 10px;
    margin-top: 8px;
    font-weight: bold;
    color: #333;
    border-top: 1px solid #ccc;
    padding-top: 4px;
}

.dx-compact-info,
.dx-compact-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.dx-compact-icon {
    width: 20px;
    height: 20px;
}

.dx-compact-label {
    font-size: 10px;
    line-height: 1.2;
}

/* Custom positioning styles */
.dx-custom {
    float: right;
    margin-left: 20px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .dx-energy-label {
        width: 100%;
        max-width: 260px;
    }
    
    .dx-energy-label-compact {
        width: 100px;
    }
    
    .dx-custom {
        float: none;
        margin: 15px auto;
    }
    
    .dx-icons {
        justify-content: center;
        gap: 8px;
    }

    .dx-icons-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Print styles */
@media print {
    .dx-energy-label,
    .dx-energy-label-compact {
        border: 2px solid #000 !important;
        background: #fff !important;
    }
    
    .dx-bar {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
    
    .dx-compact-bar {
        -webkit-print-color-adjust: exact;
        color-adjust: exact;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .dx-energy-label,
    .dx-energy-label-compact {
        border: 3px solid #000;
    }
    
    .dx-bar-label {
        border: 1px solid #000;
    }
    
    .dx-bar-label.dx-active {
        background: #000 !important;
        color: #fff !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .dx-energy-label *,
    .dx-energy-label-compact * {
        transition: none !important;
        animation: none !important;
    }
}

