/* ==========================================================
   PRIVATNET - INTERNET
========================================================== */


/* ==========================================================
   HLAVNÍ BLOK
   Desktop:
   - jedna společná výška
   - mapa přes celý blok
   - světlý profil přes mapu
   - formulář nad profilem
========================================================== */

.internet-availability-section {
    position: relative;

    width: calc(100% - 40px);
    max-width: 1180px;

    height: 400px;
    min-height: 400px;

    margin: 30px auto 55px auto;

    border-radius: 18px;

    /*
     * Našeptávač musí mít možnost
     * přesahovat mimo blok.
     */
    overflow: visible;

    background: #f4faf4;

    box-shadow:
        0 8px 28px rgba(0, 0, 0, 0.08);
}


/* ==========================================================
   MAPA
========================================================== */

.internet-map {
    position: absolute;

    inset: 0;

    z-index: 1;

    width: 100%;
    height: 100%;

    min-height: 0;

    overflow: hidden;

    border-radius: 18px;
}


/* ==========================================================
   SVĚTLÝ PROFIL PŘES MAPU
========================================================== */

.internet-map-overlay {
    position: absolute;

    top: 0;
    bottom: 0;
    left: 0;

    z-index: 2;

    /*
     * Pevná levá část.
     */
    width: 47%;

    height: 100%;

    border-radius:
        18px
        0
        0
        18px;

    background: #f6fbf6;

    pointer-events: none;
}


/*
 * Teprve TADY vzniká přechod do mapy.
 */
.internet-map-overlay::after {
    content: "";

    position: absolute;

    top: 0;
    bottom: 0;

    left: 100%;

    width: 220px;

    background:
        linear-gradient(
            90deg,
            rgba(246, 251, 246, 1) 0%,
            rgba(246, 251, 246, 0.95) 15%,
            rgba(246, 251, 246, 0.78) 35%,
            rgba(246, 251, 246, 0.52) 55%,
            rgba(246, 251, 246, 0.25) 75%,
            rgba(246, 251, 246, 0) 100%
        );

    pointer-events: none;
}


/* ==========================================================
   FORMULÁŘ / LEVÁ ČÁST
========================================================== */

.internet-availability-content {
    position: relative;

    z-index: 20;

    width: 52%;
    max-width: 610px;

    height: 100%;

    box-sizing: border-box;

    padding:
        36px
        25px
        28px
        48px;

    overflow: visible;

    text-align: left;
}


/* ==========================================================
   BADGE
========================================================== */

.internet-availability-badge {
    display: inline-block;

    margin: 0 0 9px 0;

    padding:
        5px
        11px;

    border-radius: 20px;

    background: #e2f4e3;

    color: #258c31;

    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}


/* ==========================================================
   NADPIS
========================================================== */

.internet-availability-content h1 {
    margin:
        0
        0
        10px
        0;

    color: #222222;

    font-size: 29px;
    font-weight: 700;
    line-height: 1.2;
}


/* ==========================================================
   ÚVODNÍ TEXT
========================================================== */

.internet-availability-lead {
    max-width: 510px;

    margin:
        0
        0
        20px
        0;

    color: #555555;

    font-size: 14px;
    line-height: 1.5;
}


/* ==========================================================
   FORMULÁŘ
========================================================== */

#internet-availability-form {
    position: relative;

    z-index: 100;

    margin: 0;
    padding: 0;

    overflow: visible;
}


/* ==========================================================
   VYHLEDÁVÁNÍ ADRESY
========================================================== */

.internet-address-search {
    position: relative;

    z-index: 1000;

    width: 100%;
    max-width: 540px;

    margin:
        0
        0
        13px
        0;

    overflow: visible;
}


.internet-address-input-wrapper {
    position: relative;

    z-index: 2;

    width: 100%;
}


/* ==========================================================
   IKONA V INPUTU
========================================================== */

.internet-address-icon {
    position: absolute;

    top: 50%;
    left: 19px;

    z-index: 3;

    transform: translateY(-50%);

    color: #39a947;

    font-size: 13px;
    line-height: 1;

    pointer-events: none;
}


/* ==========================================================
   INPUT
========================================================== */

#internet-address {
    display: block;

    width: 100%;
    height: 56px;

    box-sizing: border-box;

    margin: 0;

    padding:
        0
        18px
        0
        48px;

    border:
        1px
        solid
        #cccccc;

    border-radius: 9px;

    outline: none;

    background: #ffffff;

    color: #222222;

    font-family: inherit;
    font-size: 16px;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.06);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


#internet-address:hover {
    border-color: #b8b8b8;
}


#internet-address:focus {
    border-color: #39a947;

    box-shadow:
        0 0 0 3px rgba(57, 169, 71, 0.13),
        0 4px 15px rgba(0, 0, 0, 0.08);
}


