/* ===========================================
   AI Menu - специфичные стили
   Модуль: bpm2bAiConnector
   =========================================== */

/* Toolbar container */
.ai-menu-toolbar {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Dropdown */
.ai-menu-dropdown {
    position: relative;
    display: inline-block;
}

.ai-menu-content {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1000;
    min-width: 280px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 8px;
    margin-top: 2px;
}

.ai-menu-dropdown.open .ai-menu-content {
    display: block;
}

/* Sections */
.ai-menu-section {
    margin-bottom: 8px;
}

.ai-menu-section:last-child {
    margin-bottom: 0;
}

.ai-menu-section-header {
    font-size: 11px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 4px;
    padding: 0 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.ai-menu-section-header .fa {
    font-size: 10px;
}

/* Items */
.ai-menu-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ai-menu-items.ai-menu-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.ai-menu-item {
    padding: 6px 8px;
    border: 1px solid #e9ecef;
    border-radius: 3px;
    background: #f8f9fa;
    cursor: pointer;
    font-size: 12px;
    text-align: center;
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.ai-menu-item:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.ai-menu-item.ai-menu-loading {
    opacity: 0.6;
    pointer-events: none;
}

.ai-menu-item.ai-menu-loading::after {
    content: '';
    width: 12px;
    height: 12px;
    border: 2px solid #6c757d;
    border-top-color: transparent;
    border-radius: 50%;
    animation: ai-menu-spin 0.8s linear infinite;
    margin-left: 4px;
}

.ai-menu-item .fa {
    font-size: 11px;
    color: #6c757d;
}

.ai-menu-divider {
    height: 1px;
    background: #e9ecef;
    margin: 8px 0;
}

/* AI Voice SVG icon */
.ai-menu-voice-icon {
    width: 30px;
    height: 30px;
    vertical-align: middle;
}

/* Hidden state */
.ai-menu-hidden {
    display: none !important;
}

/* Recording animation for danger button */
.btn-danger.ai-menu-voice-browser-stop,
.btn-danger.ai-menu-voice-ai-stop {
    animation: ai-menu-pulse 1s infinite;
}

@keyframes ai-menu-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

@keyframes ai-menu-spin {
    to { transform: rotate(360deg); }
}
