﻿/* ==== One-time page-transition suppression (Send only) ==== */
/* When html has .no-animate, disable animate.css and any CSS transitions */
html.no-animate .animate__animated {
    animation: none !important;
}

html.no-animate *,
html.no-animate *::before,
html.no-animate *::after {
    transition: none !important;
}
/* Hide any page loader on this one load */
html.no-animate .page-loader {
    display: none !important;
    animation: none !important;
}
/* Stop shimmer animation as well */
html.no-animate .loader-shimmer > span {
    animation: none !important;
}

/* ===== Tooltips ===== */
.tooltip-parent {
    position: relative;
}

.tooltip {
    display: none;
    white-space: nowrap;
    border-radius: .375rem;
    background: #1e293b;
    color: #f1f5f9;
    font-size: .75rem;
    padding: .25rem .5rem;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);
    z-index: 3500;
    pointer-events: none;
}

.tooltip-local {
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%) translateY(8px);
}

.tooltip-fixed-side {
    position: fixed;
    transform: translateY(-50%);
}

.tooltip-parent:hover .tooltip,
.tooltip-parent:focus-within .tooltip {
    display: block;
}

body.hide-tooltips .tooltip {
    display: none !important;
}

.tooltip-parent[aria-expanded="true"] .tooltip {
    display: none !important;
}

/* ===== Sidebar flyouts (scoped!) ===== */
/* ⛔️ היה כאן: .submenu { position: fixed; ... } – זה דרס תתי-תפריטים סטטיים.
   ✅ במקום זאת, נרכז את הסטייל לפליי-אאוטים בלבד. */
aside[data-sidebar="main"] .docker-flyout {
    position: fixed;
    z-index: 4000;
    width: 11rem;
    border-radius: .75rem;
    background: #334155;
    color: #e5e7eb;
    border: 1px solid rgba(71,85,105,.6);
    box-shadow: 0 10px 25px rgba(0,0,0,.35);
    padding: .5rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease, visibility .15s ease, transform .15s ease;
}
/* הצגה ב-hover/focus (אם אין JS) */
[data-menu="docker-group"]:is(:hover, :focus-within) .docker-flyout {
    opacity: 1;
    visibility: visible;
    transform: none;
}

#chat-top-panel {
    z-index: 5000;
}

/* ===== Page Loader (scoped to content area) ===== */
/* Common loader styles */
.page-loader {
    inset: 0;
    z-index: 9999;
    display: none; /* .show => flex */
    align-items: center;
    justify-content: center;
    background: rgba(2,6,23,0.85);
    backdrop-filter: blur(6px);
}
/* Full-screen variant if ever needed */
.page-loader--fixed {
    position: fixed;
}
/* Inset variant: covers only its positioned parent (#content-shell) */
.page-loader--inset {
    position: absolute;
}
/* Visible state */
.page-loader.show {
    display: flex;
}

.loader-shimmer {
    height: 6px;
    width: 14rem;
    overflow: hidden;
    border-radius: 9999px;
    background: rgba(148,163,184,.35);
}

    .loader-shimmer > span {
        display: block;
        height: 100%;
        width: 40%;
        background: currentColor;
        animation: loader-slide 1.2s linear infinite;
    }

@keyframes loader-slide {
    0% {
        transform: translateX(-100%);
    }

    50% {
        transform: translateX(50%);
    }

    100% {
        transform: translateX(300%);
    }
}

/* ===== Restore Tailwind responsive display utilities (shim) ===== */
@media (min-width: 640px) {
    .sm\:block {
        display: block !important;
    }

    .sm\:inline-block {
        display: inline-block !important;
    }

    .sm\:flex {
        display: flex !important;
    }
}

@media (min-width: 768px) {
    .md\:block {
        display: block !important;
    }

    .md\:inline-flex {
        display: inline-flex !important;
    }

    .md\:flex {
        display: flex !important;
    }
}

/* Utilities בטוחים לשימוש מקומי (במקום .hidden) */
.u-hidden {
    display: none !important;
}

.only-md-flex {
    display: none;
}

@media (min-width: 768px) {
    .only-md-flex {
        display: flex !important;
    }
}
