/* @🍮 */
/* === 模态框和弹出层 === */

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 100;
    display: none;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.modal-overlay.visible {
    display: flex;
}

.modal-window {
    background: var(--white-color);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
    width: 85%;
    max-width: 340px;
    animation: slideUp 0.4s ease-out;
}

.modal-window h3 {
    margin-top: 0;
    text-align: center;
    color: var(--primary-color);
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

#edit-group-member-modal,
#create-member-for-group-modal {
    z-index: 102;
}

#edit-group-member-modal .avatar-preview,
#create-member-for-group-modal .avatar-preview {
    width: 80px;
    height: 80px;
}

.action-sheet-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 200;
    display: none;
    align-items: flex-end;
    animation: fadeIn 0.3s ease;
}

.action-sheet-overlay.visible {
    display: flex;
}

.action-sheet {
    background: #f7f7f7;
    width: 100%;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    padding: 10px;
    padding-bottom: calc(10px + env(safe-area-inset-bottom));
    animation: slideUp 0.3s ease-out;
}

.action-sheet-button {
    width: 100%;
    background: white;
    border: none;
    padding: 15px;
    font-size: 16px;
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    border-radius: 10px;
    margin-bottom: 8px;
}

.action-sheet-button.danger {
    color: #e53935;
}

.action-sheet-button:last-child {
    margin-bottom: 0;
}
