/* Header search suggestions: one compact surface shared by desktop and mobile. */
.mkm-search-form,
.mkm-mobile-search {
    position: relative;
}

.mkm-search-form.mkm-search-open input,
.mkm-mobile-search.mkm-search-open input {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 3px rgba(29, 78, 216, 0.12);
}

.mkm-search-suggestions {
    position: absolute;
    z-index: 1100;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid #dbe3ef;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(30, 41, 59, 0.16), 0 3px 10px rgba(30, 41, 59, 0.06);
}

.mkm-search-suggestions[hidden],
.mkm-search-suggestions-submit[hidden] {
    display: none;
}

.mkm-search-suggestions-list {
    max-height: min(390px, 52vh);
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 6px;
}

.mkm-search-suggestion {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
    min-height: 58px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #1e293b;
    text-decoration: none;
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.mkm-search-suggestion:hover,
.mkm-search-suggestion:focus-visible,
.mkm-search-suggestion.is-active {
    border-color: #d7e5ff;
    background: #f1f6ff;
    outline: none;
}

.mkm-search-suggestion:active {
    transform: scale(0.99);
}

.mkm-search-suggestion-cover {
    flex: 0 0 36px;
    width: 36px !important;
    min-width: 36px !important;
    max-width: 36px !important;
    height: 48px !important;
    min-height: 48px !important;
    max-height: 48px !important;
    display: block !important;
    border-radius: 7px;
    object-fit: cover !important;
    object-position: center !important;
    background: #eef2f7;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
}

.mkm-search-suggestion-copy {
    min-width: 0;
    flex: 1 1 auto;
}

.mkm-search-suggestion-title {
    display: block;
    overflow: hidden;
    color: #172033;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mkm-search-suggestion-meta {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 4px;
    overflow: hidden;
    color: #64748b;
    font-size: 11px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mkm-search-suggestion-type {
    flex: 0 0 auto;
    color: #2563eb;
    font-weight: 700;
}

.mkm-search-suggestion-dot {
    color: #c1cad8;
}

.mkm-search-suggestion-arrow {
    flex: 0 0 auto;
    color: #94a3b8;
    font-size: 16px;
    line-height: 1;
    transition: color 0.16s ease, transform 0.16s ease;
}

.mkm-search-suggestion:hover .mkm-search-suggestion-arrow,
.mkm-search-suggestion:focus-visible .mkm-search-suggestion-arrow,
.mkm-search-suggestion.is-active .mkm-search-suggestion-arrow {
    color: #1d4ed8;
    transform: translateX(2px);
}

.mkm-search-suggestions-message {
    padding: 18px 12px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.4;
    text-align: center;
}

.mkm-search-suggestions-submit {
    width: calc(100% - 12px);
    margin: 0 6px 6px;
    padding: 10px 12px;
    border: 0;
    border-top: 1px solid #eef2f7;
    border-radius: 10px;
    background: #f8fafc;
    color: #1d4ed8;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    transition: background-color 0.16s ease, color 0.16s ease;
}

.mkm-search-suggestions-submit:hover,
.mkm-search-suggestions-submit:focus-visible {
    background: #eef4ff;
    color: #1743a7;
    outline: none;
}

.mkm-search-suggestions-submit::after {
    content: ' →';
}

/* The legacy mobile form styles target every button in the form. Keep the
   suggestion footer visually secondary instead of turning it into the submit CTA. */
.mkm-mobile-search .mkm-search-suggestions-submit {
    width: calc(100% - 12px);
    margin: 0 6px 6px;
    padding: 10px 12px;
    border: 0;
    border-top: 1px solid #eef2f7;
    border-radius: 10px;
    background: #f8fafc;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
}

.mkm-mobile-search .mkm-search-suggestions-submit:hover,
.mkm-mobile-search .mkm-search-suggestions-submit:focus-visible {
    background: #eef4ff;
    color: #1743a7;
}

@media (max-width: 768px) {
    .mkm-mobile-menu {
        z-index: 1101;
    }

    .mkm-mobile-search .mkm-search-suggestions {
        top: calc(100% + 8px);
        left: 0;
        right: 0;
    }

    .mkm-search-suggestion {
        min-height: 60px;
        padding: 9px 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mkm-search-suggestion,
    .mkm-search-suggestion-arrow,
    .mkm-search-suggestions-submit {
        transition: none;
    }
}
