/* Registration Modal Styles */
#register-modal-container .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* แก้จาก display: none เป็น flex จะช่วยให้เห็น modal ทันที */
    align-items: center;
    justify-content: center;
    z-index: 1100;
    animation: fadeIn 0.3s ease-out;
}

#register-modal-container .modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    display: flex;
    animation: slideUp 0.3s ease-out;
}

#register-modal-container .modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 30px;
    cursor: pointer;
    color: #333;
    z-index: 10;
}

#register-modal-container .modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
}

#register-modal-container .modal-image {
    width: 100%;
    height: 100%;
}

#register-modal-container .modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#register-modal-container .register-form {
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

#register-modal-container .register-form h2 {
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}

#register-modal-container .register-form p {
    color: #666;
    margin-bottom: 20px;
}

#register-modal-container .form-group {
    margin-bottom: 20px;
}

#register-modal-container .form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
}

#register-modal-container .form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

#register-modal-container .consent-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

#register-modal-container .submit-btn {
    background-color: #ff4444;
    color: white;
    padding: 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

#register-modal-container .submit-btn:hover {
    background-color: #ff2222;
}

/* เพิ่ม animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    #register-modal-container .modal-body {
        grid-template-columns: 1fr;
    }
    
    #register-modal-container .modal-image {
        display: none;
    }
    
    #register-modal-container .register-form {
        padding: 20px;
    }
}