#internet-address::placeholder {
    color: #888888;

    opacity: 1;
}


/* ==========================================================
   NAŠEPTÁVAČ
========================================================== */

.internet-address-suggestions {
    display: none;

    position: absolute;

    top: calc(100% + 8px);
    left: 0;
    right: 0;

    z-index: 999999;

    width: 100%;
    max-height: 300px;

    box-sizing: border-box;

    overflow-x: hidden;
    overflow-y: auto;

    background: #ffffff;

    border:
        1px
        solid
        #d8d8d8;

    border-radius: 10px;

    text-align: left;

    box-shadow:
        0 15px 40px rgba(0, 0, 0, 0.18);

    scrollbar-width: thin;

    scrollbar-color:
        #b9b9b9
        #f3f3f3;
}


.internet-address-suggestions.is-open {
    display: block;
}


/* ==========================================================
   SCROLLBAR
========================================================== */

.internet-address-suggestions::-webkit-scrollbar {
    width: 7px;
}


.internet-address-suggestions::-webkit-scrollbar-track {
    background: #f3f3f3;
}


.internet-address-suggestions::-webkit-scrollbar-thumb {
    background: #b9b9b9;

    border-radius: 10px;
}


/* ==========================================================
   POLOŽKA NAŠEPTÁVAČE
========================================================== */

.internet-address-suggestions
.internet-suggestion-item {

    display: flex;
    align-items: center;

    gap: 12px;

    width: 100%;
    min-height: 60px;

    box-sizing: border-box;

    margin: 0;

    padding:
        10px
        15px;

    border: 0;

    border-bottom:
        1px
        solid
        #eeeeee;

    border-radius: 0;

    outline: none;

    background: #ffffff !important;

    color: #222222 !important;

    font-family: inherit;

    text-align: left;

    cursor: pointer;

    transition:
        background-color 0.15s ease;
}


.internet-address-suggestions
.internet-suggestion-item:last-child {
    border-bottom: 0;
}


/* ==========================================================
   HOVER / AKTIVNÍ POLOŽKA
========================================================== */

.internet-address-suggestions
.internet-suggestion-item:hover,

.internet-address-suggestions
.internet-suggestion-item:focus,

.internet-address-suggestions
.internet-suggestion-item.is-active {

    background: #edf8ee !important;

    color: #222222 !important;
}


/* ==========================================================
   IKONA NAŠEPTÁVAČE
========================================================== */

.internet-suggestion-icon {
    flex:
        0
        0
        24px;

    color: #39a947 !important;

    font-size: 16px;

    text-align: center;
}


/* ==========================================================
   TEXT NAŠEPTÁVAČE
========================================================== */

.internet-suggestion-text {
    display: flex;
    flex-direction: column;

    min-width: 0;

    color: #222222 !important;
}


.internet-address-suggestions
.internet-suggestion-text strong {

    overflow: hidden;

    color: #222222 !important;

    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;

    text-overflow: ellipsis;
    white-space: nowrap;
}


.internet-address-suggestions
.internet-suggestion-text small {

    overflow: hidden;

    margin-top: 2px;

    color: #777777 !important;

    font-size: 13px;
    font-weight: 400;
    line-height: 1.3;

    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ==========================================================
   OPRAVA HOVERU
========================================================== */

.internet-address-suggestions
.internet-suggestion-item:hover strong,

.internet-address-suggestions
.internet-suggestion-item:focus strong,

.internet-address-suggestions
.internet-suggestion-item.is-active strong {

    color: #222222 !important;
}


.internet-address-suggestions
.internet-suggestion-item:hover small,

.internet-address-suggestions
.internet-suggestion-item:focus small,

.internet-address-suggestions
.internet-suggestion-item.is-active small {

    color: #666666 !important;
}


.internet-address-suggestions
.internet-suggestion-item:hover
.internet-suggestion-icon,

.internet-address-suggestions
.internet-suggestion-item:focus
.internet-suggestion-icon,

.internet-address-suggestions
.internet-suggestion-item.is-active
.internet-suggestion-icon {

    color: #39a947 !important;
}


/* ==========================================================
   STAV NAŠEPTÁVAČE
========================================================== */

.internet-suggestion-status {
    box-sizing: border-box;

    padding: 15px;

    background: #ffffff;

    color: #666666 !important;

    font-size: 14px;

    text-align: center;
}


.internet-suggestion-error {
    color: #a40000 !important;
}


/* ==========================================================
   TLAČÍTKO
========================================================== */

.internet-check-button {
    min-height: 46px;

    margin: 0;

    padding:
        0
        25px;

    border-radius: 7px;

    cursor: pointer;
}


/* ==========================================================
   POZNÁMKA POD FORMULÁŘEM
========================================================== */

.internet-availability-note {
    max-width: 510px;

    margin-top: 15px;

    color: #666666;

    font-size: 12px;
    line-height: 1.45;
}


.internet-availability-note strong {
    color: #444444;
}


/* ==========================================================
   VÝSLEDEK OVĚŘENÍ
   Pozor: #internet-availability-result je nyní samostatná sekce
   pod mapou. Starý limit 540 px byl odstraněn.
========================================================== */

#internet-availability-result {
    display: none;
}

