/* Global CSS for HRConnect-Tubigon */

/* Base resets and utilities */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #374151;
}

/* Light mode backgrounds - ensure they stay light only when NOT dark */
html:not(.dark) body {
    background-color: #f9fafb !important;
}

html:not(.dark) .bg-gray-50,
html:not(.dark) main {
    background-color: #f9fafb !important;
}

html:not(.dark) .bg-white {
    background-color: #ffffff !important;
}

html:not(.dark) .bg-gray-100 {
    background-color: #f3f4f6 !important;
}

/* Light mode - Change borders to light gray */
html:not(.dark) .bg-white,
html:not(.dark) [class*="card"],
html:not(.dark) .rounded-lg {
    border-color: #e5e7eb !important;
}

/* Light mode buttons with light gray borders - EXCEPT sidebar buttons */
html:not(.dark) main button:not(.bg-blue-600):not(.bg-green-600):not(.bg-red-600):not(.bg-yellow-600):not([class*="bg-blue"]):not([class*="bg-green"]):not([class*="bg-red"]) {
    border-color: #e5e7eb !important;
}

/* Preserve blue borders for active states */
html:not(.dark) .border-r-blue-700 {
    border-color: #1d4ed8 !important;
}

html:not(.dark) .border-blue-500 {
    border-color: #3b82f6 !important;
}

html:not(.dark) .border-blue-600 {
    border-color: #2563eb !important;
}

html:not(.dark) .border-blue-700 {
    border-color: #1d4ed8 !important;
}

html:not(.dark) .border-gray-200:not(aside *):not(nav *),
html:not(.dark) .border-gray-300:not(aside *):not(nav *) {
    border-color: #e5e7eb !important;
}

html:not(.dark) .border-b:not(aside *):not(nav *) {
    border-color: #e5e7eb !important;
}

/* Keep original borders for sidebar toggle buttons only */
html:not(.dark) #sidebar-toggle,
html:not(.dark) #manager-sidebar-toggle,
html:not(.dark) #employee-sidebar-toggle,
html:not(.dark) #auditor-sidebar-toggle {
    border-color: #d1d5db !important;
}

/* Light mode text colors - ensure they are dark */
.text-gray-900 {
    color: #111827 !important;
}

.text-gray-800 {
    color: #1f2937 !important;
}

.text-gray-700 {
    color: #374151 !important;
}

.text-gray-600 {
    color: #4b5563 !important;
}

.text-gray-500 {
    color: #6b7280 !important;
}

/* Dark mode styles - HIGHEST PRIORITY */
html.dark,
html.dark body {
    color: #e5e7eb !important;
    background-color: #111827 !important;
}

html.dark main {
    background-color: #111827 !important;
}

html.dark .container {
    background-color: transparent !important;
}

/* Dark mode backgrounds - HIGHEST PRIORITY */
html.dark .bg-white {
    background-color: #1f2937 !important;
}

html.dark .bg-gray-50 {
    background-color: #111827 !important;
}

html.dark .bg-gray-100 {
    background-color: #1f2937 !important;
}

html.dark .bg-gray-200 {
    background-color: #374151 !important;
}

html.dark .bg-gray-300 {
    background-color: #4b5563 !important;
}

/* Dark mode text colors - HIGHEST PRIORITY */
html.dark .text-gray-900 {
    color: #f9fafb !important;
}

html.dark .text-gray-800 {
    color: #e5e7eb !important;
}

html.dark .text-gray-700 {
    color: #d1d5db !important;
}

html.dark .text-gray-600 {
    color: #9ca3af !important;
}

html.dark .text-gray-500 {
    color: #6b7280 !important;
}

html.dark .text-gray-400 {
    color: #9ca3af !important;
}

/* Dark mode borders - HIGHEST PRIORITY */
html.dark .border-gray-200 {
    border-color: #374151 !important;
}

html.dark .border-gray-300 {
    border-color: #4b5563 !important;
}

html.dark .border-b {
    border-color: #374151 !important;
}

/* Dark mode hover states - HIGHEST PRIORITY */
html.dark .hover\:bg-gray-50:hover {
    background-color: #374151 !important;
}

html.dark .hover\:bg-gray-100:hover {
    background-color: #4b5563 !important;
}

html.dark .hover\:bg-white:hover {
    background-color: #374151 !important;
}

html.dark .bg-blue-50 {
    background-color: #1e3a5f !important;
}

html.dark .bg-blue-100 {
    background-color: #1e40af !important;
}

html.dark .border-blue-200 {
    border-color: #3b82f6 !important;
}

html.dark .bg-green-100 {
    background-color: #065f46 !important;
}

html.dark .bg-red-100 {
    background-color: #7f1d1d !important;
}

html.dark .bg-yellow-100 {
    background-color: #78350f !important;
}

