/* เกี่ยวกับ (การแสดงหน้าต่าง Modal ของการเลือกข้อมูลต่างๆที่เป็น SelectDropdown เช่น เซิร์ฟเวอร์ / ตัวละคร) */
/* (ถูกแปลงมาจาก Select ก่อนจะเป็น Dropdown แบบ Modal) */

#customSelectModal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

#customSelectModal > div {
    background: #19212E;
    border-radius: 12px;
    width: 90%;
    max-width: 400px;
    max-height: 80%;
    overflow-y: auto;
    border: 1px solid #4B5566;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.5), 0 10px 10px -5px rgba(0, 0, 0, 0.3);
}

#customSelectModal > div > div:first-child {
    padding: 15px;
    border-bottom: 1px solid #4B5566;
    position: sticky;
    top: 0;
    background: #19212E;
    z-index: 1;
}

#customSelectModal > div > div:first-child h3 {
    color: white;
    margin: 0;
    text-align: center;
    font-size: 1.2rem;
    font-weight: 600;
}

#customSelectModalItems {
    padding: 10px;
}

#customSelectModalItems div {
    padding: 12px 16px;
    color: #F6F6F6;
    cursor: pointer;
    font-size: 14px;
    text-align: center;
    border-bottom: 1px solid #2d3748;
    transition: background-color 0.2s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

#customSelectModalItems div::after {
    content: '';
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #4B5566;
    background: transparent;
    display: inline-block;
    position: absolute;
    right: 16px;
}

#customSelectModalItems div.selected::after {
    content: '✓';
    background: #34d399;
    border-color: #34d399;
    color: #1a202c;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    font-weight: bold;
}

#customSelectModalItems div:last-child {
    border-bottom: none;
}

#customSelectModalItems div:hover {
    background-color: #2d3748;
}

#customSelectModalItems div.selected {
    background-color: #374151;
    color: #1a202c;
}

#customSelectModal > div > div:last-child {
    padding: 15px;
    border-top: 1px solid #4B5566;
    text-align: center;
    position: sticky;
    bottom: 0;
    background: #19212E;
}

#closeModalBtn {
    background: #dc3545;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    color: white;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

#closeModalBtn:hover {
    background: #c82333;
}

/* สำหรับมือถือ */
@media (max-width: 768px) {
    #customSelectModalItems div {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    #customSelectModal > div > div:first-child h3 {
        font-size: 1rem;
    }
    
    #closeModalBtn {
        padding: 6px 16px;
        font-size: 13px;
    }
}
