/* NEXUS_GLOBAL_FLASHCARDS_SEARCH_V1_R3_START */
.nexus-global-flashcards-search {
    position: relative;
    z-index: 45;
    width: min(760px, 100%);
    margin: 14px 0 24px;
    font: inherit;
}


/* Montagem canônica somente em Meus Flashcards: título | busca | ações. */
.nexus-global-flashcards-header-host {
    position: relative;
    display: grid !important;
    grid-template-columns: minmax(285px, 330px) minmax(330px, 1fr) max-content;
    align-items: start;
    column-gap: 18px;
    row-gap: 12px;
    overflow: visible;
}

.nexus-global-flashcards-header-host > .nexus-global-flashcards-title-slot {
    grid-column: 1;
    min-width: 285px;
    align-self: start;
    padding-top: 2px;
}

.nexus-global-flashcards-header-host > .nexus-global-flashcards-title-slot h1,
.nexus-global-flashcards-header-host > .nexus-global-flashcards-title-slot h2 {
    margin: 0 0 10px;
    white-space: nowrap;
}

.nexus-global-flashcards-header-host > .nexus-global-flashcards-title-slot p {
    max-width: 330px;
    margin: 0;
    line-height: 1.35;
}

.nexus-global-flashcards-header-host > .nexus-global-flashcards-search[data-global-flashcards-placement="header"] {
    grid-column: 2;
    width: 100%;
    min-width: 330px;
    max-width: 640px;
    margin: 0;
    align-self: start;
    justify-self: stretch;
}

.nexus-global-flashcards-header-host > .nexus-global-flashcards-actions-slot {
    grid-column: 3;
    min-width: max-content;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    gap: 10px;
    justify-self: end;
    align-self: start;
}

.nexus-global-flashcards-header-host > .nexus-global-flashcards-actions-slot > button {
    flex: 0 0 auto;
}

