/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

 .pdf-download-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px;
    background-color: #f8f8f8;
    color: #333;
    font-size: 16px;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pdf-download-btn:hover {
    background-color: #f2f2f2;
    color: #000;
}

.material-symbols--download-sharp {
    display: inline-block;
    width: 24px;
    height: 24px;
    --svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='m12 16l-5-5l1.4-1.45l2.6 2.6V4h2v8.15l2.6-2.6L17 11zm-8 4v-5h2v3h12v-3h2v5z'/%3E%3C/svg%3E");
    background-color: currentColor;
    -webkit-mask-image: var(--svg);
    mask-image: var(--svg);
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: 100% 100%;
    mask-size: 100% 100%;
}

/* Styling untuk Modal */
.pdf-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
}

.pdf-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 10px;
    border: 1px solid #888;
    width: 80%;
    max-width: 1100px;
    position: relative;
}

.close-modal {
    position: absolute;
    top: 0px;
    right: -60px;
    color: #333;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background-color: #FFF;
    width: 50px;
    height: 50px;
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.close-modal:hover,
.close-modal:focus {
    color: #000;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    padding-top: 60px;
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    border: 1px solid #888;
    width: 80%;
    max-width: 400px;
    position: relative;
}

.modal-content-header {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f8f8;
    padding: 10px;
}

.modal-content-body {
    padding: 10px;
    overflow-y: auto; /* Pastikan elemen ini bisa di-scroll secara vertikal */
    max-height: 70vh; /* Membatasi tinggi maksimal berdasarkan tinggi viewport */
}

/* Tambahkan aturan responsif */
@media screen and (max-width: 768px) {
    .modal-content-body {
        max-height: 60vh; /* Tinggi lebih rendah untuk perangkat kecil */
    }
}

@media screen and (orientation: landscape) {
    .modal-content-body {
        max-height: 50vh; /* Sesuaikan untuk layar yang lebih pendek */
    }
}

.close-btn {
    color: #333;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: #000;
}

.modal-content label {
    width: 100%;
}

.modal-content-header h3 {
    font-size: 18px;
    margin: 0;
    padding: 0;
}

/* RESPONSIVE DESIGN */
@media screen and (max-width: 768px) {
    .pdf-download-btn {
        top: 10px;
        right: 10px;
        padding: 8px;
        font-size: 14px;
        gap: 3px;
    }

    .material-symbols--download-sharp {
        width: 20px;
        height: 20px;
    }

    .pdf-modal-content {
        width: 90%;
        margin: 25% auto;
    }

    .modal-content {
        width: 90%;
        margin: 10% auto;
    }

    .close-modal {
        right: 0;
        top: -40px;
        font-size: 24px;
        width: 40px;
        height: 40px;
    }

    .modal-content-header h3 {
        font-size: 16px;
    }
}

@media screen and (max-width: 480px) {
    .pdf-download-btn {
        top: 5px;
        right: 5px;
        padding: 6px;
        font-size: 12px;
    }

    .material-symbols--download-sharp {
        width: 16px;
        height: 16px;
    }

    .pdf-modal-content,
    .modal-content {
        width: 95%;
        margin: 25% auto;
    }

    .close-modal {
        right: 0;
        top: -40px;
        font-size: 20px;
        width: 30px;
        height: 30px;
    }

    .modal-content-header h3 {
        font-size: 14px;
    }
}

