/* =============================================
   POMIAR (Opomiarowanie) — Metering Page
   PX source: Liczniki_Main_Workspace_01.px (1762x955)
   Map PX: Liczniki_Main_Workspace_Map1.px (1120x785)
   ============================================= */

/* Breadcrumb icon filter */
.bc-pomiar .breadcrumb-icon {
    filter: brightness(0) invert(0.5);
}

/* === Layout containers === */
.pom-left {
    position: absolute;
    left: 95px;   /* PX 85 + 10px body offset */
    top: 70px;
    width: 490px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* === Map container — same size as lighting page === */
.pom-map-container {
    position: absolute;
    left: 630px;
    top: 55px;
    width: 1120px;
    height: 785px;
    background: #141414;
    overflow: visible;
}

.pom-map-bg {
    position: absolute;
    top: 0; left: 0;
    width: 1120px;
    height: 785px;
    object-fit: contain;
    opacity: 0.7;
    pointer-events: none;
}

/* === SVG zone overlays === */
.pom-zones-svg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 3;
}

/* Dashed outlines — green #69fe5f at 40% opacity */
.pom-zone-outline {
    fill: none;
    stroke: rgba(105,254,95,0.4);
    stroke-width: 1.5;
    stroke-dasharray: 6 4;
    stroke-linecap: square;
}

/* Zone fill — default with initial alpha from PX, updated by JS */
.pom-zone-fill {
    stroke: none;
}

/* === Hover areas (6 ImageButtons z Liczniki_Main_Workspace_01.px) === */
.pom-hover-area {
    position: absolute;
    cursor: pointer;
    z-index: 5;
    border: 2px solid transparent;
    transition: border-color 0.15s ease;
}

.pom-hover-area:hover {
    border-color: rgba(255,255,255,0.5);
}

/* Workspace coords → map coords: subtract map origin (620,80)
   Button (677,220) → map (57,140) 358×228
   Button (677,448) → map (57,368) 358×228
   Button (1035,220) → map (415,140) 355×228
   Button (1035,448) → map (415,368) 355×228
   Button (1390,220) → map (770,140) 359×228
   Button (1390,448) → map (770,368) 359×228 */
#hover-1 { left: 57px; top: 140px; width: 358px; height: 228px; }
#hover-2 { left: 57px; top: 368px; width: 358px; height: 228px; }
#hover-3 { left: 415px; top: 140px; width: 355px; height: 228px; }
#hover-4 { left: 415px; top: 368px; width: 355px; height: 228px; }
#hover-5 { left: 770px; top: 140px; width: 359px; height: 228px; }
#hover-6 { left: 770px; top: 368px; width: 359px; height: 228px; }

/* === Zone info blocks (StrefaZasilania.px 120×158) === */
.pom-zone-info {
    position: absolute;
    width: 120px;
    height: 158px;
    background: rgba(0,0,0,0.6);
    z-index: 4;
    pointer-events: none;
}

/* PX positions inside map (1120×785) — from Map1.px Rect geom values */
#info-rh1 { left: 80px;  top: 220px; }
#info-rh2 { left: 246px; top: 220px; }
#info-rh3 { left: 422px; top: 220px; }
#info-rh4 { left: 602px; top: 220px; }
#info-rh5 { left: 777px; top: 220px; }
#info-rh6 { left: 955px; top: 220px; }

/* Zone name — 18px Roboto Thin (weight 100) */
.pom-zi-name {
    position: absolute;
    top: 0; left: 0;
    width: 120px;
    height: 30px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: white;
    line-height: 30px;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
}

/* Big percentage number — bold 45px Roboto Thin */
.pom-zi-pct {
    position: absolute;
    top: 38px; left: 14px;
    width: 77px;
    height: 50px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 45px;
    color: white;
    text-align: center;
    line-height: 50px;
}

/* % sign — 20px */
.pom-zi-pct-sign {
    position: absolute;
    top: 57px; left: 80px;
    width: 30px;
    height: 30px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 20px;
    color: white;
    line-height: 30px;
    padding: 0 2px;
}

/* Power value kW — 27px Roboto Thin */
.pom-zi-kw {
    position: absolute;
    top: 88px; left: 10px;
    width: 102px;
    height: 45px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 27px;
    color: white;
    line-height: 45px;
}

/* Energy value kWh — adaptive font (default 18px) */
.pom-zi-kwh {
    position: absolute;
    top: 125px; left: 11px;
    width: 103px;
    height: 30px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    font-size: 18px;
    color: white;
    line-height: 30px;
}

/* Overflow state — red + blink */
.pom-zi-pct.overflow {
    color: #ef4141;
    animation: pom-blink 1s infinite;
}

@keyframes pom-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}
