/* ============================================================
   COOKIE BANNER
   Struktur & nilai diambil 1:1 dari desain asli (Angular).
   --primary-color -> var(--primary) supaya ikut tema situs.
   ============================================================ */

/* Wrapper cuma payung logic show/hide; container-nya sendiri yang fixed */
#cookieBanner {
    position: static;
    pointer-events: none;
}

.cookie-popup-container {
    position: fixed;
    /* 10px + naik di atas bottom-nav fixed (tinggi ~50px) -> 62px */
    bottom: 10px;
    left: 0;
    right: 0;
    margin: 0 10px;
    /* 110 + naik di atas bottom-nav (z-index 1000) */
    z-index: 1100;
    display: flex;
    -webkit-flex;
    height: auto;
    padding: 20px;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    border-radius: 10px;
    border: 1px solid var(--primary, #D91616);
    box-shadow: 0 4px 10px #000;
    pointer-events: auto;
}

/* Overlay 1: warna primary */
.cookie-popup-container .overlay-primary-color {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: var(--primary, #D91616);
    border-radius: 10px;
    opacity: 0.8;
}

/* Overlay 2: hitam */
.cookie-popup-container .overlay-cookies {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    background: #000000;
    border-radius: 10px;
    opacity: 0.75;
}

.cookie-popup-text {
    display: flex;
    -webkit-flex;
    height: auto;
    justify-content: center;
    align-items: center;
    flex: 1 0 0;
    position: relative;
    z-index: 1;
    margin-bottom: 14px;
}

.cookie-popup-text p {
    flex: 1 0 0;
    align-self: stretch;
    margin: 0;
    color: #fff;
    font-size: 12px;
    font-style: normal;
    font-weight: 400;
    line-height: 18px;
}

.cookie-popup-button {
    display: flex;
    -webkit-flex;
    height: 37px;
    width: 100%;
    padding: 10px 20px;
    bottom: 0;
    justify-content: center;
    align-items: center;
    border-radius: 1000px;
    background: var(--primary, #D91616);
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.cookie-popup-button p {
    margin: 0;
    color: #fff;
    font-size: 12px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
}

/* ---------- Desktop: teks kiri, tombol kanan ---------- */
@media (min-width: 992px) {
    .cookie-popup-container {
        width: 710px;
        flex-direction: row;
        margin: 0 auto;
        /* Teks & tombol setinggi baris yang sama, biar teks nggak kepotong */
        align-items: stretch;
    }

    .cookie-popup-text {
        margin-bottom: 0;
        margin-right: 14px;
    }

    .cookie-popup-button {
        width: 100px;
        align-self: center;
    }
}

/* ---------- iPhone ---------- */
@media only screen and (min-device-width: 375px) and (max-device-width: 375px) and (-webkit-min-device-pixel-ratio: 3) {
    @supports (-webkit-touch-callout: none) {
        @media only screen and (min-device-width: 375px) and (max-device-width: 375px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: portrait) {
            .cookie-popup-container { min-height: 180px; }
            .cookie-popup-text { min-height: 92px; }
        }
        @media only screen and (min-device-width: 375px) and (max-device-width: 375px) and (-webkit-min-device-pixel-ratio: 3) and (orientation: landscape) {
            .cookie-popup-container { min-height: 130px; }
            .cookie-popup-text { min-height: 52px; }
        }
    }
}

/* ---------- Android >= 390px ---------- */
@media only screen and (min-width: 390px) {
    @supports (-webkit-touch-callout: none) {
        @media only screen and (min-width: 390px) and (orientation: portrait) {
            .cookie-popup-container { min-height: 170px; }
            .cookie-popup-text { min-height: 72px; }
        }
        @media only screen and (min-width: 390px) and (orientation: landscape) {
            .cookie-popup-container { min-height: 130px; }
            .cookie-popup-text { min-height: 52px; }
        }
    }
}

/* ---------- Tablet / device besar ---------- */
@media only screen and (min-device-width: 414px) and (max-device-width: 896px) and (-webkit-min-device-pixel-ratio: 2) {
    @supports (-webkit-touch-callout: none) and (max-width: 896px) {
        @media only screen and (min-device-width: 414px) and (max-device-width: 896px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {
            .cookie-popup-container { min-height: 160px; }
            .cookie-popup-text { min-height: 72px; }
        }
        @media only screen and (min-device-width: 414px) and (max-device-width: 896px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: landscape) {
            .cookie-popup-container { min-height: 130px; }
            .cookie-popup-text { min-height: 52px; }
        }
    }
}

/* ---------- Fallback mobile >= 375px ---------- */
@media only screen and (min-width: 375px) {
    @supports (-webkit-touch-callout: none) {
        @media only screen and (min-width: 375px) and (orientation: portrait) {
            .cookie-popup-container { min-height: 180px; }
            .cookie-popup-text { min-height: 72px; }
        }
        @media only screen and (min-width: 375px) and (orientation: landscape) {
            .cookie-popup-container { min-height: 130px; }
            .cookie-popup-text { min-height: 52px; }
        }
    }
}
