/* ===== Command palette (Ctrl+K / Cmd+K) over the whole app ===== */

.nav-palette-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 200;
    background: rgba(16, 22, 31, 0.55);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding-top: 12vh;
}

.nav-palette {
    width: 620px;
    max-width: calc(100vw - 32px);
    background: #232f40;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    max-height: 62vh;
}

/* ---- Field ---- */

.nav-palette-field {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    height: 54px;
    flex: 0 0 auto;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-palette-search-icon {
    color: #8f939e !important;
    font-size: 20px !important;
    width: 20px;
    height: 20px;
    min-width: 20px;
    margin: 0;
}

.nav-palette-field input {
    flex: 1 1 auto;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: #eef2f6;
    font-size: 15px;
    line-height: 20px;
    padding: 0;
}

/* digital-invoicing.css is a page stylesheet that index.html loads app-wide, and its
   unscoped `input:hover` / `input:focus` rules paint a sky-blue border and a 3px glow on
   every input in the product. The palette panel itself is the focus affordance here, so
   the field must not draw its own. */
.nav-palette-field input:hover,
.nav-palette-field input:focus {
    border-color: transparent;
    box-shadow: none;
    outline: none;
}

.nav-palette-field input::-webkit-input-placeholder { color: #6b7a8d; }
.nav-palette-field input::-moz-placeholder { color: #6b7a8d; opacity: 1; }
.nav-palette-field input:-ms-input-placeholder { color: #6b7a8d; }

.nav-palette-esc {
    flex: 0 0 auto;
    font-size: 10px;
    color: #8f939e;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    padding: 2px 6px;
    cursor: pointer;
}

.nav-palette-esc:hover {
    color: #eef2f6;
    border-color: rgba(255, 255, 255, 0.35);
}

/* ---- Results ---- */

.nav-palette-results {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 6px;
}

.nav-palette-result {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 38px;
    padding: 0 12px;
    border-radius: 8px;
    cursor: pointer;
    color: #c6cdd6;
    font-size: 13px;
}

.nav-palette-result.is-active {
    background: #2b3a51;
    color: #ffffff;
}

.nav-palette-result-icon {
    color: #8f939e !important;
    font-size: 18px !important;
    width: 18px;
    height: 18px;
    min-width: 18px;
    margin: 0;
}

.nav-palette-result.is-active .nav-palette-result-icon {
    color: #5dcaa5 !important;
}

.nav-palette-result-label {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-palette-result-label b {
    color: #5dcaa5;
    font-weight: 500;
}

.nav-palette-result-path {
    flex: 0 0 auto;
    max-width: 40%;
    font-size: 11px;
    color: #6b7a8d;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Empty / hint / footer ---- */

.nav-palette-empty,
.nav-palette-hint {
    flex: 0 0 auto;
    padding: 22px 16px;
    color: #6b7a8d;
    font-size: 13px;
    text-align: center;
}

.nav-palette-footer {
    flex: 0 0 auto;
    display: flex;
    gap: 16px;
    padding: 9px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 11px;
    color: #6b7a8d;
}

.nav-palette-footer b {
    display: inline-block;
    min-width: 16px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 3px;
    padding: 0 3px;
    margin-right: 3px;
    font-weight: 400;
    color: #8f939e;
}

@media (max-width: 600px) {
    .nav-palette-backdrop { padding-top: 6vh; }
    .nav-palette { max-height: 78vh; }
    .nav-palette-result-path { display: none; }
}
