/* myownbible_popup_style.css - പോപ്പ്-അപ്പിന് വേണ്ടിയുള്ള പ്രത്യേക ഡിസൈൻ ഫയൽ */

.bible-custom-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    align-items: center;
    justify-content: center;
}

.bible-custom-modal .modal-content {
    background-color: #1e1e24 !important; /* പഴയ ആ മനോഹരമായ ഡാർക്ക് ഗ്രേ പശ്ചാത്തലം പൂർണ്ണമായി നിലനിർത്തി */
    color: #f5f5f5 !important;
    border-radius: 12px !important;
    width: 95% !important;
    max-width: 550px !important; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
    overflow: hidden;
    border: 1px solid #33333b !important;
    box-sizing: border-box !important;
    padding: 0 !important; /* ഉള്ളിലെ പാഡിങ് ബോഡിയിലേക്ക് മാറ്റി */
    
    /* കമ്പ്യൂട്ടറിലും മൊബൈലിലും പഴയതുപോലെ അതീവ കൃത്യതയോടെ നടുവിൽ വരാനുള്ള സുരക്ഷിത പൊസിഷൻ */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}

/* മോഡൽ ഹെഡർ - കറുപ്പ് പ്രീമിയം സ്റ്റൈൽ */
.bible-custom-modal .modal-header {
    padding: 14px 20px;
    background-color: #121214 !important;
    color: #ffffff !important;
    font-weight: bold;
    cursor: move;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2a2a30;
}

.bible-custom-modal .close-btn {
    font-size: 24px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    transition: color 0.2s;
}
.bible-custom-modal .close-btn:hover {
    color: #ffffff;
}

.bible-custom-modal .modal-body {
    padding: 20px;
}

/* --- [റെസ്‌പോൺസീവ് ഗ്രിഡ് ലോജിക്]: കമ്പ്യൂട്ടറിൽ ഒരൊറ്റ വരിയായിത്തന്നെ കിടക്കും --- */
.popup-grid-inputs-row {
    display: grid !important;
    grid-template-columns: 2.2fr 1fr 1fr 0.5fr !important; 
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 10px !important;
}

.popup-grid-inputs-row select {
    padding: 8px;
    border: 1px solid #3a3a42;
    border-radius: 6px;
    font-size: 13px;
    background-color: #2a2a30 !important; /* പഴയ സുന്ദരമായ ഇരുണ്ട പശ്ചാത്തലം */
    color: #ffffff !important; 
    width: 100%;
    outline: none;
    box-sizing: border-box !important;
}

/* മാറ്റ് ഫിനിഷ് ഉള്ള വരി ചേർക്കൽ ബട്ടൺ */
.bible-custom-modal .btn-add-row {
    background: #2a2a30;
    color: #b0b0b8;
    border: 1px solid #3a3a42;
    font-size: 12px;
    padding: 6px 14px;
    font-weight: bold;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}
.bible-custom-modal .btn-add-row:hover {
    background: #3a3a42;
    color: #fff;
}

/* വെറുമൊരു ✕ ചിഹ്നം മാത്രമുള്ള റെഡ് മാറ്റ് ബട്ടൺ */
.bible-custom-modal .remove-row-btn {
    background: #3d1d1d !important; 
    color: #ff8888 !important;
    border: 1px solid #5c2c2c !important;
    font-size: 13px;
    padding: 6px 0;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 34px; 
}
.bible-custom-modal .remove-row-btn:hover {
    background: #4d1d1d !important;
    color: #ff9999 !important;
}

