@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@200;300;400;500;600;700&display=swap");

/* Tombol bisa diletakkan di mana saja, tidak perlu position absolute */
.view-modal {
    color: #001f58;
    font-size: 18px;
    padding: 10px 25px;
    background: #fff;
    border: none;
    /* biarkan mengalir normal */
}

/* Popup selalu di tengah viewport dengan fixed */
.popup {
    position: fixed;
    /* tetap di tengah layar */
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    top: 50%;
    left: 50%;
    max-width: 480px;
    width: 100%;
    opacity: 0;
    pointer-events: none;
    box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.1);
    transform: translate(-50%, -50%) scale(1.2);
    transition:
        top 0s 0.2s ease-in-out,
        opacity 0.2s 0s ease-in-out,
        transform 0.2s 0s ease-in-out;
    z-index: 999;
    /* pastikan di atas konten lain */
}

.popup.show {
    top: 50%;
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
    transition:
        top 0s 0s ease-in-out,
        opacity 0.2s 0s ease-in-out,
        transform 0.2s 0s ease-in-out;
}

.popup :is(header, .icons, .field) {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.popup header {
    padding-bottom: 15px;
    border-bottom: 1px solid #ebedf9;
}

header span {
    font-size: 21px;
    font-weight: 600;
}

header .close,
.icons a {
    display: flex;
    align-items: center;
    border-radius: 50%;
    justify-content: center;
    transition: all 0.3s ease-in-out;
}

header .close {
    color: #878787;
    font-size: 17px;
    /* background: #f2f3fb; */
    height: 33px;
    width: 33px;
    cursor: pointer;
}

header .close:hover {
    background: #ebedf9;
}

.popup .content {
    margin: 20px 0;
}

.popup .icons {
    margin: 15px 0 20px 0;
}

.content p {
    font-size: 16px;
}

.content .icons a {
    height: 50px;
    width: 50px;
    font-size: 20px;
    text-decoration: none;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.icons a i {
    transition: transform 0.3s ease-in-out;
}

.icons a:nth-child(1) {
    color: #1877f2;
    border-color: #b7d4fb;
}

.icons a:nth-child(1):hover {
    background: #1877f2;
}

.icons a:nth-child(2) {
    color: #46c1f6;
    border-color: #b6e7fc;
}

.icons a:nth-child(2):hover {
    background: #46c1f6;
}

.icons a:nth-child(3) {
    color: #e1306c;
    border-color: #f5bccf;
}

.icons a:nth-child(3):hover {
    background: #e1306c;
}

.icons a:nth-child(4) {
    color: #25d366;
    border-color: #bef4d2;
}

.icons a:nth-child(4):hover {
    background: #25d366;
}

.icons a:nth-child(5) {
    color: #0088cc;
    border-color: #b3e6ff;
}

.icons a:nth-child(5):hover {
    background: #0088cc;
}

.icons a:hover {
    color: #fff;
    border-color: transparent;
}

.icons a:hover i {
    transform: scale(1.2);
}

.content .field {
    margin: 12px 0 -5px 0;
    height: 45px;
    border-radius: 4px;
    padding: 0 5px;
    border: 1px solid #e1e1e1;
    display: flex;
    align-items: center;
}

.field.active {
    border-color: #001f58;
}

.field i {
    width: 50px;
    font-size: 18px;
    text-align: center;
}

.field.active i {
    color: #001f58;
}

.field input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    font-size: 15px;
}

.field button {
    color: #fff;
    padding: 5px 18px;
    background: #001f58;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.field button:hover {
    background: #8d39fa;
}

/* Responsive untuk layar kecil */
@media (max-width: 480px) {
    .popup {
        max-width: 92%;
        padding: 20px;
    }

    .popup header span {
        font-size: 18px;
    }

    .content .icons a {
        height: 42px;
        width: 42px;
        font-size: 16px;
    }

    .field input {
        font-size: 14px;
    }

    .field button {
        padding: 4px 14px;
        font-size: 14px;
    }
}
