/* Peremciklon percről percre (peremciklon.php, js/peremciklon.js) */

/* színek: világos és sötét téma (az oldal a rendszer beállítását követi, main.css) */
.pc-fej,
.pc-idovonal {
    --pc-szoveg: #182c3d;
    --pc-halvany: #4b6175;
    --pc-szurke: #6b7f90;
    --pc-hatter: #f3f7fa;
    --pc-keret: #dbe5ee;
    --pc-kartya: #fff;
    --pc-kartya-keret: #d0dce7;
    --pc-kartya-mult: #f8fafc;
    --pc-tengely1: #dce6ef;
    --pc-tengely2: #e9eff5;
    --pc-oszt: #b7c8d6;
    --pc-oszt-fo: #8ea6ba;
    --pc-szar: #9fb6c9;
}

@media (prefers-color-scheme: dark) {
    .pc-fej,
    .pc-idovonal {
        --pc-szoveg: #e6edf3;
        --pc-halvany: #aebdca;
        --pc-szurke: #8fa1b1;
        --pc-hatter: #21272c;
        --pc-keret: #343d45;
        --pc-kartya: #2a3137;
        --pc-kartya-keret: #3f4952;
        --pc-kartya-mult: #252b30;
        --pc-tengely1: #36414a;
        --pc-tengely2: #2d363d;
        --pc-oszt: #4f5c67;
        --pc-oszt-fo: #6c7c89;
        --pc-szar: #5b6b78;
    }
}

/* --- Fejléc: élő jelzés és a ciklon mostani helyzete --- */

.pc-fej {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 12px;
    margin: -4px 0 12px;
}

.pc-elo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 9px 2px 7px;
    border-radius: 999px;
    background: #c0262d;
    color: #fff;
    font: 600 12px/1.4 "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: .04em;
    white-space: nowrap;
}

.pc-elo-pont {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--pc-kartya);
    animation: pc-pulzal 1.6s ease-in-out infinite;
}

@keyframes pc-pulzal {
    0%, 100% { opacity: 1; }
    50% { opacity: .25; }
}

.pc-allapot {
    flex: 1 1 300px;
    margin: 0;
    color: var(--pc-szoveg);
    font-weight: 600;
}

.pc-allapot-kov {
    display: block;
    color: var(--pc-halvany);
    font-weight: 400;
}

.pc-bevezeto {
    flex-basis: 100%;
    margin: 4px 0 0;
}

.pc-hiba {
    color: #c0262d;
    font-weight: bold;
}

/* --- Idővonal --- */

