:root {
    --shadow-strong: 0 10px 30px rgba(0, 0, 0, 0.18);
    --transition-fast: 160ms ease;
    /* Font size variables for accessibility */
    --base-font-size: 16px;
    --font-scale: 1;
}

.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;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #4299e1;
    outline-offset: 2px;
}

#app {
    backdrop-filter: blur(6px);
}

#entries-list li {
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

#entries-list li:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-strong);
}

#privacy-modal .text-sm {
    line-height: 1.55;
}

/* Ensure CSS spin animation exists (tailwind may be stripped in some environments) */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

/* Font Awesome offline fallback: show inline SVGs when FA kit isn't available */
img.icon,
.icon svg,
.icon {
    display: none;
}

.no-fa .icon {
    display: inline-flex;
    align-items: center;
}

.no-fa .fa-solid {
    display: none;
}

/* Icon-only buttons with hover expand animation */
.btn-icon-expand {
    position: relative;
    display: inline-flex;
    align-items: center;
    transition: none;
}

.btn-icon-expand .btn-text {
    display: inline-block;
    max-width: none;
    opacity: 1;
    overflow: visible;
    white-space: nowrap;
    transition: none;
    margin-left: 0.375rem;
    will-change: auto;
}

.btn-icon-expand:hover .btn-text {
    max-width: none;
    opacity: 1;
    margin-left: 0.375rem;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Settings Modal Tabs */
.settings-tab {
    transition: border-color var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
}

.settings-tab[aria-selected="true"] {
    border-color: #4299e1;
    color: #4299e1;
}

.settings-tab[aria-selected="true"]:dark {
    color: #63b3ed;
}

.settings-tab-content {
    display: block;
}

.settings-tab-content.hidden {
    display: none;
}

/* Scrollable tabs container - hide scrollbar but keep scrolling */
.settings-tabs-container {
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: smooth;
    padding: 0.5rem 1rem;
}

.settings-tabs-container .flex {
    gap: 0.75rem;
    align-items: center;
}

.settings-tabs-container::-webkit-scrollbar {
    display: none;
}

/* Search highlighting */
.search-highlight {
    background-color: #fef08a;
    color: #854d0e;
    border-radius: 0.25rem;
    font-weight: 600;
}

.dark .search-highlight {
    background-color: #a16207;
    color: #fef3c7;
}