/* ==========================================================
   MAPLIBRE
========================================================== */

.internet-map.maplibregl-map {
    font-family: inherit;
}


.internet-map
.maplibregl-ctrl-top-right {

    top: 8px;
    right: 8px;
}


.internet-map
.maplibregl-ctrl-bottom-left {

    bottom: 5px;
    left: 5px;
}


/* ==========================================================
   TARIFY
========================================================== */

.internet-packages {
    position: relative;

    z-index: 1;
}


.internet-packages > h1 {
    margin-top: 0;
}


/* ==========================================================
   INFORMACE POD TARIFY
========================================================== */

.internet-info {
    margin:
        25px
        auto
        30px
        auto;

    text-align: center;
}


.internet-info p {
    margin:
        8px
        auto;

    line-height: 1.5;
}


/* ==========================================================
   TABLET / TELEFON
========================================================== */

@media (max-width: 850px) {

    /*
     * Tady kompletně rušíme desktopové vrstvení.
     *
     * Výsledné pořadí:
     *
     * 1. formulář
     * 2. mapa
     */

    .internet-availability-section {
        display: flex;
        flex-direction: column;

        width: calc(100% - 24px);

        height: auto;
        min-height: 0;

        margin:
            20px
            auto
            50px
            auto;

        border-radius: 16px;

        overflow: visible;

        background: #f4faf4;

        box-shadow:
            0 8px 25px rgba(0, 0, 0, 0.08);
    }


    /* ======================================================
       FORMULÁŘ JE PRVNÍ
    ====================================================== */

    .internet-availability-content {
        position: relative;

        order: 1;

        z-index: 20;

        width: 100%;
        max-width: none;

        height: auto;

        box-sizing: border-box;

        padding:
            28px
            20px
            26px
            20px;

        border-radius:
            16px
            16px
            0
            0;

        background: #f4faf4;

        overflow: visible;
    }


    .internet-availability-content h1 {
        font-size: 25px;
    }


    .internet-availability-lead {
        max-width: none;
    }


    .internet-address-search {
        max-width: none;
    }


    .internet-availability-note {
        max-width: none;
    }
/* ======================================================
       MAPA JE DRUHÁ
    ====================================================== */

    .internet-map {
        position: relative;

        inset: auto;

        order: 2;

        z-index: 1;

        width: 100%;

        height: 280px;
        min-height: 280px;

        flex:
            0
            0
            280px;

        border-radius:
            0
            0
            16px
            16px;

        overflow: hidden;
    }


    /*
     * Desktopový gradient na telefonu
     * úplně vypneme.
     */

    .internet-map-overlay {
        display: none;
    }


    /*
     * Našeptávač zůstává nad mapou.
     */

    .internet-address-suggestions {
        z-index: 999999;
    }

}


/* ==========================================================
   TELEFON
========================================================== */

@media (max-width: 500px) {

    .internet-availability-section {
        width: calc(100% - 16px);

        margin:
            15px
            auto
            40px
            auto;

        border-radius: 12px;
    }


    /* ======================================================
       FORMULÁŘ
    ====================================================== */

    .internet-availability-content {
        padding:
            23px
            15px
            22px
            15px;

        border-radius:
            12px
            12px
            0
            0;
    }


    .internet-availability-badge {
        margin-bottom: 8px;

        padding:
            5px
            10px;

        font-size: 12px;
    }


    .internet-availability-content h1 {
        margin-bottom: 12px;

        font-size: 22px;
        line-height: 1.2;
    }


    .internet-availability-lead {
        margin-bottom: 18px;

        font-size: 14px;
        line-height: 1.55;
    }


    /* ======================================================
       INPUT
    ====================================================== */

    #internet-address {
        height: 54px;

        padding-left: 44px;

        font-size: 16px;
    }


    .internet-address-icon {
        left: 17px;
    }


    /* ======================================================
       TLAČÍTKO
    ====================================================== */

    .internet-check-button {
        width: 100%;

        min-height: 46px;
    }


    /* ======================================================
       POZNÁMKA
    ====================================================== */

    .internet-availability-note {
        margin-top: 13px;

        font-size: 12px;
    }


    /* ======================================================
       NAŠEPTÁVAČ
    ====================================================== */

    .internet-address-suggestions {
        max-height: 280px;
    }


    .internet-address-suggestions
    .internet-suggestion-item {

        min-height: 58px;

        padding:
            9px
            12px;
    }


    /* ======================================================
       MAPA DOLE
    ====================================================== */

    .internet-map {
        height: 250px;
        min-height: 250px;

        flex:
            0
            0
            250px;

        border-radius:
            0
            0
            12px
            12px;
    }

}

