/* Toolbar Component Styles */

/* Ensure toolbar doesn't interfere with other page elements */
#feedback-toolbar {
    pointer-events: none;
}

#feedback-toolbar > * {
    pointer-events: auto;
}

/* Smooth backdrop blur for toolbar menu */
#feedback-toolbar .absolute.bottom-20 {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
}

/* Red arrow styles with better visibility */
#feedback-toolbar svg path[stroke="#DC2626"] {
    filter: drop-shadow(0 2px 4px rgba(220, 38, 38, 0.3));
}

/* Button hover effects */
#feedback-toolbar button:first-child {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#feedback-toolbar button:first-child:hover {
    transform: rotate(10deg) scale(1.1);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Arrow animation improvements */
@keyframes arrow-bounce {
    0%, 100% {
        transform: translateY(0) rotate(-45deg);
    }
    50% {
        transform: translateY(-15px) rotate(-45deg);
    }
}

#feedback-toolbar .animate-bounce svg {
    animation: arrow-bounce 2s ease-in-out infinite;
}

/* Menu item hover effects */
#feedback-toolbar a:hover .flex-shrink-0,
#feedback-toolbar button:hover .flex-shrink-0 {
    transform: scale(1.05);
    transition: transform 0.2s ease;
}

/* Keyboard shortcut badge styling */
#feedback-toolbar kbd {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', 'Fira Code', monospace;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Responsive adjustments */
@media (max-width: 640px) {
    #feedback-toolbar {
        bottom: 1rem;
        right: 1rem;
    }
    
    #feedback-toolbar .absolute.bottom-20 {
        width: calc(100vw - 2rem);
        max-width: 20rem;
        right: 0;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    #feedback-toolbar .absolute.bottom-20 {
        background: rgba(30, 41, 59, 0.95);
        border-color: rgba(71, 85, 105, 0.5);
    }
    
    #feedback-toolbar h3 {
        color: #f1f5f9;
    }
    
    #feedback-toolbar a:hover,
    #feedback-toolbar button:hover {
        background: rgba(71, 85, 105, 0.3);
    }
    
    #feedback-toolbar .text-slate-700 {
        color: #e2e8f0;
    }
    
    #feedback-toolbar .text-slate-500 {
        color: #94a3b8;
    }
    
    #feedback-toolbar kbd {
        background: rgba(71, 85, 105, 0.5);
        border-color: rgba(100, 116, 139, 0.5);
        color: #e2e8f0;
    }
}

/* Pulse animation for attention */
@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(99, 102, 241, 0);
        transform: scale(1.05);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
        transform: scale(1);
    }
}

#feedback-toolbar button:first-child.pulse {
    animation: pulse-glow 2s infinite;
}

/* Smooth transitions for all interactive elements */
#feedback-toolbar * {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Z-index management to ensure toolbar is always visible but not intrusive */
#feedback-toolbar {
    z-index: 9998;
}

#feedback-toolbar .absolute {
    z-index: 9999;
}

/* Dashboard Toolbar Styles */

/* Toolbar animations */
.dashboard-toolbar {
    animation: slideUp 0.3s ease-out;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* View toggle transitions */
.view-toggle-btn {
    position: relative;
    overflow: hidden;
}

.view-toggle-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(79, 70, 229, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s;
}

.view-toggle-btn:hover::before {
    width: 100%;
    height: 100%;
}

/* Stats counter animation */
.dashboard-toolbar [class*="font-semibold"] {
    display: inline-block;
    transition: transform 0.2s ease;
}

.dashboard-toolbar [class*="font-semibold"]:hover {
    transform: scale(1.05);
}

/* Dropdown animation */
.dropdown-menu {
    transform-origin: bottom right;
}

/* Button hover effects */
.dashboard-toolbar button {
    position: relative;
    transition: all 0.2s ease;
}

.dashboard-toolbar button:active {
    transform: scale(0.95);
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .dashboard-toolbar {
        font-size: 0.875rem;
    }
    
    .dashboard-toolbar .flex.gap-6 {
        gap: 1rem;
    }
}

@media (max-width: 768px) {
    .dashboard-toolbar {
        padding-left: 0 !important;
    }
    
    .dashboard-toolbar > div {
        flex-direction: column;
        height: auto;
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .dashboard-toolbar .flex.items-center.gap-6 {
        width: 100%;
        justify-content: space-around;
    }
    
    .dashboard-content-wrapper {
        padding-bottom: 120px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .dark .dashboard-toolbar {
        background: #1f2937;
        border-top-color: #374151;
    }
    
    .dark .dashboard-toolbar .text-gray-500 {
        color: #9ca3af;
    }
    
    .dark .dashboard-toolbar .text-gray-900 {
        color: #f3f4f6;
    }
    
    .dark .dashboard-toolbar .bg-gray-100 {
        background-color: #374151;
    }
    
    .dark .dashboard-toolbar .bg-white {
        background-color: #4b5563;
        color: #f3f4f6;
    }
    
    .dark .dashboard-toolbar button:hover {
        background-color: #6b7280;
    }
}

/* List view styles */
.list-view .agent-tile {
    display: flex;
    align-items: center;
    padding: 1rem;
    width: 100%;
}

.list-view .agent-tile > div:first-child {
    display: flex;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

.list-view .agent-tile .w-20 {
    width: 3rem;
    height: 3rem;
}

.list-view .agent-tile .space-y-2 {
    display: flex;
    gap: 2rem;
    margin-left: auto;
}

/* Filter sidebar styles */
.filter-sidebar {
    position: fixed;
    right: -320px;
    top: 0;
    bottom: 0;
    width: 320px;
    background: white;
    border-left: 1px solid #e5e7eb;
    z-index: 50;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.filter-sidebar.open {
    right: 0;
}

.filter-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 49;
    display: none;
}

.filter-overlay.show {
    display: block;
}