/* Dark mode card styles - HIGHEST PRIORITY */
html.dark [class*="bg-white"] {
    background-color: #1f2937 !important;
}

/* Dark mode heading text - HIGHEST PRIORITY */
html.dark h1,
html.dark h2,
html.dark h3,
html.dark h4,
html.dark h5,
html.dark h6 {
    color: #f9fafb !important;
}

/* Dark mode paragraph and span text - HIGHEST PRIORITY */
html.dark p {
    color: #d1d5db !important;
}

html.dark span {
    color: inherit;
}

/* Dark mode links - HIGHEST PRIORITY */
html.dark a:not(.btn):not([class*="bg-"]) {
    color: #60a5fa !important;
}

html.dark a:not(.btn):not([class*="bg-"]):hover {
    color: #93c5fd !important;
}

/* Dark mode input styles */
html.dark input:not([type="file"]),
html.dark select,
html.dark textarea {
    background-color: #374151 !important;
    border-color: #4b5563 !important;
    color: #f9fafb !important;
}

html.dark input::placeholder,
html.dark textarea::placeholder {
    color: #6b7280 !important;
}

html.dark input:not([type="file"]):focus,
html.dark select:focus,
html.dark textarea:focus {
    border-color: #3b82f6 !important;
    background-color: #4b5563 !important;
}

/* Ensure light mode inputs stay light */
input:not([type="file"]),
select,
textarea {
    background-color: white;
    color: #111827;
}

input:not([type="file"]):focus,
select:focus,
textarea:focus {
    background-color: white;
}

/* Dark mode button styles */
html.dark button {
    color: inherit;
}

html.dark .hover\:bg-white:hover {
    background-color: #374151 !important;
}

/* Dark mode table styles */
html.dark table {
    border-color: #374151;
}

html.dark thead {
    background-color: #1f2937 !important;
}

html.dark tbody tr {
    border-color: #374151 !important;
}

html.dark tbody tr:hover {
    background-color: #374151 !important;
}

/* Dark mode modal styles */
html.dark .modal,
html.dark [id*="modal"] .bg-white {
    background-color: #1f2937 !important;
}

html.dark .shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
}

/* Dark mode dropdown styles */
html.dark [id*="dropdown"] {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
}

/* Dark mode toast/alert styles */
html.dark .bg-green-50 {
    background-color: #064e3b !important;
}

html.dark .bg-red-50 {
    background-color: #7f1d1d !important;
}

html.dark .text-green-800 {
    color: #6ee7b7 !important;
}

html.dark .text-red-800 {
    color: #fca5a5 !important;
}

/* Dark mode sidebar styles */
html.dark nav a {
    color: #d1d5db;
}

html.dark nav a:hover {
    background-color: #374151 !important;
}

html.dark nav a.active,
html.dark nav a[class*="bg-blue"] {
    background-color: #1e40af !important;
    color: #ffffff !important;
}

/* Dark mode file upload styles */
html.dark input[type="file"] {
    color: #d1d5db !important;
}

html.dark input[type="file"]::file-selector-button {
    background-color: #1e3a5f !important;
    color: #93c5fd !important;
    border: none;
}

html.dark input[type="file"]:hover::file-selector-button {
    background-color: #1e40af !important;
}

/* Focus styles for accessibility */
button:focus,
input:focus,
select:focus,
textarea:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

