/* CRYSTAL GLASS MODAL FORCE OVERRIDE V3 - THEME AWARE */

/* 1. Modal Background - Ultra-Clear Dreamy Glass */
#editModal .modal-content,
.modal-content {
    /* Default (Dark/Crystal) */
    background: rgba(20, 25, 40, 0.6) !important;
    backdrop-filter: blur(20px) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3) !important;
    color: #ffffff !important;
    border-radius: 20px !important;
}

/* Light Theme Override */
[data-theme="light"] #editModal .modal-content,
[data-theme="light"] .modal-content {
    background: rgba(255, 255, 255, 0.85) !important;
    border: 1px solid rgba(0, 0, 0, 0.1) !important;
    color: #2d3436 !important;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1) !important;
}

/* Sunset Theme Override */
[data-theme="sunset"] #editModal .modal-content,
[data-theme="sunset"] .modal-content {
    background: rgba(45, 16, 85, 0.7) !important;
    border: 1px solid rgba(255, 118, 117, 0.3) !important;
    color: #ffeaa7 !important;
}


/* 5. AGGRESSIVE SCROLLBAR EXTERMINATION */
#editModal,
.modal,
.modal-content,
.modal-body,
.modal-dialog {
    scrollbar-width: none !important;
    -ms-overflow-style: none !important;
}

#editModal::-webkit-scrollbar,
.modal::-webkit-scrollbar,
.modal-content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar,
.modal-dialog::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
    background: transparent !important;
    opacity: 0 !important;
}

/* 2. Inputs - Theme Aware Pills */
#editModal input,
#editModal select,
#editModal textarea,
.modal-content input,
.modal-content select,
.modal-content textarea {
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    color: #ffffff !important;
    border-radius: 12px !important;
    padding: 8px 14px !important;
}

/* Light Theme Inputs */
[data-theme="light"] #editModal input,
[data-theme="light"] #editModal select,
[data-theme="light"] #editModal textarea,
[data-theme="light"] .modal-content input {
    background: rgba(255, 255, 255, 0.9) !important;
    border: 1px solid rgba(0, 0, 0, 0.15) !important;
    color: #2d3436 !important;
}

#editModal input:focus,
#editModal textarea:focus {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(137, 247, 254, 0.6) !important;
    outline: none !important;
}

/* Light Theme Focus */
[data-theme="light"] #editModal input:focus,
[data-theme="light"] #editModal textarea:focus {
    background: #ffffff !important;
    border-color: #0984e3 !important;
}

/* 3. Update Button - CYAN/BLUE (As per Screenshot) */
#modalUpdateBtn {
    background: linear-gradient(90deg, #89f7fe 0%, #66a6ff 100%) !important;
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(137, 247, 254, 0.4) !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
}

#modalUpdateBtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(137, 247, 254, 0.6) !important;
}

/* 4. Open Magnet Button - Red/Purple (Matching Screenshot) */
#modalOpenBtn {
    background: linear-gradient(135deg, #ff9a9e 0%, #fecfef 99%, #fecfef 100%) !important;
    /* Soft Red/Pink */
    /* Or maybe the user wants the Purple one? Screenshot bottom right says "Open" in Red w/ Icon */
    background: linear-gradient(135deg, #FF512F 0%, #DD2476 100%) !important;
    /* Vibrant Red/Pink */
    color: white !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 4px 15px rgba(221, 36, 118, 0.4) !important;
}

/* 5. Labels */
/* 5. Labels */
#editModal label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    margin-bottom: 5px !important;
}

[data-theme="light"] #editModal label {
    color: #636e72 !important;
}

/* 6. SCROLLBAR HIDDEN */
body.modal-open {
    overflow: hidden !important;
}

.modal {
    scrollbar-width: none !important;
}

.modal::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
}

/* 7. Dialog positioning */
.modal-dialog {
    margin: 3rem auto !important;
    max-width: 900px !important;
}