
/*
==================================================
FAVORITE BUTTON
FINAL STYLE
==================================================
*/

.detail-favorite {

    flex: 1;

    height: 48px;

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 8px;

    border-radius: 12px;

    background: #232323;

    color: #ffffff;

    border: 0;

    padding: 0;

    font-size: 15px;

    font-weight: 700;

    cursor: pointer;

    position: relative;

    overflow: visible;

}


/*
==================================================
ICON NORMAL
==================================================
*/

.detail-favorite i {

    color: #ffffff;

}


/*
==================================================
ACTIVE
HANYA LOVE MERAH
==================================================
*/

.detail-favorite.is-favorite {

    background: #232323;

    color: #ffffff;

    box-shadow: none;

}


.detail-favorite.is-favorite i {
    color: #e50914 !important;
    filter:
        drop-shadow(0 0 4px rgba(229, 9, 20, 0.8));
}


/*
==================================================
HOVER
==================================================
*/

.detail-favorite:hover {

    background: #2b2b2b;

    color: #ffffff;

}


.detail-favorite.is-favorite:hover {

    background: #2b2b2b;

    color: #ffffff;

}


.detail-favorite.is-favorite:hover i {

    color: #e50914;

}


/*
==================================================
ACTIVE PRESS
==================================================
*/

.detail-favorite:active {

    transform: scale(0.97);

}


/*
==================================================
FINAL FAVORITE ANIMATION FIX
==================================================
*/

.detail-favorite {
    overflow: visible !important;
    transform: none;
}


/*
==================================================
ACTIVE BUTTON
==================================================
*/

.detail-favorite.is-favorite {
    background: #232323 !important;
    color: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
}


/*
==================================================
ONLY HEART RED
==================================================
*/

.detail-favorite.is-favorite i {
    color: #e50914 !important;
    filter:
        drop-shadow(0 0 4px rgba(229, 9, 20, 0.8));
}


/*
==================================================
BUTTON POP
==================================================
*/

.detail-favorite.favorite-click {
    animation: favoriteButtonPop 0.28s ease-out;
}

@keyframes favoriteButtonPop {

    0% {
        transform: scale(1);
    }

    35% {
        transform: scale(0.96);
    }

    65% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }

}


/*
==================================================
FLOATING HEART
POSISI TEPAT DI ATAS TENGAH TOMBOL
==================================================
*/

.favorite-floating-heart {

    position: absolute !important;

    left: 50% !important;
    top: 50% !important;

    margin: 0;

    z-index: 100;

    pointer-events: none;

    color: #e50914 !important;

    font-size: 14px;

    line-height: 1;

    opacity: 0;

    transform-origin: center;

    animation:
        favoriteFloatUp 0.85s ease-out forwards !important;

}


/*
==================================================
FLOAT UP
==================================================
*/

@keyframes favoriteFloatUp {

    0% {

        opacity: 0;

        transform:
            translate(-50%, -50%)
            scale(0.35);

    }

    15% {

        opacity: 1;

        transform:
            translate(-50%, -50%)
            scale(1);

    }

    55% {

        opacity: 1;

        transform:
            translate(
                calc(-50% + var(--x-mid)),
                calc(-50% - 32px)
            )
            scale(0.9);

    }

    100% {

        opacity: 0;

        transform:
            translate(
                calc(-50% + var(--x-end)),
                calc(-50% - 65px)
            )
            scale(0.55);

    }

}


/*
==================================================
PARTICLES
==================================================
*/

.favorite-particle {

    position: absolute !important;

    left: 50% !important;
    top: 50% !important;

    width: 3px;
    height: 3px;

    border-radius: 50%;

    background: #e50914 !important;

    pointer-events: none;

    z-index: 99;

    animation:
        favoriteParticleFixed 0.6s ease-out forwards !important;

}


@keyframes favoriteParticleFixed {

    0% {

        opacity: 1;

        transform:
            translate(-50%, -50%)
            scale(1);

    }

    100% {

        opacity: 0;

        transform:
            translate(
                calc(-50% + var(--particle-x)),
                calc(-50% + var(--particle-y))
            )
            scale(0);

    }

}

/* FINAL FAVORITE ICON */
#detailFavorite.is-favorite > i.bi-heart-fill {
    color: #e50914 !important;
    -webkit-text-fill-color: #e50914 !important;
}

#detailFavorite:not(.is-favorite) > i.bi-heart {
    color: #ffffff !important;
}


/*
==================================================
HANNANET MOVIE MOBILE
FAVORITE PAGE UI
==================================================
*/

.mobile-favorite {
    width: 100%;
    min-height: calc(100vh - 120px);
    padding: 20px 14px 90px;
}

