/* ========================================= */
/* EPREL Fiche Connector - Frontend Styles   */
/* v7.0.0 - Model design + Elementor support */
/* ========================================= */

/* === EPREL Fiche Card (with EPREL data) === */
.eprel-fiche-section{max-width:600px;margin:0 auto;padding:20px;background:#fff;border:1px solid #ddd;border-radius:8px;box-shadow:0 2px 8px rgba(0,0,0,.06);}
/* Inside WooCommerce tabs - remove margin and shadow */
.woocommerce-Tabs-panel .eprel-fiche-section{max-width:100%;margin:0;box-shadow:none;}
.woocommerce-Tabs-panel .eprel-fiche-attrs-fallback{max-width:100%;margin:0;border:none;border-radius:0;padding:0;}
.eprel-fiche-section *{box-sizing:border-box;}

/* === Header === */
.eprel-fiche-header{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;margin-bottom:15px;padding-bottom:15px;border-bottom:1px solid #eee;}
.eprel-fiche-logo{display:flex;align-items:center;gap:8px;}
.eprel-fiche-logo img{width:28px;height:auto;}
.eprel-fiche-title{font-size:16px;font-weight:700;color:#1a1a1a;}
.eprel-fiche-variation-sku{font-size:11px;color:#666;background:#f0f0f0;padding:2px 8px;border-radius:3px;}

/* === Energy Badge === */
.eprel-fiche-energy-badge{display:inline-flex;align-items:center;gap:8px;}
.eprel-fiche-energy-label{font-size:11px;color:#666;}
.eprel-fiche-energy-class{display:inline-flex;align-items:center;justify-content:center;padding:4px 12px;border-radius:4px;font-weight:700;font-size:14px;color:#fff;}
.eprel-ec-a,.eprel-ec-a+,.eprel-ec-a++,.eprel-ec-a+++{background:#46b450;}
.eprel-ec-b{background:#78be20;}
.eprel-ec-c{background:#c7d200;}
.eprel-ec-d{background:#ffd700;color:#333!important;}
.eprel-ec-e{background:#f5a623;}
.eprel-ec-f{background:#e77d2b;}
.eprel-ec-g{background:#dc3232;}

/* === EPREL Specs (fiche data) === */
.eprel-fiche-specs{margin:15px 0;padding:12px;background:#f9f9f9;border-radius:6px;}
.eprel-fiche-spec-item{display:flex;justify-content:space-between;padding:6px 0;border-bottom:1px solid #eee;font-size:13px;}
.eprel-fiche-spec-item:last-child{border-bottom:none;}
.eprel-fiche-spec-label{color:#666;font-weight:500;}
.eprel-fiche-spec-value{font-weight:600;color:#1a1a1a;text-align:right;}

/* === Action Buttons (EPREL fiche) === */
.eprel-fiche-actions{display:flex;gap:10px;flex-wrap:wrap;margin:15px 0;}
.eprel-fiche-btn{display:inline-flex;align-items:center;gap:6px;padding:10px 18px;border-radius:4px;font-size:13px;font-weight:600;text-decoration:none!important;transition:all .2s ease;border:none;cursor:pointer;}
.eprel-fiche-btn svg{flex-shrink:0;}
.eprel-fiche-btn-pdf{background:#1a7a3c;color:#fff!important;}
.eprel-fiche-btn-pdf:hover{background:#156832;}
.eprel-fiche-btn-link{background:#f0f0f1;color:#1a1a1a!important;border:1px solid #dcdcde;}
.eprel-fiche-btn-link:hover{background:#dcdcde;}

/* === Registration Number === */
.eprel-fiche-reg-number{font-size:11px;color:#999;text-align:center;margin-top:10px;}

/* === Loading / Animation === */
.eprel-fiche-loading{text-align:center;padding:20px;color:#666;}
.eprel-fiche-spinner{display:inline-block;width:20px;height:20px;border:2px solid #ddd;border-top-color:#1a7a3c;border-radius:50%;animation:eprel-spin .6s linear infinite;vertical-align:middle;margin-right:8px;}
@keyframes eprel-spin{to{transform:rotate(360deg);}}
.eprel-fiche-variable{animation:eprel-fadein .3s ease;}
@keyframes eprel-fadein{from{opacity:0;transform:translateY(5px);}to{opacity:1;transform:translateY(0);}}

/* ========================================= */
/* FALLBACK: Atribute produs (fara fisa EPREL) */
/* Model: green-themed, clean table,         */
/* prominent green "Descarca Fisa Tehnica"   */
/* ========================================= */

/* Container principal fallback */
.eprel-fiche-attrs-fallback{
    background:#fff;
    border:1px solid #d0d0d0;
    border-radius:4px;
    overflow:hidden;
    font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;
}

/* Header fallback - green accent bar on left */
.eprel-fallback-header{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:14px 18px;
    border-bottom:2px solid #1a7a3c;
    background:#fff;
}
.eprel-fallback-header-left{
    display:flex;
    align-items:center;
    gap:12px;
}
.eprel-fallback-header-icon{
    display:flex;
    align-items:center;
    justify-content:center;
    width:36px;
    height:36px;
    background:#1a7a3c;
    border-radius:4px;
    flex-shrink:0;
}
.eprel-fallback-header-icon svg{
    width:20px;
    height:20px;
    stroke:#fff;
    stroke-width:2;
    fill:none;
}
.eprel-fallback-title{
    font-size:15px;
    font-weight:700;
    color:#1a7a3c;
    margin:0;
    line-height:1.3;
    text-transform:uppercase;
    letter-spacing:.5px;
}
.eprel-fallback-sku{
    font-size:11px;
    color:#666;
    background:#f0f0f0;
    padding:3px 10px;
    border-radius:12px;
    margin-left:8px;
    font-weight:500;
    letter-spacing:.3px;
}

/* Tabel specificatii fallback - clean two-column */
.eprel-fallback-specs-table{
    width:100%;
    border-collapse:collapse;
}
.eprel-fallback-specs-table .eprel-fallback-spec-row{
    display:flex;
    justify-content:space-between;
    align-items:center;
    padding:10px 18px;
    font-size:13px;
    line-height:1.5;
    border-bottom:1px solid #e8e8e8;
    transition:background .15s ease;
}
.eprel-fallback-specs-table .eprel-fallback-spec-row:nth-child(even){
    background:#fafafa;
}
.eprel-fallback-specs-table .eprel-fallback-spec-row:last-child{
    border-bottom:none;
}
.eprel-fallback-spec-label{
    color:#555;
    font-weight:500;
    flex-shrink:0;
    margin-right:20px;
    font-size:13px;
}
.eprel-fallback-spec-value{
    color:#111;
    font-weight:600;
    text-align:right;
    word-break:break-word;
    max-width:60%;
    font-size:13px;
}

/* Butoane fallback - design model (green primary) */
.eprel-fallback-actions{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    padding:18px 18px;
    border-top:2px solid #1a7a3c;
    background:#fff;
    flex-wrap:wrap;
}

/* Buton primar: Descarca Fisa Tehnica (PDF) - GREEN prominent */
.eprel-fallback-btn-pdf{
    display:inline-flex!important;
    align-items:center;
    gap:8px;
    padding:12px 28px!important;
    background:#1a7a3c!important;
    color:#fff!important;
    border-radius:4px!important;
    font-size:13px!important;
    font-weight:700!important;
    text-decoration:none!important;
    transition:all .2s ease;
    border:none;
    cursor:pointer;
    line-height:1.4;
    text-transform:uppercase;
    letter-spacing:.5px;
    box-shadow:0 2px 4px rgba(26,122,60,.25);
}
.eprel-fallback-btn-pdf:hover{
    background:#156832!important;
    box-shadow:0 4px 12px rgba(26,122,60,.35);
    transform:translateY(-1px);
}
.eprel-fallback-btn-pdf:active{
    transform:translateY(0);
    box-shadow:0 1px 3px rgba(26,122,60,.3);
}
.eprel-fallback-btn-pdf svg{
    flex-shrink:0;
    width:16px;
    height:16px;
}

/* Buton secundar: Vezi pe EPREL - gri */
.eprel-fallback-btn-eprel{
    display:inline-flex!important;
    align-items:center;
    gap:8px;
    padding:12px 24px!important;
    background:#f3f4f6!important;
    color:#374151!important;
    border:1px solid #d1d5db!important;
    border-radius:4px!important;
    font-size:13px!important;
    font-weight:500!important;
    text-decoration:none!important;
    transition:all .2s ease;
    cursor:pointer;
    line-height:1.4;
}
.eprel-fallback-btn-eprel:hover{
    background:#e5e7eb!important;
    border-color:#9ca3af!important;
}
.eprel-fallback-btn-eprel svg{
    flex-shrink:0;
    width:16px;
    height:16px;
}

/* Inside WooCommerce tabs - ajustari */
.woocommerce-Tabs-panel .eprel-fallback-header{
    background:#fff;
    border-bottom:2px solid #1a7a3c;
}
.woocommerce-Tabs-panel .eprel-fallback-actions{
    background:#fff;
    border-top:2px solid #1a7a3c;
}

/* ========================================= */
/* Energy Label standalone (shortcode)       */
/* ========================================= */
.eprel-energy-label{width:60px;background:#f5f5f5;border:1px solid #ddd;border-radius:4px;overflow:hidden;position:relative;margin:5px 0;}
.eprel-energy-arrow{position:relative;padding:0;}
.eprel-energy-indicator{position:absolute;right:3px;width:6px;background:#dc3232;border-radius:2px;z-index:1;}
.eprel-energy-class{display:block;text-align:center;padding:2px 0;font-size:9px;font-weight:700;}
.eprel-class-a3{background:#46b450;color:#fff;}
.eprel-class-a2{background:#4db84d;color:#fff;}
.eprel-class-a1{background:#78be20;color:#fff;}
.eprel-class-a{background:#a6ce38;color:#333;}
.eprel-class-b{background:#c7d200;color:#333;}
.eprel-class-c{background:#ffd700;color:#333;}
.eprel-class-d{background:#f5a623;color:#fff;}
.eprel-class-e{background:#e77d2b;color:#fff;}
.eprel-class-f{background:#dc3232;color:#fff;}
.eprel-class-g{background:#a31e1e;color:#fff;}

/* ========================================= */
/* Legacy / compatibilitate (pastrat)        */
/* ========================================= */
.eprel-fiche-no-data{border-color:#e5e5e5;background:#fafafa;}
.eprel-fiche-no-data .eprel-fiche-title{color:#666;}
.eprel-fiche-short-description{font-size:14px;line-height:1.7;color:#444;padding:12px 0;margin-bottom:10px;}
.eprel-fiche-short-description p{margin:0 0 10px 0;}
.eprel-fiche-short-description p:last-child{margin-bottom:0;}
.eprel-fiche-short-description ul,.eprel-fiche-short-description ol{margin:5px 0 10px 20px;padding:0;}
.eprel-fiche-no-data-notice{display:flex;align-items:center;gap:6px;padding:8px 12px;background:#fff3cd;border:1px solid #f0c53e;border-radius:4px;font-size:12px;color:#856404;}

/* ========================================= */
/* Elementor Widget - Inline Styles                */
/* ========================================= */
.eprel-el-container{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen-Sans,Ubuntu,Cantarell,"Helvetica Neue",sans-serif;overflow:hidden;}
.eprel-el-header{display:flex;justify-content:space-between;align-items:center;padding:14px 18px;border-bottom:2px solid #1a7a3c;background:#fff;}
.eprel-el-header-left{display:flex;align-items:center;gap:12px;}
.eprel-el-header-icon{display:flex;align-items:center;justify-content:center;width:36px;height:36px;background:#1a7a3c;border-radius:4px;flex-shrink:0;}
.eprel-el-header-icon svg{width:20px;height:20px;stroke:#fff;stroke-width:2;fill:none;}
.eprel-el-header-title{font-size:15px;font-weight:700;color:#1a7a3c;margin:0;line-height:1.3;text-transform:uppercase;letter-spacing:.5px;}
.eprel-el-sku{font-size:11px;color:#666;background:#e9ecef;padding:3px 10px;border-radius:12px;margin-left:8px;font-weight:500;}
.eprel-el-content-area{display:flex;gap:8px;padding:0 18px 18px;}
.eprel-el-product-image{flex-shrink:0;overflow:hidden;}
.eprel-el-product-image img{width:100%;height:auto;display:block;object-fit:contain;border-radius:4px;border:1px solid #ddd;}
.eprel-el-caracteristici{flex:1;min-width:0;}
.eprel-el-car-text{font-size:13px;line-height:1.6;color:#333;}
.eprel-el-car-text p{margin:0 0 8px 0;}
.eprel-el-specs-table{width:100%;}
.eprel-el-spec-row{display:flex;justify-content:space-between;align-items:center;padding:10px 18px;font-size:13px;line-height:1.5;border-bottom:1px solid #e8e8e8;}
.eprel-el-spec-row:nth-child(even){background:#fafafa;}
.eprel-el-spec-row:last-child{border-bottom:none;}
.eprel-el-spec-label{color:#555;font-weight:500;flex-shrink:0;margin-right:20px;}
.eprel-el-spec-value{color:#111;font-weight:600;text-align:right;word-break:break-word;max-width:60%;}
.eprel-el-actions{display:flex;align-items:center;justify-content:center;gap:12px;padding:18px;border-top:2px solid #1a7a3c;background:#fff;}
.eprel-el-btn-pdf{display:inline-flex!important;align-items:center;gap:8px;padding:12px 28px!important;background:#1a7a3c!important;color:#fff!important;border-radius:4px!important;font-size:13px!important;font-weight:700!important;text-decoration:none!important;transition:all .2s ease;border:none;cursor:pointer;line-height:1.4;text-transform:uppercase;letter-spacing:.5px;box-shadow:0 2px 4px rgba(26,122,60,.25);}
.eprel-el-btn-pdf:hover{background:#156832!important;box-shadow:0 4px 12px rgba(26,122,60,.35);transform:translateY(-1px);}
.eprel-el-btn-pdf:active{transform:translateY(0);box-shadow:0 1px 3px rgba(26,122,60,.3);}
.eprel-el-btn-pdf svg{flex-shrink:0;width:16px;height:16px;}
.eprel-el-btn-eprel{display:inline-flex!important;align-items:center;gap:8px;padding:12px 24px!important;background:#f3f4f6!important;color:#374151!important;border:1px solid #d1d5db!important;border-radius:4px!important;font-size:13px!important;font-weight:500!important;text-decoration:none!important;transition:all .2s ease;cursor:pointer;line-height:1.4;}
.eprel-el-btn-eprel:hover{background:#e5e7eb!important;border-color:#9ca3af!important;}
.eprel-el-btn-eprel svg{flex-shrink:0;width:16px;height:16px;}
.eprel-fiche-no-data-icon{display:inline-flex;flex-shrink:0;color:#d4930d;}