/* ==========================================================================
   Landing page (/) — page-specific styling
   --------------------------------------------------------------------------
   These rules lived in an inline <style> block in index.html. Inline CSS is
   re-sent with every page view and cannot be cached, so ~24KB of it rode along
   on each visit to the site's most-requested page; as a file it is cached for
   a year by nginx (the ?v= bucket in scripts/deploy/nginx/kunnect.conf) and
   busted by static_url()'s mtime stamp like every other asset.

   LOAD ORDER MATTERS. Link this LAST, after shared-ui.css, exactly where the
   <style> block used to sit. Rules here are written to override the four
   stylesheets above them on ties — @keyframes spin is also defined in
   style.css, and this file's definition is the one meant to win. Moving the
   link any earlier silently flips those.

   Scope: only index.html loads this. Anything shared with another page
   belongs in shared-ui.css instead (see the note at the top of that file).
   ========================================================================== */

/* The `body.from-viz` header animation that used to sit here now lives in
   shared-ui.css: /sund-collab is a second way back from the research map and
   needs the same gesture. */

/* Two-column layout for search boxes */
.search-section {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 10px;
}

@media (max-width: 900px) {
    .search-section {
        grid-template-columns: 1fr;
    }
}

.search-box {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    min-width: 0;
}

@media (min-width: 901px) {
    .search-box {
        height: 292px;
    }
}

/* Fixed height container for mode content */
.mode-content-wrapper {
    min-height: 144px;
}

.search-box h2 {
    margin-top: 0;
    margin-bottom: 0;
}

.search-box .description {
    margin-bottom: 15px;
}

/* Spacing between sections within a box */

/* KU Filter Checkbox Styles */

/* Collaborators header row + filter control: see static/shared-ui.css */

/* Mode toggle buttons */

/* Paper upload specific styles */
.upload-slot {
    height: 120px;
    position: relative;
    margin-bottom: 10px;
}

.paper-upload-area {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 10px;
    text-align: center;
    background: #fafafa;
    transition: all 0.3s ease;
    cursor: pointer;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.paper-upload-area:hover {
    border-color: #901A1E;
    background: #fff;
}

.paper-upload-area.dragover {
    border-color: #901A1E;
    background: #fff8f8;
}

.file-input {
    display: none;
}

.paper-upload-area p {
    margin: 3px 0;
    font-size: 0.85em;
}

.file-list {
    height: 100%;
    text-align: left;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 10px;
    box-sizing: border-box;
    display: none;
    /* Hidden by default */
    flex-direction: column;
}

.file-list.active {
    display: flex;
}

/* .upload-button lives in static/shared-ui.css — it is the primary
   action button on more than one page. */

/* The progress card shown while a Describe/Upload search runs is a
   shared component — see .progress-card in static/shared-ui.css. */

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(144, 26, 30, 0.3);
    border-radius: 50%;
    border-top-color: #901A1E;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* The maintenance notice for the disabled Describe/Upload modes is
   styled in static/style.css (.maintenance-notice), and the result card
   (.result-item), the hero banner's current-collaborators toggle and the
   phone header sizing all live in static/shared-ui.css / style.css, because
   /sund-collab renders the same markup. Only rules unique to the landing
   page belong here. */

/* Stacked card layout (the only layout since the layout selector went) */
.search-section[data-layout="3"] {
    grid-template-columns: 1fr;
}

/* Harmonize abstract textarea with name search input */
#abstractInput:focus {
    outline: none;
    border-color: #000000;
}
