/* Style v0.12 por Alplox */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@100;400;700&display=swap');

:root {
    --main: #ACBDCE;
    --secondary: #38444d;
    --bg: #051320;

    --dark-green: #32573E;
    --light-green: #72c98c;

    --white: #f7f7f7;
    --black: #0c0c0c;
    --grey: #9C9C9C;

    --dark-red: #7e0909;
    --light-red: #E89292;

    --font: 'Poppins', sans-serif, Arial;
    --border-radius: 15px;
}

a {
    color: var(--grey);
    border-bottom: 2px var(--grey) solid;
    text-decoration: none;

    &:hover {
        color: var(--white);
        border-bottom: 2px var(--dark-green) solid;
    }
}

body {
    color: var(--main);
    background: var(--bg);
    font-family: var(--font);
}

.sombra {
    box-shadow:
        0.8px 0.8px 2.7px rgba(0, 0, 0, 0.062),
        2.1px 2.1px 6.9px rgba(0, 0, 0, 0.089),
        4.3px 4.3px 14.2px rgba(0, 0, 0, 0.111),
        8.8px 8.8px 29.2px rgba(0, 0, 0, 0.138),
        24px 24px 80px rgba(0, 0, 0, 0.2);

    -webkit-box-shadow:
        0.8px 0.8px 2.7px rgba(0, 0, 0, 0.062),
        2.1px 2.1px 6.9px rgba(0, 0, 0, 0.089),
        4.3px 4.3px 14.2px rgba(0, 0, 0, 0.111),
        8.8px 8.8px 29.2px rgba(0, 0, 0, 0.138),
        24px 24px 80px rgba(0, 0, 0, 0.2);
}

.d-none {
    display: none !important;
}

.h-100 {
    height: 100% !important;
}

.hide {
    pointer-events: none;
    opacity: 0;
}

.wrapper-all {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    height: 100vh;
    max-width: 100%;
    gap: 1rem;
}

/* MARK: Header */
.header-principal {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    line-height: 0;
    white-space: normal;
    overflow-wrap: anywhere;
    padding: .4rem 2rem 0 2rem;

    a:first-child {
        border-bottom: none;
    }
}

.img-teles {
    padding: 0;
    margin: 0;
}

/* MARK: Main */
.main-grid {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: minmax(360px, 8fr) 2rem minmax(220px, 2fr);
    grid-template-columns: minmax(360px, 8fr) minmax(220px, 2fr);
    width: 100%;
    height: 100%;
    gap: 2rem;
    padding: .4rem 2rem 0 2rem;
}

/* MARK: container-video */
.container-video {
    position: relative;
    height: 100%;
    width: 100%;
    /* aspect-ratio: 16 / 9; */
    border-radius: var(--border-radius);
    border: 1px solid var(--secondary);

    iframe,
    video,
    .m3u8-stream {
        border: none;
    }
}

