/* =========================================================

   MODERN MODAL (MEMORIES DETAIL)

========================================================= */



/* Efek Blur pada Background Modal */

.modern-modal {

    backdrop-filter: blur(10px);

    -webkit-backdrop-filter: blur(10px);

    background-color: rgba(11, 17, 32, 0.6);

}



/* Kontainer Modal */

.custom-modal-content {

    background: rgba(30, 41, 59, 0.85); /* Warna dasar dark mode semi-transparan */

    backdrop-filter: blur(20px);

    border: 1px solid rgba(255, 255, 255, 0.1);

    border-radius: 24px;

    position: relative;

    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5), 0 0 40px rgba(132, 85, 240, 0.15);

}



/* Tombol Close Melayang di Kanan Atas */

.btn-close-modal {

    position: absolute;

    top: -20px;

    right: -20px;

    width: 45px;

    height: 45px;

    border-radius: 50%;

    background: #8455f0;

    color: white;

    border: 2px solid rgba(255, 255, 255, 0.2);

    display: flex;

    align-items: center;

    justify-content: center;

    font-size: 20px;

    cursor: pointer;

    z-index: 10;

    transition: all 0.3s ease;

    box-shadow: 0 10px 20px rgba(132, 85, 240, 0.4);

}



.btn-close-modal:hover {

    background: #9468ff;

    transform: scale(1.1) rotate(90deg); /* Sedikit animasi rotasi */

    color: white;

}



/* Penyesuaian Gambar */

.image-wrapper img {

    max-height: 75vh; /* Batasi tinggi agar tidak terlalu panjang ke bawah */

    object-fit: contain; /* Pastikan gambar tidak terpotong */

    width: 100%;

    border: 1px solid rgba(255,255,255,0.05);

}



/* =========================================================

   MODERN MODAL (PROFILE DETAIL) - FIXED

========================================================= */



.profile-image-container {

    border-radius: 20px;

    overflow: hidden;

    position: relative;

    border: 1px solid rgba(255, 255, 255, 0.1);

    box-shadow: 0 15px 35px rgba(0,0,0,0.4);

    background: rgba(0,0,0,0.2);

    aspect-ratio: 4/5;

    display: flex;

    align-items: center;

    justify-content: center;

}



.profile-img {

    width: 100%;

    height: 100%;

    object-fit: cover;

    display: none;

}



.profile-info-wrap {

    padding-left: 10px;

}



/* Memaksa warna terang dengan ID Selector & !important */

#showDetail .profile-name {

    color: #ffffff !important;

    font-weight: 800;

    font-size: 2.2rem;

}



#showDetail .profile-fullname {

    color: #8455f0 !important;

    font-size: 1.1rem;

    font-weight: 500;

    border-bottom: 1px solid rgba(255,255,255,0.1);

    padding-bottom: 15px;

}



#showDetail .info-box {

    display: flex;

    flex-direction: column;

    margin-bottom: 5px;

}



#showDetail .info-label {

    color: #9ca3af !important;

    font-size: 0.85rem;

    text-transform: uppercase;

    letter-spacing: 1px;

    margin-bottom: 4px;

    display: block !important; /* Memastikan teks turun ke bawah */

}



#showDetail .info-value {

    color: #ffffff !important;

    font-size: 1rem;

    font-weight: 600;

    display: block !important;

}



#showDetail .info-value.highlight {

    color: #ffb703 !important;

    font-size: 1.2rem;

}



#showDetail .info-value.small-text {

    font-size: 0.9rem;

    color: #e2e8f0 !important;

}



#showDetail .btn-modern-social {

    background: rgba(132, 85, 240, 0.15) !important;

    color: #8455f0 !important;

    border: 1px solid rgba(132, 85, 240, 0.3) !important;

    padding: 12px;

    border-radius: 12px;

    font-weight: 600;

    transition: all 0.3s ease;

    display: block;

    text-align: center;

    text-decoration: none;

}



