/* AytUI - Enhanced UI components and interactions */

/* Glassmorphism effect for panels */
.glass-panel {
    background: rgba(26, 26, 46, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
}

/* Terminal glow on activity */
@keyframes terminal-glow {
    0% { box-shadow: inset 0 0 0 1px var(--border-color); }
    50% { box-shadow: inset 0 0 15px 1px var(--accent-glow); }
    100% { box-shadow: inset 0 0 0 1px var(--border-color); }
}

.pane.active.glow-animate {
    animation: terminal-glow 3s ease-in-out infinite;
}

/* Smooth scrollbar styling */
.scrollbar-track {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 6px;
    background: transparent;
}

.scrollbar-thumb {
    position: absolute;
    top: 0;
    right: 0;
    width: 6px;
    background: var(--accent);
    border-radius: 3px;
    transition: opacity 0.2s;
}

/* Terminal output fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Command prompt pulse effect */
@keyframes prompt-pulse {
    0% { text-shadow: 0 0 0 transparent; }
    50% { text-shadow: 0 0 8px var(--accent-light); }
    100% { text-shadow: 0 0 0 transparent; }
}

.animate-prompt {
    animation: prompt-pulse 2s infinite;
}

/* Tab ripple effect */
.tab::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: var(--accent-glow);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.tab:active::after {
    width: 100px;
    height: 100px;
}

/* Context menu styling */
.context-menu {
    position: fixed;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 4px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 200;
    min-width: 150px;
}

.context-menu-item {
    padding: 8px 16px;
    color: var(--text-primary);
    font-size: 0.9rem;
    cursor: pointer;
    white-space: nowrap;
}

.context-menu-item:hover {
    background: var(--accent);
}

/* Tooltip */
.tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.8);
    color: var(--text-primary);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    pointer-events: none;
    z-index: 300;
    opacity: 0;
    transition: opacity 0.2s;
}

.tooltip.visible {
    opacity: 1;
}

/* Progress bar animation enhancement */
.progress-bar.animated {
    background: linear-gradient(
        90deg,
        var(--accent),
        var(--accent-light),
        var(--accent),
        var(--accent-light)
    );
    background-size: 200% 100%;
    animation: progress-shine 1.5s linear infinite;
}

@keyframes progress-shine {
    0% { background-position: 0% 0; }
    100% { background-position: 200% 0; }
}

/* Status indicator dots */
.status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--text-muted);
}

.status-dot.online {
    background: #0dbc79;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* Copy feedback animation */
@keyframes copy-flash {
    0% { background-color: var(--bg-tertiary); }
    30% { background-color: var(--accent); }
    100% { background-color: var(--bg-tertiary); }
}

.copy-flash {
    animation: copy-flash 0.5s ease;
}

/* Terminal cursor blink enhancement */
@keyframes cursor-blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

.xterm-cursor.custom-cursor {
    animation: cursor-blink 1s step-end infinite;
}

/* Split preview indicator */
.pane-container.dragging ~ .pane {
    outline: 2px dashed var(--accent);
}

/* Tab drop indicator */
.tab-drop-indicator {
    height: 3px;
    background: var(--accent);
    margin: -1px 0;
}

/* Notification toast */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    border: 1px solid var(--accent);
    border-radius: 6px;
    padding: 10px 20px;
    color: var(--text-primary);
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    z-index: 400;
}

.toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(-10px);
}

.toast.error {
    border-color: #ff5555;
}

.toast.success {
    border-color: #0dbc79;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--text-muted);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Terminal scroll glow */
.workspace.scrolling {
    box-shadow: inset 0 0 20px var(--accent-glow);
}

/* Active pane pulse indicator */
.pane.active::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px solid var(--accent);
    pointer-events: none;
    opacity: 0.5;
    animation: pane-border-glow 2s ease-in-out infinite;
}

@keyframes pane-border-glow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

@keyframes key-glow {
    0% { box-shadow: 0 0 0 0 var(--accent-glow); }
    70% { box-shadow: 0 0 0 8px transparent; }
    100% { box-shadow: 0 0 0 0 transparent; }
}

/* Keyboard highlight ripple */
.kb-key.highlight {
    animation: key-glow 0.3s ease;
}

/* Toast container */
#toast-container {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 400;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

/* Button ripple fix */
button {
    position: relative;
    overflow: hidden;
}