/* New Features CSS */

/* A [data-theme="dark"] token block used to live here, duplicating (with
   stale, pre-redesign hex values) the color system that styles.css's
   :root already defines as the default theme. Because features.css loads
   after styles.css and both selectors tie in specificity, this file was
   silently winning and overriding every brand-color update made in
   styles.css. Removed — styles.css's :root is now the single source of
   truth for the dark (default) theme; [data-theme="light-blue"] there
   handles the light theme. */


/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    color: white;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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

/* Notification Styles */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 16px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
    z-index: 2000;
    max-width: 400px;
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background: #10b981;
}

.notification-error {
    background: #ef4444;
}

.notification-info {
    background: #3b82f6;
}

.notification-warning {
    background: #f59e0b;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators (Accessibility Enhancement) */
*:focus {
    outline: none; /* Fallback for browsers that don't support focus-visible */
}

*:focus-visible {
    outline: 2px solid var(--eds-color-accent);
    outline-offset: 2px;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--eds-color-accent);
    outline-offset: 2px;
}

/* Skip to content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 2000;
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 6px;
}

/* Mobile optimizations */
@media (max-width: 768px) {

    .back-to-top {
        bottom: 88px;
        right: 16px;
        width: 44px;
        height: 44px;
    }

    
    .notification {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

/* Print styles */
@media print {
    .back-to-top,
    .chat-widget,
    .notification {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}