#showDetail .btn-modern-social:hover {

    background: #8455f0 !important;

    color: #ffffff !important;

    transform: translateY(-3px);

    box-shadow: 0 10px 20px rgba(132, 85, 240, 0.3);

}



/* =========================================================

   CUSTOM LIGHTBOX (FULLSCREEN IMAGE)

========================================================= */



.custom-lightbox {

    display: none; /* Sembunyikan secara default */

    position: fixed;

    z-index: 99999; /* Pastikan di atas modal bootstrap */

    left: 0;

    top: 0;

    width: 100%;

    height: 100%;

    background-color: rgba(11, 17, 32, 0.95); /* Warna gelap menyatu dengan tema */

    backdrop-filter: blur(8px);

    -webkit-backdrop-filter: blur(8px);

    justify-content: center;

    align-items: center;

    cursor: zoom-out;

}



.lightbox-content {

    max-width: 90%;

    max-height: 90vh;

    border-radius: 12px;

    box-shadow: 0 0 30px rgba(132, 85, 240, 0.3);

    object-fit: contain;

    animation: zoomIn 0.3s ease;

}



@keyframes zoomIn {

    from { transform: scale(0.8); opacity: 0; }

    to { transform: scale(1); opacity: 1; }

}



.lightbox-close {

    position: absolute;

    top: 20px;

    right: 35px;

    color: #8455f0;

    font-size: 50px;

    font-weight: bold;

    transition: 0.3s;

    cursor: pointer;

}



.lightbox-close:hover,

.lightbox-close:focus {

    color: #fff;

    text-decoration: none;

}



/* Efek saat gambar di profil dihover */

#fotoMember:hover {

    transform: scale(1.03);

    filter: brightness(1.1);

}



/* =========================================================

   MODERN FORM ELEMENTS

========================================================= */



.modern-label {

    color: #9ca3af;

    font-size: 0.85rem;

    font-weight: 600;

    letter-spacing: 0.5px;

    text-transform: uppercase;

    margin-bottom: 8px;

    display: block;

}



.modern-input {

    width: 100%;

    background: rgba(30, 41, 59, 0.7);

    border: 1px solid rgba(255, 255, 255, 0.1);

    color: #ffffff;

    border-radius: 12px;

    padding: 14px 18px;

    font-size: 0.95rem;

    transition: all 0.3s ease;

}



.modern-input::placeholder {

    color: #64748b;

}



.modern-input:focus {

    outline: none;

    background: rgba(30, 41, 59, 0.9);

    border-color: #8455f0;

    box-shadow: 0 0 0 4px rgba(132, 85, 240, 0.2);

}



/* Custom Select Dropdown */

.modern-select-wrapper {

    position: relative;

}

.modern-select {

    appearance: none;

    -webkit-appearance: none;

    cursor: pointer;

}

.modern-select option {

    background: #0f172a;

    color: #ffffff;

}

.select-icon {

    position: absolute;

    right: 18px;

    top: 50%;

    transform: translateY(-50%);

    color: #8455f0;

    pointer-events: none;

}



/* Custom Radio Buttons (Pill Style) */

.custom-radio-group {

    display: flex;

    gap: 12px;

}

.custom-radio-label {

    flex: 1;

    text-align: center;

    padding: 12px;

    background: rgba(30, 41, 59, 0.7);

    border: 1px solid rgba(255, 255, 255, 0.1);

    border-radius: 12px;

    color: #9ca3af;

    cursor: pointer;

    font-weight: 600;

    transition: all 0.3s ease;

}

.custom-radio-group input:checked + .custom-radio-label {

    background: rgba(132, 85, 240, 0.2);

    border-color: #8455f0;

    color: #ffffff;

    box-shadow: 0 5px 15px rgba(132, 85, 240, 0.25);

}



/* Modern Drop Zone */

.modern-drop-zone {

    border: 2px dashed rgba(132, 85, 240, 0.5);

    background: rgba(132, 85, 240, 0.05);

    border-radius: 16px;

    padding: 40px 20px;

    text-align: center;

    cursor: pointer;

    transition: all 0.3s ease;

}