.container-overlay,
.container-transmision,
.container-video iframe,
.container-video video,
.m3u8-stream {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.container-transmision {
    z-index: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.vjs-fill {
    padding: 0 !important;
}

.container-overlay {
    z-index: 2;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: end;
    -ms-flex-pack: end;
    justify-content: flex-end;
    -webkit-box-align: start;
    -ms-flex-align: start;
    align-items: flex-start;
    pointer-events: none;
}

.container-texto-detras-container-transmision {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    height: 100%;
    width: 100%;
    margin: 0px;

    p {
        display: inherit;
        -webkit-box-pack: inherit;
        -ms-flex-pack: inherit;
        justify-content: inherit;
        -webkit-box-align: inherit;
        -ms-flex-align: inherit;
        align-items: inherit;
        width: inherit;
        margin: 0 10%;
        font-weight: 100;
        font-size: calc(1.6rem + 2vw);
        text-transform: uppercase;
        text-wrap: nowrap;
        color: var(--light-green);
    }

    svg {
        width: calc(1.6rem + 1.7vw);
        max-width: calc(1.6rem + 1.7vw);
        max-height: calc(1.6rem + 1.7vw);
    }
}

#gear {
    /* https://stackoverflow.com/a/17031363 */
    -webkit-animation-name: animacion-rotate;
    animation-name: animacion-rotate;
    -webkit-animation-duration: 1.5s;
    animation-duration: 1.5s;
    -webkit-animation-iteration-count: infinite;
    animation-iteration-count: infinite;
    -webkit-transform-origin: 50% 50%;
    -ms-transform-origin: 50% 50%;
    transform-origin: 50% 50%;
    display: inline-block;
}

@-webkit-keyframes animacion-rotate {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

@keyframes animacion-rotate {
    0% {
        -webkit-transform: rotate(0deg);
        transform: rotate(0deg);
    }

    100% {
        -webkit-transform: rotate(360deg);
        transform: rotate(360deg);
    }
}

/* MARK: Aside */
.container-botones-canales {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 15px;
    padding: 10px;
    border: 1px solid var(--secondary);
    border-radius: var(--border-radius);
    height: 100%;
    width: 100%;
}

.filtro {
    width: 100%;
    padding: 6px 10px;
    border-radius: var(--border-radius);
    border: 1px var(--main) solid;
}

.sin-resultados-canal {
  text-align: center;
  padding: 1rem;
}

.lista-botones {
    display: -ms-grid;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: .8rem;
    width: 100%;
    height: 100%;
    /* Custom scrollbar for Firefox */
    scrollbar-width: thin;
    /* Custom scrollbar for WebKit browsers */
    &::-webkit-scrollbar {
        width: 8px;
    }
    &::-webkit-scrollbar-thumb {
        background: var(--main);
        border-radius: 8px;
    }
    &::-webkit-scrollbar-track {
        background: transparent;
    }
    overflow-x: hidden;
    text-wrap: balance;
}

/* flip listado canales */
.flip-container {
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

.flip-container.hover .flipper {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

.flip-container,
.front,
.back,
.flipper {
    height: 100%;
    width: 100%;
}

.flipper {
    -webkit-transition: 0.6s;
    -o-transition: 0.6s;
    transition: 0.6s;
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
    position: relative;
}

.front,
.back {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
}

.front {
    -webkit-transform: rotateY(0deg);
    transform: rotateY(0deg);
    z-index: 1;
}

.back {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
}

/* MARK: Botones */
.boton {
    padding: .4em;
    font-weight: bold;
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    -webkit-transition: all 0.3s;
    -o-transition: all 0.3s;
    transition: all 0.3s;
    background: var(--white);
}

.boton-accion {
    background: var(--main);

    @media (hover:hover) {
        &:active:not(:disabled),
        &:hover:not(:disabled) {
            color: var(--white);
            background: var(--secondary);
        }
    }
}

.boton-canal {
    font-weight: 400;
    text-align: left;
    text-wrap: balance;

    @media (hover:hover) {
        &:hover {
            background-color: var(--grey);
        }
    }
}

.boton-activo {
    background-color: var(--light-green);

    @media (hover:hover) {
        &:hover {
            color: var(--black);
            background-color: var(--light-red);
        }
    }
}

/* MARK: Overlay */
.overlay {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    width: 100%;
    pointer-events: none;

    #nombre-overlay {
        color: var(--grey);
        background: var(--bg);
        background: -webkit-gradient(linear, left top, left bottom, color-stop(30%, var(--bg)), to(rgba(255, 255, 255, 0)));
        background: -o-linear-gradient(top, var(--bg) 30%, rgba(255, 255, 255, 0) 100%);
        background: linear-gradient(180deg, var(--bg) 30%, rgba(255, 255, 255, 0) 100%);
        padding: 6px 10px;
        text-wrap: nowrap;
        -o-text-overflow: ellipsis;
           text-overflow: ellipsis;
        border-radius: 0 0 var(--border-radius) var(--border-radius);
        pointer-events: visible;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        overflow: hidden;
        border: none;
        -webkit-transition: 0.2s ease-in;
        -o-transition: 0.2s ease-in;
        transition: 0.2s ease-in;

        &:hover,
        &:focus-within {
            color: var(--white);
            background: var(--bg);
        }
    }
}

/* MARK: Dropdown señales */
.dropdown-señales {
    position: relative;
    cursor: default;

    ul {
        position: absolute;
        padding: 0;
        background: var(--white);
        border-radius: var(--border-radius);
        list-style: none;
        min-width: 120px;
        max-height: 350px;
        overflow: auto;

        li {
            color: var(--black);
            padding: 0;
            margin: 0;
            pointer-events: visible;
            cursor: default;
            display: -webkit-box;
            display: -ms-flexbox;
            display: flex;
            gap: .4rem;
            -ms-flex-line-pack: center;
                align-content: center;
            padding: 10px 0.8rem;
            border: none;

            svg {
                width: 1em;
                height: 1em;
            }

            &:first-child {
                border-radius: var(--border-radius) var(--border-radius) 0 0;
                overflow: hidden;
            }

            &:last-child {
                border-radius: 0 0 var(--border-radius) var(--border-radius);
                overflow: hidden;
            }

            @media (hover:hover) {
                &:hover {
                    background: var(--main);
                }
            }
        }
    }
}

/* Close the dropdown with outside clicks */
.dropdown-señales[open] summary::before {
    content: ' ';
    display: block;
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    bottom: 0;
    z-index: 0;
    -webkit-backdrop-filter: blur(1px);
    backdrop-filter: blur(1px);
}

.boton-señales {
    pointer-events: visible;
    border-radius: var(--border-radius) 0 var(--border-radius) 0;
    list-style: none;
    list-style-type: none;
    background: var(--bg);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(30%, var(--bg)), to(rgba(255, 255, 255, 0)));
    background: -o-linear-gradient(top, var(--bg) 30%, rgba(255, 255, 255, 0) 100%);
    background: linear-gradient(180deg, var(--bg) 30%, rgba(255, 255, 255, 0) 100%);
    border: none;

    &::-webkit-details-marker {
        display: none;
    }

    &::before {
        display: none;
    }

    @media (hover:hover) {
        &:hover {
            -webkit-transition: 0.2s ease-in;
            -o-transition: 0.2s ease-in;
            transition: 0.2s ease-in;
            color: var(--white);
        }
    }

    &:focus {
        color: var(--white);
    }
}

.boton-señal {
    width: 100%;
    background: var(--dark-red);
}

.boton-overlay-quitar-señal {
    background: var(--light-red);
    background: -webkit-gradient(linear, left top, left bottom, color-stop(20%, var(--light-red)), to(rgba(255, 255, 255, 0)));
    background: -o-linear-gradient(top, var(--light-red) 20%, rgba(255, 255, 255, 0) 100%);
    background: linear-gradient(180deg, var(--light-red) 20%, rgba(255, 255, 255, 0) 100%);
    border-radius: 0 var(--border-radius) 0 var(--border-radius);
    border: none;
    pointer-events: visible;

    &:hover {
        color: var(--white);
        background: var(--dark-red);
    }

    &:active,
    &:focus-within {
        color: var(--white);
        background: var(--dark-red);
    }
}

.boton-alternar-visibilidad-overlay {
    position: absolute;
    top: 0;
    right: -25px;
    border-radius: 0 var(--border-radius) var(--border-radius) 0;
    -webkit-clip-path: polygon(0 0, 13% 16%, 20% 33%, 20% 100%, 75% 100%, 100% 67%, 100% 33%, 75% 0, 20% 0);
            clip-path: polygon(0 0, 13% 16%, 20% 33%, 20% 100%, 75% 100%, 100% 67%, 100% 33%, 75% 0, 20% 0);
}

/* MARK: footer */
.footer {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    gap: 1rem;
    padding: .2rem 2rem;
    background: var(--black);
    border-top: 1px solid var(--secondary);
    text-wrap: balance;
    width: 100%;

    a {
        text-align: center;
    }
}

/* MARK: Modal */
.modal {
    z-index: 3;
    display: none;
    -ms-flex-line-pack: center;
        align-content: center;
    -webkit-box-pack: center;
        -ms-flex-pack: center;
            justify-content: center;
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    padding: 4rem;
    overflow: auto;
    color: var(--black);
    background-color: rgb(0, 0, 0);
    background-color: rgba(0, 0, 0, 0.7);

    .modal-content {
        display: -ms-grid;
        display: grid;
        -ms-grid-rows: .1fr 1fr .1fr;
        grid-template-rows: .1fr 1fr .1fr;
        border-radius: var(--border-radius);
        background-color: var(--main);
        min-height: 500px;
        margin: 0 auto;
        padding: 15px 15px 0 15px;
        border: 5px solid var(--white);
        font-size: calc(16px + 0.390625vw);
    }

    .modal-header {
        span {
            float: right;
            font-weight: bold;

            &&:hover,
            &&:focus {
                color: var(--dark-red);
            }
        }
    }

    .modal-body {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        overflow-y: auto;
        min-height: 200px;

        a {
            color: inherit;
            border-bottom: 2px var(--grey) solid;

            &:hover {
                border-bottom: 2px var(--dark-green) solid;
            }
        }

        ul {
            margin: 0px;
        }

        li {
            margin-bottom: 1rem;
        }

        p {
            text-align: center;
        }
    }

    .modal-footer {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
    }

    .boton-modal-entendido {
        width: -webkit-fit-content;
        width: -moz-fit-content;
        width: fit-content;
        -ms-flex-item-align: center;
        -ms-grid-row-align: center;
        align-self: center;

        padding: 15px;
        text-transform: uppercase;
        margin: 15px 0;

        &:active,
        &:hover {
            color: var(--white);
            background: var(--light-green);
        }
    }
}

/* MARK: Media querys */
@media only screen and (max-width: 728px) {
    .main-grid {
        display: -ms-grid;
        display: grid;
        -ms-grid-rows: 1fr 2fr;
        grid-template-rows: 1fr 2fr;
        -ms-grid-columns: none;
        grid-template-columns: none;

        -webkit-column-gap: 2rem;
        -moz-column-gap: 2rem;
        column-gap: 2rem;
        
    }

    .main-grid>*:nth-child(1) {
        -ms-grid-row: 1;
        -ms-grid-column: 1;
    }

    .main-grid>*:nth-child(2) {
        -ms-grid-row: 2;
        -ms-grid-column: 1;
    }
}