/* ============================================================
   VARIÁVEIS
   ============================================================ */

:root {
    --primary-color: #0d6efd;
    --danger-color: #dc3545;
    --dark-color: #212529;
}


/* ============================================================
   BASE
   ============================================================ */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: #e7e8e9;

    font-family:
        'Segoe UI',
        Tahoma,
        Geneva,
        Verdana,
        sans-serif;

    min-height: 100vh;

    padding-top: 70px;

    overflow-x: hidden;
}

main {
    min-height: calc(100vh - 70px);
}


/* ============================================================
   NAVBAR
   ============================================================ */

.navbar {
    box-shadow:
        0 2px 10px rgba(0, 0, 0, .20);

    z-index: 1030;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.45rem;
    white-space: nowrap;
}

.nav-link {
    transition: .2s ease;
}

.nav-link:hover {
    color: #fff !important;
}

.nav-link.active {
    font-weight: 600;
}


/* ============================================================
   BOTÕES MOBILE
   ============================================================ */

.mobile-actions {
    display: none;
    align-items: center;
    gap: 5px;
}

.mobile-icon-btn {
    width: 42px;
    height: 42px;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 0;

    font-size: 1.2rem;
}


/* ============================================================
   PESQUISA DESKTOP
   ============================================================ */

.search-wrap {
    width: 280px;
}


/* ============================================================
   PESQUISA MOBILE
   ============================================================ */

.mobile-search-area {
    display: none;

    position: fixed;

    top: 70px;
    left: 0;
    right: 0;

    z-index: 1020;

    background: #212529;

    padding: 10px 0;

    box-shadow:
        0 4px 12px rgba(0, 0, 0, .20);
}

.mobile-search-area.active {
    display: block;
}

.mobile-search-form {
    width: 100%;
}

.mobile-search-form .input-group-text {
    background: #fff;
}

.mobile-search-form input {
    min-width: 0;
}


/* ============================================================
   CARDS
   ============================================================ */

.card {
    border: none;

    border-radius: 12px;

    overflow: hidden;

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}

.channel-card,
.media-card {
    height: 100%;

    position: relative;
}

.channel-card:hover,
.media-card:hover {
    transform: translateY(-5px);

    box-shadow:
        0 10px 25px rgba(0, 0, 0, .12);
}


/* ============================================================
   CANAIS
   ============================================================ */

.channel-img {
    height: 150px;

    background: #fff;

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 50px;
}

.channel-img img {
    max-width: 82%;

    max-height: 115px;

    object-fit: contain;
}


/* ============================================================
   FILMES / SÉRIES
   ============================================================ */

.poster,
.poster-empty {
    height: 310px;

    width: 100%;

    object-fit: cover;
}

.poster-empty {
    display: flex;

    align-items: center;

    justify-content: center;

    background: #333;

    color: #aaa;

    font-size: 45px;
}


/* ============================================================
   FAVORITOS
   ============================================================ */

.fav-btn {
    position: absolute;

    top: 8px;
    left: 8px;

    z-index: 5;

    width: 38px;
    height: 38px;

    border: 0;

    border-radius: 50%;

    background:
        rgba(0, 0, 0, .65);

    color: #fff;

    font-size: 18px;

    display: flex;

    align-items: center;

    justify-content: center;

    transition: .2s ease;
}

.fav-btn:hover {
    transform: scale(1.08);

    background:
        rgba(0, 0, 0, .85);
}

.fav-btn.active {
    color: #ffc107;
}


/* ============================================================
   CATEGORIAS
   ============================================================ */

.category-bar {
    overflow-x: auto;

    overflow-y: hidden;

    white-space: nowrap;

    padding-bottom: 5px;

    scrollbar-width: thin;
}

.category-bar .btn {
    margin-right: 5px;

    margin-bottom: 5px;
}


/* ============================================================
   BOTÕES
   ============================================================ */

.btn-danger {
    background-color:
        var(--danger-color);

    border-color:
        var(--danger-color);

    font-weight: 500;
}

.btn-danger:hover {
    background-color: #c82333;

    border-color: #bd2130;
}


/* ============================================================
   BADGES
   ============================================================ */

.badge {
    font-weight: 500;

    padding:
        .4em .8em;
}


/* ============================================================
   ANIMAÇÃO
   ============================================================ */