.modern-drop-zone:hover, .modern-drop-zone.dragover {

    background: rgba(132, 85, 240, 0.15);

    border-color: #8455f0;

}



/* Modern Note Box */

.modern-note {

    background: rgba(255, 183, 3, 0.1);

    border-left: 4px solid #ffb703;

}



/* Buttons */

.btn-modern-save {

    background: #8455f0;

    color: #ffffff;

    border: none;

    border-radius: 12px;

    font-weight: 600;

    transition: all 0.3s ease;

}

.btn-modern-save:hover {

    background: #9468ff;

    color: #ffffff;

    transform: translateY(-2px);

    box-shadow: 0 10px 20px rgba(132, 85, 240, 0.4);

}

.btn-modern-cancel {

    background: transparent;

    color: #9ca3af;

    border: 1px solid rgba(255, 255, 255, 0.2);

    border-radius: 12px;

    font-weight: 600;

    transition: all 0.3s ease;

}

.btn-modern-cancel:hover {

    background: rgba(255, 255, 255, 0.1);

    color: #ffffff;

}



/* =========================================================

   MODERN MODAL (REQUIREMENT DETAIL)

   Uses existing modern-modal.css base styles

========================================================= */



#showDetailRequirement .requirement-header {

    display: flex;

    align-items: center;

    gap: 16px;

    padding-right: 35px;

}



#showDetailRequirement .requirement-icon {

    width: 52px;

    height: 52px;

    flex-shrink: 0;

    display: flex;

    align-items: center;

    justify-content: center;

    border-radius: 15px;

    background: rgba(132, 85, 240, 0.15);

    border: 1px solid rgba(132, 85, 240, 0.3);

    color: #b99aff;

    font-size: 22px;

}



#showDetailRequirement .requirement-title {

    color: #ffffff;

    font-size: 1.45rem;

    font-weight: 800;

}



#showDetailRequirement .requirement-subtitle {

    color: #9ca3af;

    font-size: 0.88rem;

}



/* Photo cards */



#showDetailRequirement .requirement-photo-card {

    height: 100%;

    overflow: hidden;

    border-radius: 16px;

    background: rgba(15, 23, 42, 0.55);

    border: 1px solid rgba(255, 255, 255, 0.08);

    transition: border-color 0.3s ease,

                transform 0.3s ease;

}



#showDetailRequirement .requirement-photo-card:hover {

    border-color: rgba(132, 85, 240, 0.6);

    transform: translateY(-3px);

}



#showDetailRequirement .requirement-photo-header {

    padding: 13px 16px;

    color: #c4b5fd;

    font-size: 0.85rem;

    font-weight: 700;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

}



#showDetailRequirement .requirement-photo-wrapper {

    height: 260px;

    padding: 12px;

    display: flex;

    align-items: center;

    justify-content: center;

    background: rgba(11, 17, 32, 0.35);

}



#showDetailRequirement .requirement-photo {

    display: block;

    width: 100%;

    height: 100%;

    object-fit: contain;

    border: 1px solid rgba(255, 255, 255, 0.05);

    border-radius: 10px;

    cursor: pointer;

    transition: transform 0.3s ease,

                filter 0.3s ease;

}



#showDetailRequirement .requirement-photo:hover {

    transform: scale(1.02);

    filter: brightness(1.08);

}



/* Information panel */



#showDetailRequirement .requirement-info-card {

    padding: 20px;

    border-radius: 16px;

    background: rgba(15, 23, 42, 0.55);

    border: 1px solid rgba(255, 255, 255, 0.08);

}



#showDetailRequirement .requirement-info-heading {

    color: #c4b5fd;

    font-size: 0.95rem;

    font-weight: 700;

    padding-bottom: 12px;

    margin-bottom: 14px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.08);

}



