
/* =========================================
   PRAWNIKOM PRO — ŚWIADECTWA ENERGETYCZNE
   ========================================= */

.energy-shell {
    --en-navy: #142641;
    --en-gold: #c6a46a;
    --en-border: #dce4ee;
    --en-muted: #64748b;
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    padding: 24px;
    margin: 0;
    background: #f1f5f9;
    color: var(--en-navy);
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
}

.energy-shell * {
    box-sizing: border-box;
    border-radius: 0 !important;
}

.energy-shell [hidden] {
    display: none !important;
}

.energy-shell a {
    text-decoration: none !important;
    color: var(--en-navy);
}

.energy-shell h1,
.energy-shell h2,
.energy-shell h3 {
    color: var(--en-navy);
    margin: 0 0 12px;
}

.energy-shell p {
    line-height: 1.7;
}

.energy-shell section[id] {
    scroll-margin-top: calc(var(--pp-header-offset, 120px) + 20px);
}

/* HERO */

.energy-shell .pp-section-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    align-items: center;
    gap: 30px;
    padding: 36px;
    margin-bottom: 20px;
    background: linear-gradient(115deg, #0d192d, #203b5e);
    border-bottom: 3px solid var(--en-gold);
    color: #fff;
    overflow: hidden;
}

.energy-shell .pp-section-hero h1 {
    color: #fff;
    font-family: Georgia, serif;
    font-size: clamp(28px, 3vw, 44px);
    line-height: 1.2;
}

.energy-shell .pp-section-hero p {
    color: #cbd5e1;
    font-size: 16px;
}

.energy-shell .pp-section-hero-crumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 20px;
    font-size: 12px;
    color: #e4c78e;
}

.energy-shell .pp-section-hero-crumbs a {
    color: #e4c78e !important;
}

.energy-shell .pp-section-hero-art {
    display: block;
    width: 100%;
    max-height: 260px;
    height: auto;
    object-fit: contain;
}

/* OKRUSZKI */

.energy-shell .energy-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 0;
    font-size: 13px;
    color: var(--en-muted);
}

.energy-shell .energy-breadcrumb a {
    font-weight: 600;
}

.energy-shell .energy-eyebrow {
    display: block;
    margin-bottom: 12px;
    color: #96702d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
}

/* KREATOR MIEJSCOWOŚCI */

.energy-shell .en-discovery {
    padding: 30px;
    margin-bottom: 20px;
    background: #fff;
    border: 1px solid var(--en-border);
    border-top: 3px solid var(--en-gold);
}

.energy-shell .en-discovery-intro {
    max-width: 1000px;
    font-size: 17px;
    margin: 0 0 24px;
}

.energy-shell .en-wizard {
    background: #f5f7fa;
    border: 1px solid var(--en-border);
    padding: 26px;
}

.energy-shell .en-wizard-progress {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    padding-bottom: 20px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--en-border);
}

.energy-shell .en-wizard-progress b {
    background: var(--en-navy);
    color: #fff;
    padding: 10px 18px;
    font-size: 13px;
}

.energy-shell .en-wizard-progress span {
    color: var(--en-muted);
    font-size: 13px;
}

.energy-shell .en-wizard h2 {
    font-family: Georgia, serif;
    font-size: 27px;
}

.energy-shell #en-wizard-form {
    margin-top: 20px;
}

.energy-shell #en-place-name {
    display: block;
    width: 100%;
    min-height: 56px;
    margin-top: 8px;
    padding: 12px 18px;
    font-size: 16px;
    background: #fff;
    color: var(--en-navy);
    border: 1px solid #cbd5e1;
}

.energy-shell #en-wizard-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
    gap: 10px;
    margin-top: 16px;
}

.energy-shell #en-wizard-options button {
    min-height: 50px;
    padding: 12px 16px;
    text-align: left;
    background: #fff;
    border: 1px solid var(--en-border);
    color: var(--en-navy);
    cursor: pointer;
}

.energy-shell #en-wizard-options button:hover {
    background: #f4efe4;
    border-color: var(--en-gold);
}

.energy-shell .en-wizard-note {
    font-size: 13px;
    color: var(--en-muted);
}

/* STATYSTYKI */

.energy-shell .en-discovery-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 22px 0 12px;
}

.energy-shell .en-discovery-footer > span {
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: #fff;
    border: 1px solid var(--en-border);
    border-left: 3px solid var(--en-gold);
    color: var(--en-muted);
    font-size: 13px;
}