.pc-idovonal {
    margin-bottom: 18px;
    padding: 14px 16px 12px;
    border-radius: 8px;
    background: var(--pc-hatter);
    border: 1px solid var(--pc-keret);
    color: var(--pc-szoveg);
    font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

/* JavaScript nélkül (és a keresőknek) a szerver listája */
.pc-lista {
    margin: 0;
    padding-left: 1.2em;
}

.pc-lista li {
    margin-bottom: 4px;
}

.pc-lista time {
    margin-right: 6px;
    color: #1e8fdb;
    font-weight: 600;
}

.pc-lista-allapot {
    margin-left: 6px;
    color: var(--pc-szurke);
    font-size: 12px;
}

.pc-lista-leiras {
    display: block;
    color: var(--pc-halvany);
    font-size: 13px;
}

.pc-idovonal.pc-kesz .pc-lista {
    display: none;
}

/* vízszintes idővonal: kártyák a tengely fölött, alatta az órák és a kiválasztott esemény részletei */
.pc-vizszintes {
    position: relative;
}

.pc-savok {
    position: relative;
    min-height: 64px;
}

.pc-kartya {
    position: absolute;
    display: flex;
    flex-direction: column;
    max-width: 190px;
    margin-bottom: 10px;
    padding: 5px 9px 5px;
    border: 1px solid var(--pc-kartya-keret);
    border-radius: 6px;
    background: var(--pc-kartya);
    box-shadow: 0 1px 2px rgba(24, 44, 61, .06);
    color: var(--pc-szoveg);
    text-align: left;
    font: 12px/1.25 "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.pc-kartya:hover {
    border-color: #1e8fdb;
}

.pc-kartya:focus-visible {
    outline: 2px solid #1e8fdb;
    outline-offset: 1px;
}

.pc-kartya-ido {
    color: #1e8fdb;
    font-weight: 700;
    white-space: nowrap;
}

.pc-kartya-cim {
    font-weight: 600;
    font-size: 12.5px;
}

.pc-kartya-rel {
    color: var(--pc-szurke);
    font-size: 11px;
    white-space: nowrap;
}

.pc-kartya.megtortent {
    background: var(--pc-kartya-mult);
    color: var(--pc-halvany);
}

.pc-kartya.megtortent .pc-kartya-ido {
    color: var(--pc-halvany);
}

.pc-kartya.megtortent .pc-kartya-ido::before {
    content: "✓ ";
    color: #2a9d55;
}

.pc-kartya.kovetkezo {
    border-color: #ffb400;
    box-shadow: 0 0 0 1px #ffb400;
}

.pc-kartya.aktiv {
    border-color: #1e8fdb;
    box-shadow: 0 0 0 2px rgba(30, 143, 219, .35);
}

/* a kártyától a tengelyig húzott vonal */
.pc-kartya-szar {
    position: absolute;
    bottom: 0;
    width: 0;
    margin-left: -1px;
    border-left: 2px dotted var(--pc-szar);
    pointer-events: none;
}

.pc-kartya-szar::after {
    content: "";
    position: absolute;
    left: -2px;
    bottom: 0;
    height: 10px;
    border-left: 2px dotted var(--pc-szar);
}

.pc-kartya-szar.megtortent,
.pc-kartya-szar.megtortent::after {
    border-left-style: solid;
    border-left-color: #8fb9d9;
}

.pc-tengely {
    position: relative;
    height: 10px;
    margin-top: 0;
    border-radius: 5px;
    background: repeating-linear-gradient(90deg, var(--pc-tengely1) 0 6px, var(--pc-tengely2) 6px 12px);
}

.pc-tengely-mult {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    border-radius: 5px;
    background: linear-gradient(90deg, #8fc5ea, #1e8fdb);
}

.pc-pont {
    position: absolute;
    top: 50%;
    width: 14px;
    height: 14px;
    margin: -7px 0 0 -7px;
    border: 2px solid #1e8fdb;
    border-radius: 50%;
    background: var(--pc-kartya);
}

.pc-pont.megtortent {
    background: #1e8fdb;
    border-color: #fff;
    box-shadow: 0 0 0 1px #1e8fdb;
}

.pc-pont.kovetkezo {
    border-color: #ffb400;
    box-shadow: 0 0 0 0 rgba(255, 180, 0, .6);
    animation: pc-kovetkezo 2s ease-out infinite;
}

@keyframes pc-kovetkezo {
    0% { box-shadow: 0 0 0 0 rgba(255, 180, 0, .6); }
    100% { box-shadow: 0 0 0 10px rgba(255, 180, 0, 0); }
}

.pc-most {
    position: absolute;
    top: -8px;
    bottom: -30px;
    width: 0;
    border-left: 2px solid #c0262d;
    z-index: 1;
    pointer-events: none;
}

.pc-most-felirat {
    position: absolute;
    bottom: 0;
    left: 0;
    transform: translateX(-50%);
    padding: 1px 6px;
    border-radius: 3px;
    background: #c0262d;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
    text-transform: uppercase;
}

.pc-skala {
    position: relative;
    height: 28px;
}

.pc-oszt {
    position: absolute;
    top: 0;
    height: 4px;
    border-left: 1px solid var(--pc-oszt);
}

.pc-oszt.fo {
    height: 7px;
    border-left-color: var(--pc-oszt-fo);
}

.pc-oszt.ejfel {
    height: 10px;
    border-left: 2px solid var(--pc-halvany);
}

.pc-oszt-felirat {
    position: absolute;
    top: 9px;
    transform: translateX(-50%);
    color: var(--pc-szurke);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pc-oszt-felirat.ejfel {
    color: var(--pc-szoveg);
    font-weight: 700;
}

.pc-reszlet {
    min-height: 3.2em;
    padding: 9px 12px;
    border-radius: 6px;
    background: var(--pc-kartya);
    border: 1px solid var(--pc-kartya-keret);
    color: var(--pc-szoveg);
}

.pc-reszlet-fej {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 10px;
}

.pc-reszlet-ido {
    color: #1e8fdb;
    font-size: 13px;
    font-weight: 600;
}

.pc-reszlet p {
    margin: 3px 0 0;
    color: var(--pc-szoveg);
    font-size: 14px;
}

/* függőleges idővonal (mobil) */
.pc-fuggoleges {
    display: none;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pc-sor {
    position: relative;
    padding: 0 0 12px 22px;
}

.pc-sor::before {
    content: "";
    position: absolute;
    left: 5px;
    top: 4px;
    bottom: -4px;
    border-left: 2px dotted var(--pc-szar);
}

.pc-sor:last-child::before {
    display: none;
}

.pc-sor::after {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    width: 12px;
    height: 12px;
    border: 2px solid #1e8fdb;
    border-radius: 50%;
    background: var(--pc-kartya);
}

.pc-sor.megtortent::before {
    border-left-style: solid;
    border-left-color: #1e8fdb;
}

.pc-sor.megtortent::after {
    background: #1e8fdb;
}

.pc-sor.kovetkezo::after {
    border-color: #ffb400;
    animation: pc-kovetkezo 2s ease-out infinite;
}

.pc-sor-fej {
    display: flex;
    gap: 8px;
    align-items: baseline;
    font-size: 12px;
}

.pc-sor-ido {
    color: #1e8fdb;
    font-weight: 700;
}

.pc-sor.megtortent .pc-sor-ido {
    color: var(--pc-halvany);
}

.pc-sor-allapot {
    color: var(--pc-szurke);
}

.pc-sor-cim {
    color: var(--pc-szoveg);
    font-weight: 600;
}

.pc-sor-leiras {
    color: var(--pc-halvany);
    font-size: 13px;
}

.pc-sor-most {
    position: relative;
    margin: 0 0 12px;
    border-top: 2px solid #c0262d;
}

.pc-sor-most span {
    position: absolute;
    top: -9px;
    left: 0;
    padding: 0 6px;
    border-radius: 3px;
    background: #c0262d;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    line-height: 16px;
    text-transform: uppercase;
}

@media (max-width: 767.98px) {
    .pc-idovonal {
        padding: 14px 12px 4px;
    }

    .pc-vizszintes {
        display: none;
    }

    .pc-fuggoleges {
        display: block;
    }
}

/* --- Radar + szél térkép --- */

.pc-terkep-box {
    position: relative;
    overflow: hidden;
    font-family: "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.pc-map {
    width: 100%;
    aspect-ratio: 970 / 693;
    background: #e8ebe5;
}

@media (max-width: 575.98px) {
    .pc-map {
        aspect-ratio: 4 / 5;
    }
}

.pc-map .maplibregl-ctrl-top-left .maplibregl-ctrl {
    margin: 10px 0 0 10px;
}

.pc-szel-vaszon {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
}

/* címdoboz a radarkép (.radar-cim) stílusában */
.pc-cim {
    position: absolute;
    top: 10px;
    left: 50px;
    z-index: 2;
    max-width: calc(100% - 110px);
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
}

.pc-cim-fo {
    padding: 4px 12px 3px;
    background: #1e8fdb;
    color: #fff;
    font-family: "Oswald", "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-weight: 600;
    font-size: 20px;
    line-height: 1.25;
    letter-spacing: .02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pc-cim-al {
    padding: 4px 12px;
    background: rgba(255, 255, 255, .94);
    color: #182c3d;
    font-size: 12px;
    line-height: 1.3;
}

.pc-cim-al span:empty::before {
    content: "\00a0";
}

@media (max-width: 575.98px) {
    .pc-cim-fo {
        padding: 3px 8px 2px;
        font-size: 15px;
    }

    .pc-cim-al {
        padding: 3px 8px;
        font-size: 11px;
    }
}

.pc-csap-valto {
    border-radius: 999px;
    background: rgba(8, 18, 48, .72);
    box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.pc-csap-valto button:focus-visible {
    outline: 2px solid #52ffb8;
    outline-offset: 1px;
}

/* jelmagyarázat a bal alsó sarokban */
.pc-jelmagyarazat {
    position: absolute;
    left: 10px;
    bottom: 10px;
    z-index: 2;
    width: 210px;
    padding: 7px 10px 4px;
    border-radius: 8px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 1px 4px rgba(0, 0, 0, .2);
    color: #182c3d;
    font-size: 11px;
    line-height: 1.2;
    pointer-events: none;
}

.pc-jm-sor {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 4px;
}

.pc-jm-szem {
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #c0262d;
    box-shadow: 0 0 0 1px #c0262d;
}

.pc-jm-palya {
    width: 18px;
    border-top: 3px solid #c0262d;
}

.pc-jm-palya.varhato {
    border-top-style: dashed;
}

.pc-jm-irany {
    position: relative;
    width: 18px;
    border-top: 3px solid #c0262d;
}

.pc-jm-irany::after {
    content: "";
    position: absolute;
    right: -3px;
    top: -6.5px;
    border: 5px solid transparent;
    border-left: 7px solid #c0262d;
    border-right-width: 0;
}

.pc-jm-szel {
    margin-top: 6px;
}

.pc-jm-szel-fej {
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
    font-weight: 600;
}

.pc-jm-szel-sav {
    height: 6px;
    border-radius: 3px;
    box-shadow: inset 0 0 0 1px rgba(13, 27, 42, .25);
}

.pc-jm-szel-cimkek {
    position: relative;
    height: 14px;
    margin-top: 3px;
}

.pc-jm-szel-cimkek span {
    position: absolute;
    top: 0;
    transform: translateX(-50%);
    font-variant-numeric: tabular-nums;
}

.pc-jm-szel-cimkek span:first-child {
    transform: none;
}

.pc-jm-szel-cimkek span:last-child {
    transform: translateX(-100%);
}

@media (max-width: 575.98px) {
    .pc-jelmagyarazat {
        right: 40px;
        width: auto;
        display: grid;
        grid-template-columns: auto auto auto;
        column-gap: 10px;
        padding: 5px 8px 2px;
        font-size: 10px;
    }

    .pc-jm-szel {
        grid-column: 1 / -1;
        margin-top: 0;
    }
}

.pc-vizjel {
    position: absolute;
    right: 44px;
    bottom: 8px;
    z-index: 2;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
}

/* a ciklon szeme: forgó spirál, középen „A” (alacsony nyomás), alatta a légnyomás */
.pc-szem {
    position: relative;
    width: 46px;
    height: 46px;
    pointer-events: auto;
    cursor: default;
}

.pc-szem-jel {
    position: relative;
    width: 46px;
    height: 46px;
    overflow: visible;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
}

/* a várható mozgásirány: a szem közepéből forgatott rövid nyíl (js: szélesség, útvonal, forgatás) */
.pc-szem-irany {
    position: absolute;
    left: 23px;
    top: 15px;
    height: 16px;
    overflow: visible;
    transform-origin: 0 8px;
    pointer-events: none;
}

.pc-szem-irany path {
    fill: none;
    stroke: #c0262d;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pc-szem-irany .pc-szem-irany-burok {
    stroke: #fff;
    stroke-width: 6;
}

.pc-szem-jel path {
    fill: none;
    stroke: #c0262d;
    stroke-width: 3.2;
    stroke-linecap: round;
}

.pc-szem-forog {
    transform-origin: 0 0;
    animation: pc-forog 6s linear infinite reverse;
}

@keyframes pc-forog {
    to { transform: rotate(360deg); }
}

.pc-szem-jel circle {
    fill: #c0262d;
    stroke: #fff;
    stroke-width: 2;
}

.pc-szem-jel text {
    fill: #fff;
    font: 700 11px "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    text-anchor: middle;
}

.pc-szem-p {
    position: absolute;
    top: 44px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, .92);
    color: #7d1418;
    font: 700 11px/16px "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .25);
}

.pc-szem.felirat-fent .pc-szem-p {
    top: auto;
    bottom: 44px;
}

@media (prefers-reduced-motion: reduce) {
    .pc-szem-forog,
    .pc-elo-pont,
    .pc-pont.kovetkezo,
    .pc-sor.kovetkezo::after {
        animation: none;
    }
}

.pc-forras {
    margin-bottom: .5rem;
}

/* --- Csapadéktérkép (a többi stílus a css/csapadekterkep.css-ből) --- */

.pc-csap-box .csap-cim {
    max-width: calc(100% - 60px);
}

.pc-csap-valto {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 3;
    display: flex;
    padding: 3px;
}

.pc-csap-valto button {
    padding: 6px 12px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: rgba(255, 255, 255, .85);
    font: 600 13px/1 "Inter", "Helvetica Neue", Helvetica, Arial, sans-serif;
    cursor: pointer;
}

.pc-csap-valto button[aria-pressed="true"] {
    background: #1e8fdb;
    color: #fff;
}

/* a kapcsoló a címdoboz alá kerül, ha egymás mellett nem férnek el */
@media (max-width: 767.98px) {
    .pc-csap-valto {
        top: auto;
        bottom: 44px;
        left: 50%;
        right: auto;
        transform: translateX(-50%);
    }

    .pc-csap-valto button {
        padding: 5px 10px;
        font-size: 12px;
    }
}

@media (max-width: 575.98px) {
    .pc-csap-valto {
        top: 76px;
        bottom: auto;
        left: auto;
        right: 10px;
        transform: none;
    }
}

.pc-tip b {
    display: block;
    margin-bottom: 2px;
}
