* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f5f5f5;
}

/* =========================
   BUTTON
========================= */

.open-button {
    margin: 50px;
    padding: 12px 20px;

    border: none;
    border-radius: 8px;

    background: #0095f6;
    color: white;

    cursor: pointer;
}

/* =========================
   MODAL
========================= */

.modal {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(0, 0, 0, .85);

    z-index: 9999;
}

.modal.active {
    display: flex;
}

/* =========================
   POPUP
========================= */

.modal-box {
    position: relative;

    width: 95%;
    max-width: 1400px;
    height: 95vh;

    display: flex;

    background: white;

    border-radius: 5px;

    overflow: hidden;
}

/* =========================
   MEDIA
========================= */

.media {
    position: relative;

    flex: 1;
    min-width: 0;

    background: #111;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;
}

.media img {
    width: 100%;
    height: 100%;

    object-fit: contain;

    user-select: none;
}

/* =========================
   SLIDER BUTTON
========================= */

.slider-button {
    position: absolute;

    top: 50%;

    width: 40px;
    height: 40px;

    transform: translateY(-50%);

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, .9);

    color: #222;

    font-size: 25px;

    display: flex;
    align-items: center;
    justify-content: center;

    cursor: pointer;

    z-index: 5;
}

.slider-button:hover {
    background: white;
}

.slider-prev {
    left: 15px;
}

.slider-next {
    right: 15px;
}

/* =========================
   IMAGE COUNTER
========================= */

.image-counter {
    position: absolute;

    top: 15px;
    right: 15px;

    padding: 6px 10px;

    border-radius: 20px;

    background: rgba(0, 0, 0, .6);

    color: white;

    font-size: 12px;

    z-index: 5;
}

/* =========================
   DOTS
========================= */

.slider-dots {
    position: absolute;

    bottom: 15px;
    left: 50%;

    transform: translateX(-50%);

    display: flex;
    gap: 6px;

    z-index: 5;
}

.slider-dot {
    width: 6px;
    height: 6px;

    padding: 0;

    border: none;
    border-radius: 50%;

    background: rgba(255, 255, 255, .5);

    cursor: pointer;
}

.slider-dot.active {
    background: white;
}

/* =========================
   DESCRIPTION
========================= */

.description {
    width: 480px;

    display: flex;
    flex-direction: column;

    background: #1d1c1d;
    color: white;
    overflow-y: auto;
}

.description-scroll {
    flex: 1;
    min-height: 0;

    overflow-y: auto;

    /* Sembunyikan scrollbar */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.description-scroll::-webkit-scrollbar {
    display: none;
}

/* =========================
   PROFILE
========================= */

.profile {
    display: flex;
    align-items: center;

    padding: 16px;

    border-bottom: 1px solid #ddd;
}

.avatar {
    width: 42px;
    height: 42px;

    margin-right: 12px;

    border-radius: 50%;

    overflow: hidden;
}

.avatar img {
    width: 100%;
    height: 100%;

    object-fit: cover;
}

.username {
    font-weight: bold;
    font-size: 14px;
}

.location {
    margin-top: 3px;

    font-size: 12px;
    color: #777;
}

/* =========================
   CAPTION
========================= */

.caption {
    padding: 18px;

    font-size: 14px;
    line-height: 1.5;
    text-color:white;

    /* border-bottom: 1px solid #eee; */
}

.caption p {
    color: white;
}

.caption strong {
    margin-right: 5px;
}

.hashtags {
    margin-top: 8px;

    color: #0095f6;
}

/* =========================
   COMMENTS
========================= */

.comments {
    flex: 1;

    padding: 18px;

    overflow-y: auto;
}

.comment {
    margin-bottom: 18px;

    font-size: 14px;
}

.comment strong {
    margin-right: 5px;
}

/* =========================
   BOTTOM
========================= */

.bottom {
    border-top: 1px solid #ddd;
}

.actions {
    display: flex;

    padding: 12px 16px;
}

.actions button {
    margin-right: 15px;

    border: none;
    background: none;

    font-size: 25px;

    cursor: pointer;
}

.actions .bookmark {
    margin-left: auto;
    margin-right: 0;
}

.likes {
    padding: 0 16px 8px;

    font-size: 14px;
    font-weight: bold;
}

.date {
    padding: 0 16px 12px;

    font-size: 10px;
    color: #999;
}

/* =========================
   COMMENT INPUT
========================= */

.comment-input {
    display: flex;

    padding: 12px 16px;

    border-top: 1px solid #ddd;
}

.comment-input input {
    flex: 1;

    border: none;
    outline: none;

    font-size: 14px;
}

.comment-input button {
    border: none;
    background: none;

    color: #0095f6;

    font-weight: bold;

    cursor: pointer;
}

/* =========================
   CLOSE
========================= */

.close {
    position: fixed;

    top: 15px;
    right: 20px;

    z-index: 10000;

    border: none;
    background: none;

    color: white;

    font-size: 35px;

    cursor: pointer;
}

/* =========================
   MOBILE
========================= */

@media (max-width: 768px) {

    .modal {
        align-items: flex-start;

        overflow-y: auto;
    }

    .modal-box {
        width: 100%;
        height: auto;

        min-height: 100vh;

        flex-direction: column;

        border-radius: 0;
    }

    .media {
        width: 100%;
        height: 55vh;

        flex: none;
    }

    .description {
        width: 100%;

        min-height: 500px;
    }

    .comments {
        max-height: 300px;
    }

    .slider-button {
        width: 35px;
        height: 35px;

        font-size: 20px;
    }
}