/* ==========================================================
   VÝSLEDEK OVĚŘENÍ POD MAPOU
========================================================== */

#internet-availability-result.internet-availability-result-section {
    display: none;
    position: relative;
    z-index: 1;

    width: calc(100% - 40px);
    max-width: 1180px;

    margin: -25px auto 55px auto;
    padding: 28px 20px 30px 20px;

    box-sizing: border-box;
    text-align: center;

    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.internet-result-heading {
    width: 100%;
    margin: 0 auto 26px auto;
    text-align: center;
}

.internet-result-heading h2 {
    margin: 8px 0 6px 0;
    color: #2d7d32;
    font-size: 28px;
    line-height: 1.2;
}

.internet-result-heading p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

.internet-result-badge {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 20px;
    background: #e2f4e3;
    color: #258c31;
    font-size: 13px;
    font-weight: 600;
}

/* Tarify vedle sebe a vystředěné */
#internet-availability-result .internet-result-packages {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0;

    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 24px;

    box-sizing: border-box;
    text-align: center;
}

/* Jednotlivá karta */
#internet-availability-result .internet-result-package {
    flex: 0 1 260px;

    width: 260px;
    max-width: 260px;
    min-width: 220px;

    margin: 0;
    padding: 14px 16px 16px 16px;

    display: flex;
    flex-direction: column;
    align-items: center;

    box-sizing: border-box;

    background-color: #e9f5e9;
    border: 2px solid #4CAF50;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,.20);

    color: #333;
    font-size: 1rem;
    font-style: normal;
    text-align: center;
}

#internet-availability-result .internet-result-package h2 {
    width: 100%;
    margin: 0 0 8px 0;
    padding: 0 0 8px 0;
    border-bottom: 1px solid #4CAF50;
    color: #333;
    font-size: 24px;
    line-height: 1.2;
}

#internet-availability-result .internet-result-package p {
    margin: 6px 0;
    line-height: 1.45;
}

.internet-tariff-technology {
    margin: 0 0 7px 0;
    color: #666;
    font-size: 13px;
}

.internet-tariff-speed-detail,
.internet-tariff-activation {
    font-size: 14px;
}

.internet-tariff-activation {
    color: #666;
}

#internet-availability-result .internet-result-package .orderButton,
#internet-availability-result .internet-result-package .order-button {
    display: inline-block;
    width: auto;
    margin: auto auto 0 auto;
    padding: 8px 18px;

    background-color: #4CAF50;
    color: #000;
    text-decoration: none;
    border-radius: 5px;
}

#internet-availability-result .internet-result-package .orderButton:hover,
#internet-availability-result .internet-result-package .order-button:hover {
    background-color: #45a049;
}

.internet-result-note {
    width: 100%;
    max-width: 850px;
    margin: 24px auto 0 auto;
    color: #666;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.internet-result-note strong {
    color: #444;
}

.internet-result-loading,
.internet-result-verification,
.internet-result-error {
    width: 100%;
    max-width: 850px;
    box-sizing: border-box;
    margin: 0 auto;
    padding: 20px;
    border: 1px solid #d8ead9;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(0,0,0,.07);
    text-align: left;
}

.internet-result-loading {
    text-align: center;
}

.internet-result-loading strong,
.internet-result-loading span {
    display: block;
}

.internet-result-loading span {
    margin-top: 5px;
    color: #666;
}

@media (max-width: 850px) {
    #internet-availability-result.internet-availability-result-section {
        width: calc(100% - 24px);
        margin: -20px auto 45px auto;
        padding: 24px 12px 20px 12px;
    }

    #internet-availability-result .internet-result-packages {
        gap: 18px;
    }

    #internet-availability-result .internet-result-package {
        flex: 1 1 calc(50% - 18px);
        width: calc(50% - 18px);
        max-width: 340px;
        min-width: 220px;
    }
}

@media (max-width: 560px) {
    #internet-availability-result.internet-availability-result-section {
        width: calc(100% - 16px);
        margin: -15px auto 35px auto;
        padding: 20px 8px 15px 8px;
    }

    #internet-availability-result .internet-result-packages {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    #internet-availability-result .internet-result-package {
        flex: 0 1 auto;
        width: 100%;
        max-width: 300px;
        min-width: 0;
    }
}