/* താഴെയുള്ള പ്രധാന ബട്ടണുകൾ */
.bible-custom-modal .btn-save-all {
    background-color: #2e2e36 !important;
    color: #ffffff !important;
    border: 1px solid #44444c !important;
    font-weight: bold;
    padding: 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.bible-custom-modal .btn-save-all:hover {
    background-color: #3e3e46 !important;
}

.bible-custom-modal .btn-close-bottom {
    background: #18181c;
    color: #888;
    border: 1px solid #2a2a30;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}
.bible-custom-modal .btn-close-bottom:hover {
    background: #222226;
    color: #fff;
}

/* 📱 [മൊബൈൽ മാന്ത്രിക സുരക്ഷാ ലോജിക്]: 600px-ൽ താഴെയുള്ള ഫോണുകളിൽ ഫീൽഡുകൾ സുന്ദരമായി ഒന്നിന് താഴെ ഒന്നായി മാറും */
@media screen and (max-width: 600px) {
    .popup-grid-inputs-row {
        grid-template-columns: 1fr !important; /* ഒരൊറ്റ കോളമാക്കി മാറ്റുന്നു */
        background: #121214 !important; /* തിരിച്ചറിയാൻ ചെറിയൊരു ഡാർക്ക് പശ്ചാത്തലം */
        padding: 12px !important;
        border-radius: 8px !important;
        border: 1px solid #2a2a30 !important;
        position: relative !important;
        gap: 10px !important;
        box-sizing: border-box !important;
    }

    .popup-grid-inputs-row select {
        width: 100% !important;
        padding: 10px !important; /* വിരൽ അമർത്താൻ പാകത്തിന് വലിപ്പം കൂട്ടി */
        font-size: 14px !important;
    }

    .bible-custom-modal .remove-row-btn {
        width: 40px !important; /* മൊബൈലിൽ ഡിലീറ്റ് ബട്ടൺ ചെറുതാക്കി മുകളിൽ വലതുവശത്ത് ഒതുക്കി */
        position: absolute !important;
        right: 8px !important;
        top: 8px !important;
        height: 28px !important;
        font-size: 11px !important;
    }
}
/* --- സമാന്തര റഫറൻസ് പോപ്പ്-അപ്പ് മൊബൈലിൽ സ്ക്രീൻ ഔട്ട് ആകാതിരിക്കാനുള്ള ഫിക്സ് --- */

/* 1. മെയിൻ മോഡൽ പശ്ചാത്തലം എപ്പോഴും സ്ക്രീനിന്റെ നടുവിലായി ലോക്ക് ചെയ്യുന്നു */
#refModal {
    display: none;
    position: fixed !important;
    z-index: 999999 !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.6) !important;
    overflow-y: auto !important; /* വിവരങ്ങൾ കൂടിയാൽ മൊബൈലിൽ താഴോട്ട് സ്ക്രോൾ ചെയ്യാം */
}

/* 2. ഉള്ളിലെ ബോക്സ് കമ്പ്യൂട്ടറിലും മൊബൈലിലും പഴയ ഡാർക്ക് പ്രീമിയം തീമിലേക്ക് ലോക്ക് ചെയ്യുന്നു */
#refModalContent, .bible-custom-modal .modal-content {
    background-color: #1e1e24 !important; /* പഴയ ആ മനോഹരമായ ഡാർക്ക് ഗ്രേ പശ്ചാത്തലം തിരികെ നൽകി */
    color: #f5f5f5 !important;
    border-radius: 12px !important;
    width: 95% !important;
    max-width: 550px !important; /* വരികൾ ഒരൊറ്റ ലൈനിൽ നിൽക്കാൻ വീതി കൂട്ടി */
    box-shadow: 0 10px 30px rgba(0,0,0,0.6) !important;
    border: 1px solid #33333b !important;
    box-sizing: border-box !important;
    padding: 15px !important;
    
    /* കമ്പ്യൂട്ടറിലും മൊബൈലിലും പഴയതുപോലെ അതീവ കൃത്യതയോടെ നടുവിൽ വരാനുള്ള സുരക്ഷിത പൊസിഷൻ */
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    overflow: hidden !important;
}

/* 3. ഡൈനാമിക് വരികളിലെ സെലക്ട് ബോക്സുകൾ പഴയതുപോലെ പ്രൊഫഷണൽ മാറ്റ് ഫിനിഷിലേക്ക് മാറ്റുന്നു */
.popup-grid-inputs-row {
    display: grid !important;
    grid-template-columns: 2.2fr 1fr 1fr 0.5fr !important; /* ഒരൊറ്റ വരിയിലാക്കാൻ നിർബന്ധിക്കുന്നു */
    gap: 8px !important;
    align-items: center !important;
    width: 100% !important;
    margin-bottom: 10px !important;
}

.popup-grid-inputs-row select {
    padding: 8px !important;
    border: 1px solid #3a3a42 !important;
    border-radius: 6px !important;
    font-size: 13px !important;
    background-color: #2a2a30 !important; /* പഴയ സുന്ദരമായ ഇരുണ്ട പശ്ചാത്തലം */
    color: #ffffff !important; /* വെളുത്ത അക്ഷരങ്ങൾ വ്യക്തമായി കാണാം */
    width: 100% !important;
    outline: none !important;
}

/* വെറുമൊരു ✕ ചിഹ്നം മാത്രമുള്ള റെഡ് മാറ്റ് ബട്ടൺ */
.remove-row-btn {
    background: #3d1d1d !important; 
    color: #ff8888 !important;
    border: 1px solid #5c2c2c !important;
    font-size: 13px !important;
    padding: 6px 0 !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    width: 100% !important;
    text-align: center !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 34px !important; /* സെലക്ട് ബോക്സുകളുടെ അതേ ഉയരം */
}
.remove-row-btn:hover {
    background: #4d1d1d !important;
    color: #ff9999 !important;
}