/* portfolio.css — Animations uniquement (non exprimables en DMC props) */

@keyframes alloc-bar-grow {
    from {
        transform: scaleX(0);
    }

    to {
        transform: scaleX(1);
    }
}

@keyframes issuer-bar-scaleY {
    from {
        transform: scaleY(0);
    }

    to {
        transform: scaleY(1);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.alloc-bar {
    transform-origin: left;
    animation: alloc-bar-grow 1.5s ease both;
}

.issuer-bar {
    transform-origin: bottom;
    animation: issuer-bar-scaleY 1.2s ease both;
}

.row-appear {
    animation: fade-in-up 0.3s ease both;
}

/* Scrollbar panel charts */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--mantine-color-default-border);
    border-radius: 4px;
}

/* ── Ambient glow (derrière la glass card) ────────────────── */
.ambient-glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(ellipse 60% 50% at 20% 80%, rgba(255, 102, 0, 0.08) 0%, transparent 70%),
        radial-gradient(ellipse 40% 30% at 80% 20%, rgba(255, 102, 0, 0.05) 0%, transparent 70%);
    z-index: 1;
}

/* ── Active Chip Glow (prevents Mantine :focus from hiding it) ── */
.portfolio-active-chip {
    box-shadow: 0 0 6px rgba(255, 102, 0, 0.4) !important;
}
.portfolio-active-chip:focus,
.portfolio-active-chip:active {
    box-shadow: 0 0 6px rgba(255, 102, 0, 0.4) !important;
}

/* ── Reusable Glassmorphism & Layout Classes ── */
.portfolio-glass-chip {
    color: light-dark(#18181B, rgba(255, 255, 255, 0.82)) !important;
    background: light-dark(rgba(255,255,255,0.7), rgba(255,255,255,0.05)) !important;
    border: 1px solid light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.1)) !important;
    backdrop-filter: blur(10px) !important;
}

.portfolio-client-selector-group {
    border-top: 1px solid light-dark(rgba(0,0,0,0.06), rgba(255,255,255,0.05));
    border-bottom: 1px solid light-dark(rgba(0,0,0,0.06), rgba(255,255,255,0.05));
}

.portfolio-scrollable-chips {
    overflow-x: auto;
    overflow-y: hidden;
    flex: 1;
    padding-right: 16px;
    padding-top: 8px;
    padding-bottom: 8px;
    margin-top: -8px;
    margin-bottom: -8px;
}

/* ── Accordion Hover & Focus Resilience ── */
/* Géré de façon transverse par .glass-action-btn dans global_crm.css */


/* ── Accordion Icon Rotation ── */
.collapse-icon-open {
    transform: rotate(0deg);
}

.collapse-icon-close {
    transform: rotate(180deg);
}
/* ── Tooltip \"Show inactive products\" — fond adaptatif light/dark ── */
.portfolio-inactive-tooltip {
    background-color: light-dark(#ffffff, #1e1e1e) !important;
    color: light-dark(#1a1b1e, #e8e6e2) !important;
    border: 1px solid light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.08)) !important;
    font-size: 10px !important;
    padding: 3px 7px !important;
}

/* ── Accordion nav buttons (Multipricer / Quote Blotter) ── */
/* glass-action-btn gère hover : scale(1.1) + brand-6 + fond glassmorphism    */
/* mp-nav-btn-active surcharge la couleur dimmed forcée par glass-action-btn  */
/* pour garder le bouton actif orange en permanence (hors hover).             */
.mp-nav-btn-active {
    color: var(--mantine-color-brand-5) !important;
}

/* ── PDF Print Rules (Dash Native Report) ── */
@media print {
    @page {
        size: A4 landscape;
        margin: 0;
    }

    body {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        background-color: white !important;
        margin: 0;
        padding: 0;
    }

    /* Hide absolutely everything by default */
    body > * {
        display: none !important;
    }

    /* Except the Mantine AppShell or root wrappers that hold the modal */
    #react-entry-point,
    .mantine-AppShell-root,
    .mantine-AppShell-main {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
        position: static !important;
        width: 100vw !important;
        height: auto !important;
        min-height: 100vh !important;
    }
    
    /* Hide navbars, headers, floating action buttons */
    .mantine-AppShell-navbar,
    .mantine-AppShell-header,
    .global-sidebar,
    .mantine-Modal-close {
        display: none !important;
    }

    /* We need to show the report root specifically */
    #report-print-root {
        display: block !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        z-index: 999999 !important;
        background: white !important;
        overflow: visible !important;
        padding: 0 !important;
    }
    
    .report-page {
        page-break-after: always;
        break-after: page;
        box-shadow: none !important;
        margin: 0 !important;
        width: 297mm !important;
        height: 210mm !important;
    }
}

/* ── Hide MultiSelect Placeholder if items are selected ── */
.mantine-MultiSelect-wrapper:has(.mantine-Pill-root) input::placeholder {
    color: transparent !important;
}

/* ── Portfolio Mobile Card Hover and Active states ── */
.portfolio-mobile-card {
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.1s ease !important;
}

.portfolio-mobile-card:hover {
    border-color: var(--mantine-color-brand-5) !important;
}

.portfolio-mobile-card:active {
    background: light-dark(rgba(255, 102, 0, 0.1), rgba(255, 102, 0, 0.15)) !important;
    border-color: var(--mantine-color-brand-6) !important;
    backdrop-filter: blur(8px) !important;
}