.energy-shell .en-discovery-footer b {
    display: block;
    color: var(--en-navy);
    font-size: clamp(24px, 3vw, 36px);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.energy-shell #energy-coverage {
    color: var(--en-muted);
    font-size: 12px;
}

/* NAWIGACJA DZIAŁU */

.energy-shell .energy-section-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px;
    background: var(--en-gold);
    margin-bottom: 24px;
    border-bottom: 3px solid var(--en-gold);
}

.energy-shell .energy-section-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px 12px;
    background: var(--en-navy);
    color: #fff !important;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

.energy-shell .energy-section-nav a:hover {
    background: #294361;
    color: #e4c78e !important;
}

/* SEKCJE */

.energy-shell .energy-section {
    background: #fff;
    border: 1px solid var(--en-border);
    padding: 24px;
    margin-bottom: 24px;
    min-width: 0;
}

.energy-shell .energy-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.energy-shell .energy-section-title h2 {
    font-family: Georgia, serif;
    font-size: 30px;
}

.energy-shell .energy-source-tag {
    padding: 8px 14px;
    background: #f4efe4;
    border: 1px solid #dfcfac;
    color: #805d22;
    font-size: 12px;
    font-weight: 600;
}

/* FILTRY ZAAWANSOWANE */

.energy-shell .en-advanced {
    border: 1px solid var(--en-border);
    margin-bottom: 24px;
    background: #fff;
}

.energy-shell .en-advanced > summary {
    padding: 18px 22px;
    background: #f5f7fa;
    color: var(--en-navy);
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
}

.energy-shell .energy-filters {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: 18px;
    padding: 24px;
    background: #fff;
}

.energy-shell .energy-query {
    grid-column: span 2;
}

.energy-shell label,
.energy-shell .energy-place-picker > label {
    color: var(--en-navy);
    font-size: 13px;
    font-weight: 600;
}

.energy-shell input:not([type="radio"]):not([type="checkbox"]):not([type="hidden"]),
.energy-shell select {
    width: 100%;
    min-width: 0;
    min-height: 46px;
    padding: 10px 14px;
    margin-top: 7px;
    background: #fff;
    color: var(--en-navy);
    border: 1px solid #cbd5e1;
    font: inherit;
    box-shadow: none;
}

.energy-shell input::placeholder {
    color: #8793a4;
    font-weight: 400;
}

.energy-shell input:focus-visible,
.energy-shell select:focus-visible,
.energy-shell button:focus-visible,
.energy-shell a:focus-visible {
    outline: 2px solid #96702d;
    outline-offset: 3px;
}

.energy-shell #energy-place-context {
    display: block;
    margin-top: 6px;
    color: var(--en-muted);
    font-size: 11px;
}

.energy-shell .energy-filter-actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid var(--en-border);
}

.energy-shell .energy-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 22px;
    background: #fff;
    color: var(--en-navy);
    border: 1px solid #cbd5e1;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.energy-shell .energy-btn.primary {
    background: var(--en-navy);
    border-color: var(--en-navy);
    color: #fff;
}

.energy-shell .energy-checkbox {
    display: flex;
    align-items: center;
    gap: 9px;
}

.energy-shell input[type="checkbox"],
.energy-shell input[type="radio"] {
    accent-color: var(--en-navy);
}

/* UKŁAD WYNIKÓW */

.energy-shell .en-result-layout {
    display: grid;
    grid-template-columns: 245px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
}

.energy-shell .energy-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    gap: 18px;
    min-width: 0;
    align-items: start;
}

/* PRZEDZIAŁY ENERGETYCZNE */