.favorite-page {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

/*
==================================================
HEADER
==================================================
*/

.favorite-page-header {
    margin-bottom: 22px;
}

.favorite-page-header h1 {
    display: flex;
    align-items: center;
    gap: 9px;

    margin: 0;

    color: #ffffff;

    font-size: 24px;
    font-weight: 800;
    line-height: 1.2;
}

.favorite-page-header h1 i {
    color: #e50914;
    font-size: 22px;

    filter:
        drop-shadow(0 0 5px rgba(229, 9, 20, .55));
}

.favorite-page-header p {
    margin: 7px 0 0;

    color: #8e8e8e;

    font-size: 13px;
}

/*
==================================================
COUNT
==================================================
*/

.favorite-count {
    display: inline-flex;
    align-items: center;

    margin-bottom: 14px;
    padding: 6px 11px;

    border: 1px solid rgba(255,255,255,.08);
    border-radius: 20px;

    background: #171717;

    color: #cfcfcf;

    font-size: 12px;
    font-weight: 600;
}

/*
==================================================
GRID
==================================================
*/

.favorite-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;
}

/*
==================================================
CARD
==================================================
*/

.favorite-card {
    position: relative;

    display: block;

    min-width: 0;

    overflow: hidden;

    border-radius: 12px;

    background: #151515;

    text-decoration: none;

    box-shadow:
        0 5px 18px rgba(0,0,0,.28);

    transform: translateZ(0);

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

.favorite-card:active {
    transform: scale(.97);
}

/*
==================================================
POSTER
==================================================
*/

.favorite-poster {
    position: relative;

    width: 100%;

    aspect-ratio: 2 / 3;

    overflow: hidden;

    background: #222;
}

.favorite-poster::after {
    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to top,
            rgba(0,0,0,.35),
            transparent 45%
        );

    pointer-events: none;
}

.favorite-poster img {
    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .35s ease;
}

.favorite-card:hover .favorite-poster img {
    transform: scale(1.04);
}

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

.favorite-card::before {
    content: "♥";

    position: absolute;

    top: 8px;
    right: 8px;

    z-index: 5;

    width: 28px;
    height: 28px;

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

    border-radius: 50%;

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

    color: #e50914;

    font-size: 13px;

    box-shadow:
        0 3px 10px rgba(0,0,0,.35);
}

/*
==================================================
TITLE
==================================================
*/

.favorite-title {
    min-height: 42px;

    padding: 10px 10px 11px;

    color: #ffffff;

    font-size: 13px;
    font-weight: 700;

    line-height: 1.35;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;

    overflow: hidden;
}

/*
==================================================
EMPTY STATE
==================================================
*/

.favorite-empty {
    display: flex;

    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 45vh;

    padding: 35px 25px;

    text-align: center;

    border: 1px solid rgba(255,255,255,.06);
    border-radius: 16px;

    background:
        linear-gradient(
            145deg,
            #171717,
            #101010
        );
}

.favorite-empty > i {
    display: flex;

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

    width: 64px;
    height: 64px;

    margin-bottom: 16px;

    border-radius: 50%;

    background: rgba(229,9,20,.10);

    color: #e50914;

    font-size: 27px;
}

.favorite-empty h2 {
    margin: 0 0 7px;

    color: #ffffff;

    font-size: 18px;
    font-weight: 800;
}

.favorite-empty p {
    max-width: 280px;

    margin: 0 0 20px;

    color: #888888;

    font-size: 13px;

    line-height: 1.5;
}

.favorite-empty-button {
    display: inline-flex;

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

    gap: 7px;

    min-height: 42px;

    padding: 0 18px;

    border-radius: 10px;

    background: #e50914;

    color: #ffffff;

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    box-shadow:
        0 5px 18px rgba(229,9,20,.22);

    transition:
        transform .2s ease,
        background .2s ease;
}

.favorite-empty-button:active {
    transform: scale(.96);
}

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

@media (min-width: 600px) {

    .mobile-favorite {
        padding-left: 22px;
        padding-right: 22px;
    }

    .favorite-grid {
        grid-template-columns:
            repeat(4, minmax(0, 1fr));

        gap: 16px;
    }

}

/*
==================================================
LARGE SCREEN
==================================================
*/

@media (min-width: 1000px) {

    .mobile-favorite {
        padding-top: 28px;
    }

    .favorite-grid {
        grid-template-columns:
            repeat(6, minmax(0, 1fr));

        gap: 18px;
    }

    .favorite-page-header h1 {
        font-size: 28px;
    }

}


/* FINAL MOBILE FAVORITE SIZE */
.favorite-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.favorite-title {
    padding: 7px 7px 9px;
    min-height: 38px;
    font-size: 11px;
    line-height: 1.3;
}

.favorite-card {
    border-radius: 9px;
}

.favorite-card::before {
    top: 6px;
    right: 6px;
    width: 23px;
    height: 23px;
    font-size: 11px;
}

@media (min-width: 600px) {
    .favorite-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (min-width: 1000px) {
    .favorite-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
        gap: 16px;
    }
}


/* FINAL: FAVORITE 4 KOLOM MOBILE */
.favorite-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 8px !important;
}

.favorite-title {
    font-size: 10px;
    line-height: 1.25;
    padding: 6px 4px 8px;
}

/* Tablet */
@media (min-width: 600px) {
    .favorite-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
        gap: 12px !important;
    }

    .favorite-title {
        font-size: 11px;
    }
}

/* Desktop */
@media (min-width: 1000px) {
    .favorite-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
        gap: 14px !important;
    }
}