html.dark ::-webkit-scrollbar-track {
    background: #1f2937;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

html.dark ::-webkit-scrollbar-thumb {
    background: #4b5563;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

html.dark ::-webkit-scrollbar-thumb:hover {
    background: #6b7280;
}

/* Sidebar specific scrollbar - only visible on hover */
.sidebar-scrollbar {
    scrollbar-width: thin;
    /* Firefox */
    scrollbar-color: transparent transparent;
    /* Firefox - hidden by default */
    -ms-overflow-style: -ms-autohiding-scrollbar;
    /* Internet Explorer 10+ */
}

/* Webkit scrollbar styling - hidden by default */
.sidebar-scrollbar::-webkit-scrollbar {
    width: 3px;
    /* Reduced from 4px for mobile */
}

.sidebar-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-scrollbar::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 1.5px;
    /* Reduced border radius */
    transition: all 0.2s ease;
}

/* Show scrollbar on hover - Webkit */
.sidebar-scrollbar:hover::-webkit-scrollbar-thumb {
    background: #cbd5e1;
}

.sidebar-scrollbar:hover::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Firefox hover scrollbar */
.sidebar-scrollbar:hover {
    scrollbar-color: #cbd5e1 transparent;
}

html.dark .sidebar-scrollbar:hover {
    scrollbar-color: #4b5563 transparent;
}

/* Mobile-specific scrollbar adjustments */
@media (max-width: 768px) {
    .sidebar-scrollbar::-webkit-scrollbar {
        width: 2px;
        /* Even thinner on mobile */
    }

    .sidebar-scrollbar::-webkit-scrollbar-thumb {
        border-radius: 1px;
        /* Smaller border radius on mobile */
    }

    /* Always show scrollbar on mobile for better usability */
    .sidebar-scrollbar::-webkit-scrollbar-thumb {
        background: #e2e8f0;
        /* Light gray, always visible on mobile */
    }

    .sidebar-scrollbar:hover::-webkit-scrollbar-thumb {
        background: #cbd5e1;
    }
}

/* Dark mode scrollbar styles handled above */

/* Notification dropdown scrollbar */
.notification-list {
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 #f7fafc;
}

.notification-list::-webkit-scrollbar {
    width: 8px;
}

.notification-list::-webkit-scrollbar-track {
    background: #f7fafc;
    border-radius: 4px;
}

.notification-list::-webkit-scrollbar-thumb {
    background: #cbd5e0;
    border-radius: 4px;
}

.notification-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Loading spinner animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Logo-centered loading indicator */
.logo-loading-container {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 70px;
    height: 70px;
}

.logo-loading-spinner {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: conic-gradient(from 0deg,
            transparent 0deg,
            transparent 250deg,
            #2563eb 250deg,
            #2563eb 360deg);
    mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), black calc(100% - 3.5px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3.5px), black calc(100% - 3.5px));
    animation: spin 1s linear infinite;
    top: 0;
    left: 0;
}

html.dark .logo-loading-spinner {
    background: conic-gradient(from 0deg,
            transparent 0deg,
            transparent 250deg,
            #3b82f6 250deg,
            #3b82f6 360deg);
}

.logo-loading-logo {
    position: relative;
    z-index: 1;
    width: 65px;
    height: 65px;
    object-fit: contain;
    padding: 0;
    margin: 0;
    background: transparent;
    box-shadow: none;
    display: block;
}

html.dark .logo-loading-logo {
    background: transparent;
    box-shadow: none;
}

/* Sidebar loading indicators */
.sidebar-loading {
    position: relative;
    opacity: 0.85;
}

.sidebar-link-spinner {
    display: inline-block;
    color: currentColor;
}

/* Ensure spinner appears properly in sidebar links */
aside a.sidebar-loading .sidebar-link-spinner,
nav a.sidebar-loading .sidebar-link-spinner {
    margin-left: 0.5rem;
    opacity: 0.8;
}

/* 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;
}

/* Slide in animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.slide-in-right {
    animation: slideInRight 0.3s ease-out;
}

/* Hover effects */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Status indicator dots */
.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.status-dot.online {
    background-color: #10b981;
}

.status-dot.offline {
    background-color: #6b7280;
}

.status-dot.busy {
    background-color: #f59e0b;
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .print-break {
        page-break-before: always;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .border-gray-200 {
        border-color: #000 !important;
    }

    .text-gray-500 {
        color: #000 !important;
    }

    .bg-gray-50 {
        background-color: #fff !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode is controlled by admin settings, not system preference */

/* Mobile-first responsive utilities */
.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
    }
}

@media (min-width: 1280px) {
    .container {
        max-width: 1280px;
    }
}

/* Form validation styles */
.form-error {
    border-color: #dc2626 !important;
}

.form-error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1) !important;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Success message styles */
.success-message {
    color: #059669;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f4f6;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Tooltip styles */
.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 50;
}

html.dark .tooltip::after {
    background: #374151;
    color: #f9fafb;
}

.tooltip:hover::after {
    opacity: 1;
}

/* Empty state styles */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state-icon {
    width: 4rem;
    height: 4rem;
    margin: 0 auto 1rem;
    color: #9ca3af;
}

.empty-state-title {
    font-size: 1.125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    color: #6b7280;
    margin-bottom: 1.5rem;
}

/* Skeleton loading styles */
.skeleton {
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    width: 75%;
}

.skeleton-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
}

.skeleton-button {
    height: 2.5rem;
    border-radius: 0.5rem;
    width: 6rem;
}

/* Notification dropdown styles */
#notif-dropdown {
    transition: opacity 0.2s ease-in-out, visibility 0.2s ease-in-out;
}