#showDetailRequirement .requirement-information {

    color: #e2e8f0;

    font-size: 0.95rem;

    line-height: 1.8;

    white-space: pre-line;

    overflow-wrap: anywhere;

}



/* Footer */



#showDetailRequirement .requirement-footer {

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 12px;

}



#showDetailRequirement .requirement-footer-note {

    color: #9ca3af;

    font-size: 0.8rem;

}



#showDetailRequirement .btn-requirement-close {

    padding: 10px 18px;

    border-radius: 12px;

    background: #8455f0;

    border: 1px solid #8455f0;

    color: #ffffff;

    font-weight: 600;

    transition: all 0.3s ease;

}



#showDetailRequirement .btn-requirement-close:hover {

    background: #9468ff;

    border-color: #9468ff;

    color: #ffffff;

    transform: translateY(-2px);

    box-shadow: 0 8px 20px rgba(132, 85, 240, 0.3);

}



/* Date input calendar icon filter for dark mode */

input[type="date"]::-webkit-calendar-picker-indicator {

    filter: invert(1);

    cursor: pointer;

}



@media (max-width: 767px) {

    .profile-info-wrap {

        padding-left: 0;

        margin-top: 20px;

        text-align: center;

    }

    .profile-image-container {

        max-width: 250px;

        margin: 0 auto;

    }



    #showDetailRequirement .requirement-title {

        font-size: 1.2rem;

    }



    #showDetailRequirement .requirement-photo-wrapper {

        height: 220px;

    }



    #showDetailRequirement .requirement-info-card {

        padding: 16px;

    }



    #showDetailRequirement .requirement-footer-note {

        font-size: 0.7rem;

    }

}



/* Responsif: Geser tombol close ke dalam saat di layar kecil */

@media (max-width: 991px) {

    .btn-close-modal {

        top: 15px;

        right: 15px;

        width: 35px;

        height: 35px;

        font-size: 16px;

    }

}

/* =========================================================
   REQUIREMENT MODAL FIXES
   Scoped to #showDetailRequirement to avoid affecting other modals
========================================================= */

#showDetailRequirement .modal-dialog {
    width: calc(100% - 32px);
    max-width: 900px;
    margin: 24px auto;
}

#showDetailRequirement .custom-modal-content {
    background: rgba(30, 41, 59, 0.97) !important;
    color: #e2e8f0;
    overflow: visible;
}

#showDetailRequirement .modal-body {
    min-width: 0;
}

#showDetailRequirement .requirement-title {
    color: #ffffff !important;
}

#showDetailRequirement .requirement-subtitle {
    color: #cbd5e1 !important;
}

#showDetailRequirement .requirement-header {
    padding-right: 36px;
}

#showDetailRequirement .row {
    min-width: 0;
}

#showDetailRequirement #containerFoto1,
#showDetailRequirement #containerFoto2 {
    min-width: 0;
}

#showDetailRequirement .requirement-photo-card {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

#showDetailRequirement .requirement-photo-wrapper {
    width: 100%;
    height: 260px;
    min-width: 0;
    overflow: hidden;
    box-sizing: border-box;
}

#showDetailRequirement img.requirement-photo {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    margin: 0 auto;
    box-sizing: border-box;
}

#showDetailRequirement .requirement-info-card {
    background: rgba(15, 23, 42, 0.8);
}

#showDetailRequirement .requirement-info-heading {
    color: #c4b5fd !important;
}

#showDetailRequirement .requirement-information {
    color: #f1f5f9 !important;
    white-space: pre-line;
    overflow-wrap: anywhere;
}

#showDetailRequirement .requirement-footer-note {
    color: #cbd5e1 !important;
}

@media (max-width: 767px) {
    #showDetailRequirement .modal-dialog {
        width: calc(100% - 24px);
        margin: 16px auto;
    }

    #showDetailRequirement .requirement-photo-wrapper {
        height: 220px;
    }

    #showDetailRequirement .requirement-header {
        padding-right: 32px;
    }
}
