/* ============================================================================
   LANDING PAGE — "Option B" Unified Search card
   All rules scoped to body.landing-minimal so other pages are unaffected.
   ============================================================================ */

body.landing-minimal {
    --ku-red: #8A2422;
    --ku-red-dark: #6A1C1A;
    --ku-ink: #2b2b2b;
    --ku-ink-soft: #5f5f5f;
    --ku-ink-faint: #8a8a8a;
    --ku-line: #e6e6e6;
    --ku-line-strong: #d7d7d7;
    --ku-input-border: #d2cfcf;
    --ku-tab-border: #dad6d6;
}

/* Centered main column — kept compact so the page fits a 1080p screen
   (including high-DPI laptops at 150% scaling) without scrolling */
body.landing-minimal main {
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
    padding: 32px 30px 16px;
}
body.landing-minimal footer {
    margin-top: 14px;
    padding: 10px 20px;
}

/* Hero heading block */
body.landing-minimal .b-hero {
    text-align: center;
    margin-bottom: 22px;
}
body.landing-minimal .b-hero h1 {
    margin: 0;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -0.4px;
    color: var(--ku-ink);
}
body.landing-minimal .b-hero p {
    max-width: 540px;
    margin: 12px auto 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--ku-ink-soft);
}

/* Search card */
body.landing-minimal .search-section[data-layout="3"] {
    display: block;
    gap: 0;
}
body.landing-minimal .b-card {
    background: #fff;
    border: 1px solid var(--ku-line);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(40, 20, 20, 0.07);
    padding: 24px 26px 28px;
    box-sizing: border-box;
    /* Fixed card height — identical in every mode. The panel flexes to fill
       whatever space the (1- or 2-line) footnote leaves, so the card never
       changes size while Describe/Upload still get generous room. */
    height: 330px;
    display: flex;
    flex-direction: column;
}

/* Mode switch — three equal-width buttons */
body.landing-minimal .b-modetabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    flex: none;
}
body.landing-minimal .b-modetab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    height: 52px;
    padding: 0 12px;
    border: 1.5px solid var(--ku-tab-border);
    border-radius: 11px;
    background: #fff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    color: #4a4a4a;
    cursor: pointer;
    transition: border-color .15s, background .15s, color .15s, box-shadow .15s, transform .08s;
}
body.landing-minimal .b-modetab svg {
    flex-shrink: 0;
}
body.landing-minimal .b-modetab:hover:not(:disabled) {
    border-color: var(--ku-red);
    color: var(--ku-red);
    background: #fdf8f7;
}
body.landing-minimal .b-modetab:active:not(:disabled) {
    transform: translateY(1px);
}
body.landing-minimal .b-modetab:focus-visible {
    outline: 2px solid var(--ku-red);
    outline-offset: 2px;
}
/* Active tab matches the Search button exactly: solid maroon, no glow */
body.landing-minimal .b-modetab.active {
    background: var(--ku-red);
    border-color: var(--ku-red);
    color: #fff;
}
body.landing-minimal .b-modetab.active:hover:not(:disabled) {
    background: var(--ku-red-dark);
    border-color: var(--ku-red-dark);
    color: #fff;
}
body.landing-minimal .b-modetab:disabled {
    opacity: .55;
    cursor: not-allowed;
}

/* Fixed-height panel — identical height in every mode (no layout shift),
   sized snugly to the describe/upload content; content vertically centered */
/* Panel fills the remaining card space; its height therefore varies a little
   between modes (Name has a 2-line footnote, Describe/Upload one line) while
   the overall card height stays fixed. Content is centered within it. */
body.landing-minimal .b-card .mode-content-wrapper.b-panel {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    margin: 10px 0 8px;
}
body.landing-minimal .b-pane {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
body.landing-minimal .b-fade {
    animation: bFade .22s ease;
}
@keyframes bFade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}
body.landing-minimal .b-panel-hint {
    margin: 0 0 10px;
    font-size: 13.5px;
    line-height: 1.5;
    color: var(--ku-ink-soft);
}