.energy-shell .en-category-eu1 { --eu-color: #166534; --eu-bg: #dcfce7; }
.energy-shell .en-category-eu2 { --eu-color: #3f6212; --eu-bg: #ecfccb; }
.energy-shell .en-category-eu3 { --eu-color: #71620c; --eu-bg: #fef9c3; }
.energy-shell .en-category-eu4 { --eu-color: #92400e; --eu-bg: #fef3c7; }
.energy-shell .en-category-eu5 { --eu-color: #9a3412; --eu-bg: #ffedd5; }
.energy-shell .en-category-eu6 { --eu-color: #b91c1c; --eu-bg: #fee2e2; }
.energy-shell .en-category-eu7 { --eu-color: #881337; --eu-bg: #ffe4e6; }
.energy-shell .en-category-unknown { --eu-color: #64748b; --eu-bg: #f1f5f9; }

.energy-shell .en-category-filter {
    position: sticky;
    top: calc(var(--pp-header-offset, 120px) + 20px);
    background: #fff;
    border: 1px solid var(--en-border);
    border-top: 3px solid var(--en-gold);
    padding: 18px;
}

.energy-shell .en-category-filter h3 {
    font-size: 17px;
}

.energy-shell .en-category-filter p {
    font-size: 11px;
    color: var(--en-muted);
    line-height: 1.6;
}

.energy-shell .en-category-options {
    display: grid;
    gap: 5px;
    margin: 16px 0;
}

.energy-shell .en-category-option {
    display: grid;
    grid-template-columns: 16px 10px minmax(0, 1fr) auto;
    align-items: center;
    gap: 7px;
    min-height: 43px;
    padding: 9px 6px;
    border: 1px solid var(--en-border);
    background: #fff;
    cursor: pointer;
    font-size: 11px;
}

.energy-shell .en-category-option input {
    margin: 0;
}

.energy-shell .en-category-option i {
    width: 9px;
    height: 22px;
    background: var(--eu-color, #142641);
}

.energy-shell .en-category-option b {
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.energy-shell .en-category-option:has(input:checked) {
    background: var(--eu-bg, #eaf0f7);
    border-color: var(--eu-color, #142641);
}

/* KARTY ŚWIADECTW */

.energy-shell .energy-results {
    min-width: 0;
    padding: 0;
    background: #fff;
    border: 1px solid var(--en-border);
}

.energy-shell .energy-results-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px;
    border-bottom: 1px solid var(--en-border);
}

.energy-shell .energy-results-top h3 {
    margin: 0;
    font-size: 17px;
}

.energy-shell #energy-result-count {
    font-size: 12px;
    color: var(--en-muted);
}

.energy-shell .energy-rows {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
}

.energy-shell a.energy-card {
    display: grid;
    grid-template-columns: 106px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid var(--en-border);
    border-left: 3px solid var(--eu-color, #64748b);
    color: var(--en-navy) !important;
    min-width: 0;
    transition: background .15s, border-color .15s;
}

.energy-shell a.energy-card:hover {
    background: #f8fafc;
    border-color: var(--en-gold);
}

.energy-shell .en-eu-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 120px;
    padding: 12px 6px;
    background: var(--eu-bg, #f1f5f9);
    color: var(--eu-color, #64748b);
    border: 1px solid currentColor;
}

.energy-shell .en-eu-badge small {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

.energy-shell .en-eu-badge strong {
    font-size: 30px;
    font-weight: 750;
    line-height: 1.2;
}

.energy-shell .en-eu-badge em {
    font-style: normal;
    font-size: 9px;
}

.energy-shell .en-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 10px;
    min-width: 0;
}

.energy-shell .energy-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.energy-shell .energy-card-head strong {
    display: block;
    font-size: 17px;
    color: var(--en-navy);
    overflow-wrap: anywhere;
}

.energy-shell .energy-certificate-number {
    display: block;
    margin-top: 4px;
    color: var(--en-muted);
    font-size: 11px;
    overflow-wrap: anywhere;
}

.energy-shell .energy-mini-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 8px;
    background: #e8f4ec;
    color: #166534;
    font-size: 10px;
    font-weight: 600;
}

.energy-shell .energy-mini-tag.neutral {
    background: #f4efe4;
    color: #805d22;
}

.energy-shell .energy-dot {
    width: 6px;
    height: 6px;
    border-radius: 50% !important;
    background: #15803d;
}

.energy-shell .energy-card-location {
    display: block;
    font-size: 12px;
    color: #475569;
    overflow-wrap: anywhere;
}

.energy-shell .energy-card-values {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) 25px;
    gap: 5px;
}

.energy-shell .energy-card-values > span:not(.energy-card-arrow) {
    display: flex;
    flex-direction: column;
    padding: 8px;
    background: #f5f7fa;
    border: 1px solid var(--en-border);
    font-size: 10px;
    color: var(--en-muted);
}

.energy-shell .energy-card-values b {
    display: block;
    color: var(--en-navy);
    font-size: 15px;
    font-variant-numeric: tabular-nums;
}

.energy-shell .energy-card-arrow {
    align-self: center;
    text-align: center;
    color: #96702d;
    font-size: 21px;
}

.energy-shell .en-category-note {
    font-size: 10px;
    color: var(--eu-color, #64748b);
}

/* SZCZEGÓŁY ŚWIADECTWA */

.energy-shell .energy-detail {
    position: sticky;
    top: calc(var(--pp-header-offset, 120px) + 20px);
    min-width: 0;
    background: #fff;
    border: 1px solid var(--en-border);
    border-top: 3px solid var(--en-gold);
    padding: 22px;
    overflow-wrap: anywhere;
}

.energy-shell .energy-empty {
    padding: 24px 4px;
    text-align: center;
}

.energy-shell .energy-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 0 auto 20px;
    background: var(--en-navy);
    color: var(--en-gold);
    font-size: 32px;
}

.energy-shell .energy-empty h3 {
    font-size: 18px;
}

.energy-shell .energy-empty p {
    font-size: 13px;
    color: var(--en-muted);
}

/* PAGINACJA */

.energy-shell .energy-pages {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    padding: 20px;
    border-top: 1px solid var(--en-border);
}

.energy-shell .energy-pages span {
    font-size: 12px;
    color: var(--en-muted);
}

.energy-shell .energy-pages button:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.energy-shell .energy-pages button:not(:disabled):hover {
    background: var(--en-navy);
    color: #fff;
}

/* ATLAS NIERUCHOMOŚCI */

.energy-shell .en-atlas-entry {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 24px;
    padding: 30px;
    margin-bottom: 24px;
    background: linear-gradient(115deg, #0d192d, #203b5e);
    border-left: 4px solid var(--en-gold);
    color: #dbe5f0 !important;
}

.energy-shell .en-atlas-entry b {
    display: inline-block;
    margin-bottom: 8px;
    color: #fff;
    font-family: Georgia, serif;
    font-size: 27px;
}

.energy-shell .en-atlas-entry strong {
    padding: 13px 22px;
    background: #d9bc85;
    color: var(--en-navy);
    font-size: 13px;
}

/* ŹRÓDŁA I OBJAŚNIENIA */

.energy-shell .energy-about {
    padding: 30px;
}

.energy-shell .energy-about h2 {
    font-family: Georgia, serif;
    font-size: 30px;
}

.energy-shell .energy-explain-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-top: 24px;
}

.energy-shell .energy-explain-grid article {
    padding: 24px;
    background: #f5f7fa;
    border: 1px solid var(--en-border);
    border-top: 3px solid var(--en-gold);
}

.energy-shell .energy-explain-grid h3 {
    font-size: 18px;
}

.energy-shell .energy-explain-grid p {
    font-size: 13px;
    margin-bottom: 0;
}

.energy-shell .energy-explain-grid a {
    color: #174b92;
    font-weight: 600;
}

.energy-shell .energy-muted {
    color: var(--en-muted);
    font-size: 12px;
}

/* RESPONSYWNOŚĆ */

@media (max-width: 1500px) {
    .energy-shell .energy-workspace {
        grid-template-columns: minmax(0, 1fr);
    }

    .energy-shell .energy-detail {
        position: static;
    }
}

@media (max-width: 1100px) {
    .energy-shell {
        padding: 16px;
    }

    .energy-shell .en-result-layout {
        grid-template-columns: 220px minmax(0, 1fr);
    }

    .energy-shell .energy-filters {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .energy-shell .pp-section-hero {
        grid-template-columns: minmax(0, 1fr) 240px;
        padding: 26px;
    }
}

@media (max-width: 760px) {
    .energy-shell {
        padding: 10px;
    }

    .energy-shell .pp-section-hero,
    .energy-shell .en-result-layout,
    .energy-shell .energy-workspace,
    .energy-shell .energy-filters,
    .energy-shell .energy-explain-grid,
    .energy-shell .energy-section-nav {
        grid-template-columns: minmax(0, 1fr);
    }

    .energy-shell .energy-query {
        grid-column: auto;
    }

    .energy-shell .pp-section-hero-art {
        max-height: 170px;
    }

    .energy-shell .en-category-filter {
        position: static;
    }

    .energy-shell .en-category-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .energy-shell .en-discovery,
    .energy-shell .energy-section,
    .energy-shell .en-wizard,
    .energy-shell .energy-filters {
        padding: 16px;
    }

    .energy-shell a.energy-card {
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 10px;
        padding: 10px;
    }

    .energy-shell .en-eu-badge strong {
        font-size: 24px;
    }

    .energy-shell .energy-card-values {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .energy-shell .energy-card-arrow {
        display: none;
    }

    .energy-shell .energy-rows {
        padding: 8px;
    }
}

@media (max-width: 400px) {
    .energy-shell .en-discovery-footer,
    .energy-shell .en-category-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .energy-shell a.energy-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .energy-shell .en-eu-badge {
        min-height: 85px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .energy-shell * {
        transition: none !important;
    }
}