#notif-dropdown:not(.hidden) {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#notif-dropdown.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Notification dropdown responsive styles for mobile */
@media (max-width: 640px) {

    /* Make dropdown responsive on mobile - position relative to viewport */
    [x-data*="notificationDropdownData"] {
        position: relative;
    }

    /* Fix dropdown positioning on mobile to prevent overflow */
    [x-data*="notificationDropdownData"]>div[x-show="open"] {
        position: fixed !important;
        top: 4.5rem !important;
        right: 1rem !important;
        left: 1rem !important;
        width: auto !important;
        max-width: calc(100vw - 2rem) !important;
        max-height: calc(100vh - 7rem) !important;
        margin-top: 0 !important;
    }

    /* Ensure notification items don't overflow */
    [x-data*="notificationDropdownData"] .truncate {
        word-break: break-word;
        overflow-wrap: break-word;
    }

    /* Better line clamping on mobile */
    [x-data*="notificationDropdownData"] .line-clamp-2 {
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }

    /* Touch-friendly interactive elements */
    [x-data*="notificationDropdownData"] button,
    [x-data*="notificationDropdownData"] a {
        -webkit-tap-highlight-color: rgba(59, 130, 246, 0.1);
    }

    /* Improve scrolling on mobile */
    [x-data*="notificationDropdownData"] .overflow-y-auto {
        -webkit-overflow-scrolling: touch;
    }
}

/* Additional mobile adjustments for very small screens */
@media (max-width: 375px) {
    [x-data*="notificationDropdownData"]>div[x-show="open"] {
        right: 0.5rem !important;
        left: 0.5rem !important;
        max-width: calc(100vw - 1rem) !important;
    }
}

/* =====================================================
   OFFLINE / ONLINE DETECTION BANNER
   ===================================================== */

/* Slide-down animation */
@keyframes slideDownFadeIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideUpFadeOut {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-100%);
        opacity: 0;
    }
}

@keyframes pulseWifi {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

@keyframes rotateSpinner {
    to { transform: rotate(360deg); }
}

/* The fixed banner container */
#offline-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.18);
    transition: background-color 0.4s ease, color 0.4s ease;
    min-height: 48px;
}

#offline-banner.show {
    display: flex;
    animation: slideDownFadeIn 0.35s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

#offline-banner.hide {
    animation: slideUpFadeOut 0.3s ease-in forwards;
}

/* Offline state - warm red-orange */
#offline-banner.offline-state {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: #fff;
}

/* Reconnecting state - amber */
#offline-banner.reconnecting-state {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    color: #fff;
}

/* Online state - green success */
#offline-banner.online-state {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #fff;
}

/* Icon wrappers */
#offline-banner .offline-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

#offline-banner.offline-state .offline-icon-wrap svg {
    animation: pulseWifi 1.4s ease-in-out infinite;
}

#offline-banner .reconnecting-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: rotateSpinner 0.75s linear infinite;
    flex-shrink: 0;
}

#offline-banner .banner-text {
    display: flex;
    flex-direction: column;
    gap: 1px;
    line-height: 1.3;
}

#offline-banner .banner-text .banner-title {
    font-weight: 600;
    font-size: 14px;
}

#offline-banner .banner-text .banner-sub {
    font-size: 11.5px;
    font-weight: 400;
    opacity: 0.88;
}

/* Dismiss button (offline state only) */
#offline-banner .banner-dismiss {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: #fff;
    border-radius: 6px;
    padding: 3px 10px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}

#offline-banner .banner-dismiss:hover {
    background: rgba(255,255,255,0.3);
}

/* Blocked-navigation toast (shown when user clicks a link while offline) */
#offline-click-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 999998;
    background: #1f2937 !important;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 500;
    font-family: 'Inter', -apple-system, sans-serif;
    box-shadow: 0 8px 32px rgba(0,0,0,0.28);
    display: flex;
    align-items: center;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    white-space: nowrap;
    max-width: calc(100vw - 48px);
}

#offline-click-toast span {
    color: #ffffff !important;
}

#offline-click-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: auto;
}

#offline-click-toast svg {
    flex-shrink: 0;
    stroke: #ffffff !important;
    color: #ffffff !important;
}

@media (max-width: 480px) {
    #offline-banner {
        padding: 8px 14px;
        font-size: 13px;
        gap: 8px;
    }
    #offline-banner .banner-text .banner-title { font-size: 13px; }
    #offline-banner .banner-text .banner-sub { font-size: 11px; }

    /* Keep toast on ONE LINE on mobile — smaller text + tighter padding */
    #offline-click-toast {
        font-size: 11.5px;
        padding: 9px 14px;
        gap: 6px;
        white-space: nowrap;           /* never wrap */
        max-width: calc(100vw - 16px); /* almost full-width on tiny screens */
        bottom: 16px;
    }
    #offline-click-toast svg {
        width: 13px;
        height: 13px;
        flex-shrink: 0;
    }
}

/* Extra-small phones (< 360px) — shrink even more to stay one line */
@media (max-width: 360px) {
    #offline-click-toast {
        font-size: 10.5px;
        padding: 8px 12px;
        gap: 5px;
        max-width: calc(100vw - 12px);
    }
    #offline-click-toast svg {
        width: 12px;
        height: 12px;
    }
}