/* Name mode — search input + button */
body.landing-minimal .b-card .input-group {
    display: flex;
    gap: 12px;
    align-items: stretch;
}
body.landing-minimal .autocomplete-wrapper.b-name-input {
    position: relative;
    flex: 1;
    display: flex;
    align-items: center;
}
body.landing-minimal .b-name-search-icon {
    position: absolute;
    left: 18px;
    color: var(--ku-ink-faint);
    pointer-events: none;
}
body.landing-minimal .b-card #collaborator-input {
    width: 100%;
    height: 54px;
    padding: 0 16px 0 48px;
    font-size: 16px;
    border: 1px solid var(--ku-input-border);
    border-radius: 10px;
}
body.landing-minimal .b-card #collaborator-input:focus {
    outline: none;
    border-color: #000;
    box-shadow: inset 0 0 0 1px #000;
}
body.landing-minimal .b-card .input-group > button {
    height: 54px;
    padding: 0 30px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
}

/* Describe mode — textarea + counter + action */
/* The describe textarea grows to fill the panel so the describe pane is always
   exactly the fixed panel height, regardless of how the hint line wraps. */
body.landing-minimal .abstract-slot {
    flex: 1;
    display: flex;
    min-height: 0;
}
body.landing-minimal .b-card #abstractInput {
    width: 100%;
    flex: 1;
    /* override base .search-section[data-layout="3"] #abstractInput !important */
    height: auto !important;
    min-height: 0;
    padding: 10px 14px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    border: 1px solid var(--ku-input-border);
    border-radius: 10px;
    resize: none;
}
body.landing-minimal .b-card #abstractInput:focus {
    outline: none;
    border-color: #000;
    box-shadow: inset 0 0 0 1px #000;
}
body.landing-minimal .b-describe-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
}
body.landing-minimal .b-describe-footer #charCount {
    font-size: 13px;
}

/* Upload mode — dropzone + selected-file row */
body.landing-minimal .upload-slot {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
}
body.landing-minimal .b-card .b-drop {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    border: 1.5px dashed #cfc8c8;
    border-radius: 12px;
    background: #fafafa;
    padding: 15px 22px;
    cursor: pointer;
    text-align: left;
    height: auto;
    min-height: 0;
    transition: border-color .15s, background .15s;
}
body.landing-minimal .b-card .b-drop:hover {
    border-color: var(--ku-red);
    background: #fff;
}
body.landing-minimal .b-card .b-drop.dragover {
    border-color: var(--ku-red);
    background: #fdf3f2;
}
body.landing-minimal .b-drop-icon {
    display: flex;
    flex-shrink: 0;
    color: var(--ku-red);
}
body.landing-minimal .b-drop-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--ku-ink);
}
body.landing-minimal .b-drop-title strong {
    color: var(--ku-red);
    font-weight: 700;
}
body.landing-minimal .b-drop-sub {
    margin-top: 3px;
    font-size: 12.5px;
    color: var(--ku-ink-faint);
}
/* The file row carries its own border; neutralize the base .file-list chrome */
body.landing-minimal .b-card .file-list {
    height: auto;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    overflow: visible;
}
body.landing-minimal .b-card .file-list.active {
    display: block;
}
body.landing-minimal .b-file {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1.5px solid var(--ku-line-strong);
    border-radius: 12px;
    background: #fff;
    padding: 13px 16px;
}
body.landing-minimal .b-file-icon {
    width: 40px;
    height: 40px;
    border-radius: 9px;
    background: var(--ku-red);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
body.landing-minimal .b-file-info {
    flex: 1;
    min-width: 0;
}
body.landing-minimal .b-file-name {
    font-size: 14.5px;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
body.landing-minimal .b-file-sub {
    font-size: 12.5px;
    color: var(--ku-ink-faint);
}
body.landing-minimal .b-file-remove {
    border: none;
    background: #f0eeee;
    color: #777;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
body.landing-minimal .b-file-remove:hover {
    background: #e6e2e2;
    color: var(--ku-red);
}
body.landing-minimal .b-upload-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px;
}

/* "Find collaborators" action buttons (override base full-width .upload-button) */
body.landing-minimal .b-card .upload-button {
    display: inline-flex;
    width: auto;
    height: 44px;
    margin-top: 0;
    padding: 0 24px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
}
body.landing-minimal .b-card .upload-button.ku-btn--muted,
body.landing-minimal .b-card .upload-button:disabled {
    background: #ededed;
    color: #9a9a9a;
    box-shadow: none;
    cursor: not-allowed;
}

/* Eligibility footnote(s) inside the card */
body.landing-minimal .b-footnote {
    text-align: center;
    font-size: 12.5px;
    color: var(--ku-ink-faint);
    margin-top: 4px;
}
body.landing-minimal .b-footnote-name {
    margin-top: 2px;
}

/* Hide the "Available: N researchers" helper text (kept in DOM for JS) */
body.landing-minimal .examples {
    display: none;
}
