/* Agent Properties Modal Styles */

.agent-properties-modal-content {
    max-width: 1200px;
    max-height: 90vh;
    overflow-y: auto;
}

.agent-properties-body {
    padding: 20px;
}

.properties-section {
    margin-bottom: 30px;
    padding: 20px;
    background: var(--surface-color, #f8f9fa);
    border-radius: 8px;
}

.properties-section h3 {
    margin: 0 0 10px 0;
    color: var(--primary-blue, #0066cc);
    font-size: 1.3em;
}

.section-description {
    margin: 0 0 20px 0;
    color: #666;
    font-size: 0.9em;
}

/* Agent Info Grid */
.agent-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-item label {
    font-weight: 600;
    color: #666;
    font-size: 0.85em;
    margin-bottom: 5px;
}

.info-item span {
    font-size: 1em;
    color: #333;
}

.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-online { background: #d4edda; color: #155724; }
.status-offline { background: #f8d7da; color: #721c24; }
.status-active { background: #d4edda; color: #155724; }

/* Provider Grid */
.provider-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.provider-category {
    background: white;
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.provider-category h4 {
    margin: 0 0 12px 0;
    font-size: 1em;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}

.warning-badge {
    display: inline-block;
    background: #fff3cd;
    color: #856404;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.75em;
    font-weight: 600;
}

.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.profile-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid #ddd;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
}

.profile-btn:hover {
    background: #f8f9fa;
    border-color: #0066cc;
}

.provider-toggle {
    display: flex;
    align-items: center;
    padding: 8px 0;
    cursor: pointer;
    user-select: none;
}

.provider-toggle input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.provider-toggle span {
    font-size: 0.95em;
    color: #333;
}

.provider-toggle:hover {
    background: #f8f9fa;
    padding-left: 8px;
    margin-left: -8px;
    border-radius: 4px;
}

/* Event Filtering */
.filtering-controls {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.filter-lists {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.filter-list-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-list-group label {
    font-weight: 600;
    color: #333;
    font-size: 0.95em;
}

.filter-list-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: 'Consolas', 'Monaco', monospace;
    font-size: 0.9em;
    resize: vertical;
}

.filter-list-group small {
    color: #666;
    font-size: 0.85em;
}

/* Actions */
.properties-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.actions-left {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.properties-actions .btn {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-icon {
    font-size: 1.2em;
}

/* Warning button styling */
.btn-warning {
    background: rgba(251, 146, 60, 0.1);
    color: #F97316;
    border: 1px solid rgba(251, 146, 60, 0.3);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-warning:hover {
    background: rgba(251, 146, 60, 0.2);
    border-color: rgba(251, 146, 60, 0.5);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(251, 146, 60, 0.2);
}

.btn-warning:active {
    background: rgba(251, 146, 60, 0.3);
    transform: translateY(0);
}

/* Danger Zone */
.danger-zone {
    border: 2px solid #dc3545;
    background: #fff5f5;
}

.danger-zone h3 {
    color: #dc3545;
}

.btn-danger {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-danger:hover {
    background: #c82333;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 8px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-blue, #0066cc);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    margin-top: 20px;
    font-weight: 600;
    color: #333;
}

/* Responsive */
@media (max-width: 768px) {
    .agent-properties-modal-content {
        max-width: 95vw;
    }
    
    .provider-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-lists {
        grid-template-columns: 1fr;
    }
    
    .properties-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .actions-left {
        flex-direction: column;
        width: 100%;
    }
    
    .properties-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
/* Improved Agent Actions Button Styling */

/* Make actions cell wider and buttons horizontal */
.agent-row .agent-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: flex-end;
    min-width: 220px; /* Ensure enough space for both buttons */
}

/* Button base styling */
.agent-actions .btn-sm {
    padding: 6px 14px;
    font-size: 0.875rem;
    font-weight: 500;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

/* Live Session button - Primary action */
.agent-actions .btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.2);
}

.agent-actions .btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
    transform: translateY(-1px);
}

.agent-actions .btn-primary:disabled {
    background: #94a3b8;
    cursor: not-allowed;
    box-shadow: none;
}

/* Properties button - Secondary action */
.agent-actions .btn-secondary {
    background: white;
    color: #475569;
    border-color: #cbd5e1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.agent-actions .btn-secondary:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

/* Icons inside buttons */
.agent-actions .btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

/* Alternative: If you want Properties to be more prominent */
.agent-actions .btn-secondary.prominent {
    background: linear-gradient(135deg, #64748b 0%, #475569 100%);
    color: white;
    border-color: transparent;
    box-shadow: 0 2px 4px rgba(71, 85, 105, 0.2);
}

.agent-actions .btn-secondary.prominent:hover {
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    box-shadow: 0 4px 8px rgba(71, 85, 105, 0.3);
    transform: translateY(-1px);
}

/* Responsive: Stack vertically on small screens */
@media (max-width: 768px) {
    .agent-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }
    
    .agent-actions .btn-sm {
        width: 100%;
        justify-content: center;
    }
}

/* Optional: Badge style for Live Session (more compact) */
.agent-actions .btn-primary.compact {
    padding: 4px 10px;
    font-size: 0.8125rem;
}

/* Optional: Icon-only buttons (even more compact) */
.agent-actions .btn-icon-only {
    padding: 6px;
    min-width: 32px;
    justify-content: center;
}

.agent-actions .btn-icon-only span {
    display: none; /* Hide text, show only icon */
}

.agent-actions .btn-icon-only svg {
    margin: 0;
}

/* Hover tooltip for icon-only buttons */
.agent-actions .btn-icon-only[title] {
    position: relative;
}

.agent-actions .btn-icon-only[title]:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background: #1e293b;
    color: white;
    font-size: 0.75rem;
    white-space: nowrap;
    border-radius: 4px;
    margin-bottom: 4px;
    pointer-events: none;
    z-index: 1000;
}