/* ========================================
   Blaek Menu Search Form Widget
   Standalone search form triggered by .blaek-menu-search-trigger
   ======================================== */

.blaek-msf__wrapper {
    max-width: 1400px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    width: 100%;
    padding: 0;
    margin: 0 auto;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease, padding 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.blaek-msf__wrapper.is-open {
    max-height: calc(100vh - 200px);
    opacity: 1;
}

.blaek-msf__form {
    display: flex;
    align-items: stretch;
    gap: 0;
    width: 100%;
    max-width: 100%;
    height: 68px;
}

.blaek-msf__input-wrapper {
    position: relative;
    flex: 1;
    min-width: 0;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: inset 0 0 25px 0 rgba(0, 0, 0, 0.1);
}

.blaek-msf__input {
    position: relative;
    z-index: 1;
    width: 100%;
    height: 100%;
    padding: 14px 20px;
    font-size: 16px;
    line-height: 1.5;
    color: #6E7882;
    background-color: transparent;
    border: none !important;
    border-radius: 8px 0 0 8px;
    outline: none;
    transition: border-color 0.2s ease;
}

.blaek-msf__input::placeholder,
.blaek-msf__input::-webkit-input-placeholder,
.blaek-msf__input::-moz-placeholder,
.blaek-msf__input:-ms-input-placeholder,
.blaek-msf__input::-ms-input-placeholder {
    color: #6E7882;
}

.blaek-msf__input:focus {
    outline: none;
}

.blaek-msf__input-wrapper:focus-within::before {
    border-color: #14466E;
}

.blaek-msf__submit {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    width: auto;
    height: 100%;
    padding: 0;
    background-color: #0F7DC8;
    border: none;
    border-radius: 0;
    color: #fff;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
    z-index: 9;
    font-size: 30px;
}

.blaek-msf__submit:hover {
    background-color: #0d3352;
}

.blaek-msf__submit svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
}

/* ── Tablet & Mobile: full widget is moved inside .blaek-mega-menu-mobile ── */
@media (max-width: 1024px) {
    .blaek-mega-menu-mobile .elementor-widget-blaek-menu-search-form {
        width: 100%;
        margin: 0;
        padding: 0;
    }

    .blaek-mega-menu-mobile .elementor-widget-blaek-menu-search-form .blaek-msf__wrapper {
        display: block;
        max-width: 100%;
        max-height: none;
        opacity: 1;
        overflow: visible;
        margin: 0;
        padding: 0;
        transition: none;
    }

    .blaek-mega-menu-mobile .elementor-widget-blaek-menu-search-form .blaek-msf__form {
        height: 56px;
    }
}