.nexus-global-flashcards-create.primary-button,
.nexus-global-flashcards-create {
    min-height: 58px !important;
    height: 58px;
    padding: 0 17px !important;
    border: 1px solid rgba(84, 135, 224, .42) !important;
    border-radius: 13px !important;
    background: linear-gradient(135deg, rgba(24, 60, 116, .98), rgba(31, 82, 166, .98)) !important;
    color: #f7faff !important;
    box-shadow: 0 10px 24px rgba(4, 14, 32, .22) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    white-space: nowrap;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.nexus-global-flashcards-create:hover,
.nexus-global-flashcards-create:focus-visible {
    border-color: rgba(101, 153, 244, .72) !important;
    background: linear-gradient(135deg, rgba(31, 76, 145, .99), rgba(42, 99, 194, .99)) !important;
}

.nexus-global-flashcards-create-plus {
    font-size: 1.05em;
    line-height: 1;
}

.nexus-global-flashcards-search-field {
    min-height: 58px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) 34px;
    align-items: center;
    gap: 10px;
    padding: 0 12px 0 15px;
    border: 1px solid rgba(116, 151, 207, .28);
    border-radius: 14px;
    background: rgba(12, 29, 53, .92);
    box-shadow: 0 10px 28px rgba(0, 0, 0, .16);
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.nexus-global-flashcards-search:focus-within .nexus-global-flashcards-search-field {
    border-color: rgba(79, 126, 255, .78);
    background: rgba(14, 34, 62, .98);
    box-shadow: 0 0 0 3px rgba(58, 111, 255, .12), 0 14px 34px rgba(0, 0, 0, .2);
}

.nexus-global-flashcards-search-field > svg {
    width: 20px;
    height: 20px;
    fill: none;
    stroke: #8facd1;
    stroke-width: 1.9;
    stroke-linecap: round;
}

.nexus-global-flashcards-search input[type="search"] {
    width: 100%;
    min-width: 0;
    height: 56px;
    padding: 0;
    border: 0 !important;
    outline: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #f5f8ff;
    font: inherit;
    font-size: 14px;
}

.nexus-global-flashcards-search input[type="search"]::placeholder {
    color: #7893b8;
}

.nexus-global-flashcards-search input[type="search"]::-webkit-search-cancel-button {
    display: none;
}

.nexus-global-flashcards-search [data-global-flashcards-clear] {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #91a9ca;
    font-size: 23px;
    line-height: 1;
    cursor: pointer;
}

.nexus-global-flashcards-search [data-global-flashcards-clear]:hover,
.nexus-global-flashcards-search [data-global-flashcards-clear]:focus-visible {
    background: rgba(105, 139, 194, .13);
    color: #fff;
    outline: none;
}

.nexus-global-flashcards-status {
    margin-top: 7px;
    padding: 0 4px;
    color: #88a3c7;
    font-size: 12px;
}

.nexus-global-flashcards-status[data-kind="error"] { color: #ff8f9d; }
.nexus-global-flashcards-status[data-kind="success"] { color: #73d7b1; }

.nexus-global-flashcards-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    max-height: min(58vh, 520px);
    overflow: auto;
    overscroll-behavior: contain;
    padding: 8px;
    border: 1px solid rgba(116, 151, 207, .26);
    border-radius: 15px;
    background: rgba(7, 20, 38, .985);
    box-shadow: 0 22px 54px rgba(0, 0, 0, .42);
    scrollbar-width: thin;
}

.nexus-global-flashcards-result {
    width: 100%;
    display: grid;
    gap: 5px;
    padding: 12px 13px;
    border: 1px solid transparent;
    border-radius: 11px;
    background: transparent;
    color: #edf4ff;
    text-align: left;
    cursor: pointer;
}

.nexus-global-flashcards-result:hover,
.nexus-global-flashcards-result:focus-visible {
    border-color: rgba(76, 128, 255, .4);
    background: rgba(42, 82, 151, .2);
    outline: none;
}

.nexus-global-flashcards-result:disabled {
    opacity: .58;
    cursor: wait;
}

.nexus-global-flashcards-result-head {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nexus-global-flashcards-result-head strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
}

.nexus-global-flashcards-result-head em {
    flex: 0 0 auto;
    padding: 3px 7px;
    border: 1px solid rgba(72, 125, 255, .32);
    border-radius: 999px;
    background: rgba(44, 92, 202, .18);
    color: #9fc0ff;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    letter-spacing: .02em;
}

.nexus-global-flashcards-result-head em[data-source="shared"] {
    border-color: rgba(121, 91, 255, .35);
    background: rgba(103, 73, 220, .17);
    color: #c0afff;
}

.nexus-global-flashcards-result-meta {
    color: #6f8db6;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.nexus-global-flashcards-result-snippet {
    display: -webkit-box;
    overflow: hidden;
    color: #b3c5de;
    font-size: 12px;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.nexus-global-flashcards-empty,
.nexus-global-flashcards-more {
    padding: 17px 14px;
    color: #91a9ca;
    font-size: 12px;
    text-align: center;
}

.nexus-global-flashcards-empty {
    display: grid;
    gap: 5px;
}

.nexus-global-flashcards-empty strong {
    color: #edf4ff;
    font-size: 13px;
}

.nexus-global-flashcards-search.is-loading .nexus-global-flashcards-search-field {
    cursor: progress;
}

@media (max-width: 1380px) {
    .nexus-global-flashcards-header-host {
        grid-template-columns: minmax(260px, 320px) minmax(300px, 1fr) !important;
    }

    .nexus-global-flashcards-header-host > .nexus-global-flashcards-actions-slot {
        grid-column: 1 / -1;
        justify-self: end;
        justify-content: flex-end;
        flex-wrap: wrap;
    }

    .nexus-global-flashcards-header-host > .nexus-global-flashcards-search[data-global-flashcards-placement="header"] {
        min-width: 0;
        max-width: none;
    }
}

@media (max-width: 860px) {
    .nexus-global-flashcards-header-host {
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px !important;
        align-items: stretch;
    }

    .nexus-global-flashcards-header-host > .nexus-global-flashcards-title-slot,
    .nexus-global-flashcards-header-host > .nexus-global-flashcards-search[data-global-flashcards-placement="header"],
    .nexus-global-flashcards-header-host > .nexus-global-flashcards-actions-slot {
        grid-column: 1;
        width: 100%;
        max-width: none;
        min-width: 0;
        justify-self: stretch;
    }

    .nexus-global-flashcards-header-host > .nexus-global-flashcards-title-slot h1,
    .nexus-global-flashcards-header-host > .nexus-global-flashcards-title-slot h2 {
        white-space: normal;
    }

    .nexus-global-flashcards-header-host > .nexus-global-flashcards-actions-slot {
        justify-content: flex-start;
        flex-wrap: wrap;
    }

    .nexus-global-flashcards-search {
        width: 100%;
        margin: 8px 0 14px;
    }

    .nexus-global-flashcards-results {
        max-height: 56vh;
        border-radius: 13px;
    }

    .nexus-global-flashcards-result {
        padding: 12px 10px;
    }

    .nexus-global-flashcards-result-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }
}

@media (max-width: 560px) {
    .nexus-global-flashcards-header-host > .nexus-global-flashcards-actions-slot {
        display: grid;
        grid-template-columns: 1fr;
    }

    .nexus-global-flashcards-header-host > .nexus-global-flashcards-actions-slot > button,
    .nexus-global-flashcards-create {
        width: 100%;
    }
}

/* NEXUS_GLOBAL_FLASHCARDS_SEARCH_V1_R3_END */
