/**
 * 聊天窗口菜单样式
 */

/* 菜单下拉框 */
.onlinelive-chat-menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    display: none !important;
    z-index: 10004;
    border: 1px solid #e5e7eb;
    overflow: hidden;
}

.onlinelive-chat-menu-dropdown.active {
    display: block !important;
    animation: slideDown 0.2s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.onlinelive-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
    -webkit-tap-highlight-color: transparent;
}

.onlinelive-menu-item:last-child {
    border-bottom: none;
}

.onlinelive-menu-item:hover {
    background: #f9fafb;
}

.onlinelive-menu-item:active {
    background: #f3f4f6;
}

.onlinelive-menu-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.onlinelive-menu-text {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
    flex: 1;
}

/* 模态对话框（Change Name / Chat to Email）：必须在聊天窗口之上 */
.onlinelive-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2147483647 !important; /* 与聊天窗口同值，弹窗后插入 DOM 故显示在上层 */
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease;
}

.onlinelive-modal-dialog {
    background: #ffffff;
    border-radius: 12px;
    padding: 24px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
    position: relative;
    z-index: 1; /* 在遮罩层内居上即可 */
}

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

.onlinelive-modal-icon {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 16px;
}

.onlinelive-modal-title {
    font-size: 16px;
    color: #374151;
    margin-bottom: 20px;
    line-height: 1.5;
    font-weight: 500;
}

.onlinelive-modal-content {
    margin-bottom: 24px;
}

.onlinelive-modal-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    transition: all 0.2s;
    box-sizing: border-box;
}

.onlinelive-modal-input:focus {
    outline: none;
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.onlinelive-modal-input::placeholder {
    color: #9ca3af;
}

.onlinelive-modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.onlinelive-modal-btn {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
}

.onlinelive-modal-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.onlinelive-modal-btn-cancel:hover {
    background: #e5e7eb;
}

.onlinelive-modal-btn-submit {
    background: #10b981;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 6px;
}

.onlinelive-modal-btn-submit:hover {
    background: #059669;
}

.onlinelive-modal-btn-submit:active {
    transform: scale(0.98);
}

/* 菜单按钮包装器 */
.onlinelive-chat-menu-wrapper {
    position: relative;
}

/* 菜单按钮需要相对定位 */
.onlinelive-chat-menu {
    position: relative;
}
