/* 
 * BiblioDrift Keyboard Shortcuts Styling
 * Provides visual feedback for keyboard navigation and focus states
 */

/* Screen reader only text - visually hidden but accessible */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focused effect - keyboard navigation focus state */
.book-spine-3d.focused {
    transform: rotateZ(0deg) rotateY(0deg) translateZ(15px) translateY(-8px);
    z-index: 90;
    outline: 3px solid var(--accent-gold);
    outline-offset: 2px;
    transition: all 0.2s ease;
}

.book-spine-3d.focused .spine-face {
    box-shadow:
        inset 0 0 15px rgba(0, 0, 0, 0.15),
        3px 8px 20px rgba(0, 0, 0, 0.3),
        0 0 12px rgba(212, 175, 55, 0.25);
}

/* Ensure focused state is visible above other elements */
.book-spine-3d.focused:hover {
    z-index: 100;
}

/* Toast notification styling (if not already defined) */
.toast-notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    z-index: 10001;
    animation: slideIn 0.3s ease-out;
    color: var(--text-main);
}

.toast-notification.success {
    background: rgba(76, 175, 80, 0.95);
    color: white;
}

.toast-notification.error {
    background: rgba(244, 67, 54, 0.95);
    color: white;
}

.toast-notification.info {
    background: rgba(33, 150, 243, 0.95);
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    to {
        opacity: 0;
        transform: translateX(400px);
    }
}

/* Smooth scroll behavior for keyboard navigation */
@media (prefers-reduced-motion: no-preference) {
    .book-spine-3d.focused {
        scroll-behavior: smooth;
    }
}
