/* LiquidRound — Chat-first M&A Research Platform */

* { scroll-behavior: smooth; }

/* HTMX loading indicator */
.htmx-indicator { display: none; }
.htmx-request .htmx-indicator { display: flex; }
.htmx-request.htmx-indicator { display: flex; }

/* Chat bubble animations */
#chat-area > div {
    animation: fadeSlideIn 0.25s ease-out;
}

@keyframes fadeSlideIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Hide scrollbars everywhere — scroll with mouse/trackpad still works */
* {
    scrollbar-width: none;           /* Firefox */
    -ms-overflow-style: none;        /* IE/Edge */
}
::-webkit-scrollbar { display: none; } /* Chrome/Safari/Opera */

/* Line clamp */
.line-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.line-clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Bounce animation for thinking dots */
@keyframes bounce {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Multi-step thinking indicator */
.thinking-step {
    opacity: 0;
    animation: stepFadeIn 0.5s ease-out forwards;
}
.thinking-step:nth-child(1) { animation-delay: 0s; }
.thinking-step:nth-child(2) { animation-delay: 1.5s; }
.thinking-step:nth-child(3) { animation-delay: 3s; }

@keyframes stepFadeIn {
    from { opacity: 0; transform: translateX(-4px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Canvas tab styles */
.canvas-tab {
    transition: all 0.15s ease;
    border-bottom: 2px solid transparent;
}
.canvas-tab:hover {
    background-color: #f8fafc;
}

/* Nav section headers — hide default details marker */
.nav-section-header::-webkit-details-marker { display: none; }
details > summary { list-style: none; }
details > summary::marker { display: none; }

/* Welcome section fade-out */
#welcome-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* Details section chevron indicator */
details > summary::before {
    content: "\25B8";
    display: inline-block;
    margin-right: 6px;
    font-size: 10px;
    transition: transform 0.15s ease;
}
details[open] > summary::before {
    transform: rotate(90deg);
}

/* ==========================================================================
   RESPONSIVE / PWA
   ========================================================================== */

/* Mobile: hide left nav by default, show hamburger */
@media (max-width: 768px) {
    /* Nav: slide off-screen on mobile by default */
    #nav-panel:not(.mobile-open) {
        transform: translateX(-100%) !important;
    }
    /* Show hamburger on mobile */
    #nav-restore {
        display: flex !important;
    }
    /* Main content: no left margin on mobile */
    #main-content {
        margin-left: 0 !important;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    /* Right pane (canvas): full width overlay on mobile */
    #right-pane {
        width: 100vw !important;
    }
    /* Context cards: single column */
    .grid-cols-3 { grid-template-columns: 1fr !important; }
    .grid-cols-4 { grid-template-columns: repeat(2, 1fr) !important; }
    /* Pipeline columns: stack vertically */
    #pipeline-board {
        flex-direction: column !important;
    }
    #pipeline-board > div {
        width: 100% !important;
    }
}

/* Tablet: narrower nav, adjust canvas */
@media (min-width: 769px) and (max-width: 1024px) {
    #nav-panel { width: 200px !important; }
    #main-content { margin-left: 200px !important; }
    #right-pane { width: 360px !important; }
    .grid-cols-3 { grid-template-columns: repeat(2, 1fr) !important; }
}

/* Touch-friendly: larger tap targets on mobile */
@media (max-width: 768px) {
    button, a, input[type="submit"] {
        min-height: 44px;
    }
    #nav-panel button, #nav-panel a {
        padding-top: 0.5rem;
        padding-bottom: 0.5rem;
    }
}

/* Standalone PWA mode: remove address bar padding */
@media (display-mode: standalone) {
    body { padding-top: env(safe-area-inset-top); }
}