@keyframes fadeIn {

    from {
        opacity: 0;

        transform:
            translateY(15px);
    }

    to {
        opacity: 1;

        transform:
            translateY(0);
    }

}

.channel-card,
.media-card {
    animation:
        fadeIn .35s ease forwards;
}


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

::-webkit-scrollbar {
    width: 9px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;

    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}


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

@media (max-width: 991.98px) {

    .mobile-actions {
        display: flex;

        margin-left: auto;
    }


    .navbar-collapse {
        padding-top: 15px;

        padding-bottom: 10px;

        max-height:
            calc(100vh - 70px);

        overflow-y: auto;

        overflow-x: hidden;
    }


    .navbar-nav {
        margin-bottom: 10px;
    }


    .profile-button {
        width: 100%;

        margin-bottom: 10px;
    }


    /*
     * No tablet a pesquisa desktop
     * fica escondida.
     */

    .search-wrap {
        display: none !important;
    }


    /*
     * Cards em tablet:
     * 2 por linha.
     */

    #grid > .col-xl-2,
    #grid > .col-lg-3 {
        width: 50%;
    }

}


/* ============================================================
   MOBILE
   ============================================================ */

@media (max-width: 575.98px) {

    body {
        padding-top: 65px;

        overflow-x: hidden;
    }


    main {
        padding-top: 15px !important;
    }


    .navbar {
        min-height: 65px;
    }


    .navbar-brand {
        font-size: 1.15rem;
    }


    .mobile-actions {
        display: flex;

        margin-left: auto;
    }


    .mobile-icon-btn {
        width: 42px;
        height: 42px;

        padding: 0;
    }


    .navbar-toggler {
        width: 42px;
        height: 42px;

        padding: 5px;
    }


    /*
     * ========================================================
     * IMPORTANTE:
     * MOBILE VERTICAL
     * ========================================================
     */

    #grid {

        display: block !important;

        width: 100%;

        overflow-x: hidden;

        overflow-y: visible;

        padding: 0;

        margin: 0;
    }


    /*
     * Cada card ocupa a largura inteira.
     */

    #grid > [class*="col-"] {

        display: block;

        width: 100% !important;

        max-width: 100% !important;

        flex: none !important;

        padding-left: 0 !important;

        padding-right: 0 !important;

        margin-bottom: 18px;
    }


    /*
     * Card
     */

    .channel-card,
    .media-card {
        width: 100%;
    }


    /*
     * Canal
     */

    .channel-img {
        height: 210px;
    }

    .channel-img img {
        max-width: 85%;

        max-height: 165px;
    }


    /*
     * Filmes / séries
     */

    .poster,
    .poster-empty {

        width: 100%;

        height: 115vw;

        max-height: 500px;

        object-fit: cover;
    }


    /*
     * Favorito maior para toque
     */

    .fav-btn {

        width: 44px;

        height: 44px;

        top: 10px;

        left: 10px;

        font-size: 20px;
    }


    /*
     * Categorias
     */

    .category-bar {

        overflow-x: auto;

        overflow-y: hidden;

        white-space: nowrap;

        padding:
            4px 0 8px;

        scrollbar-width: none;
    }

    .category-bar::-webkit-scrollbar {
        display: none;
    }


    /*
     * Título
     */

    h1.h3 {

        font-size: 1.35rem;

        margin-bottom: 15px;
    }


    /*
     * Pesquisa mobile
     */

    .mobile-search-area {

        top: 65px;

        padding:
            10px 0;
    }


    .mobile-search-form {

        width: 100%;
    }


    .mobile-search-form input {

        height: 44px;

        font-size: 16px;
    }


    .mobile-search-form .input-group-text {

        height: 44px;
    }


    .mobile-search-form button {

        height: 44px;

        min-width: 48px;
    }


    /*
     * Menu
     */

    .navbar-collapse {

        max-height:
            calc(100vh - 65px);

        overflow-y: auto;

        overflow-x: hidden;
    }


    .navbar-nav .nav-link {

        padding:
            10px 5px;

        font-size: 1rem;
    }


    /*
     * Modal
     */

    .modal-dialog {
        margin: 10px;
    }

}


/* ============================================================
   CELULARES MUITO PEQUENOS
   ============================================================ */

@media (max-width: 360px) {

    .navbar-brand {
        font-size: 1rem;
    }


    .channel-img {
        height: 185px;
    }


    .poster,
    .poster-empty {

        height: 115vw;
    }

}