/* =========================================================
   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;
}

/* 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;
    }
}

/* 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;
    }
}