.sg-es-search {
    width: 100%;
    font-family: inherit;
}

.sg-es-search__form {
    display: flex;
    gap: 12px;
    align-items: stretch;
    width: 100%;
}

.sg-es-search__fields {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    flex: 1 1 auto;
    min-width: 0;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 8px 28px rgba(0, 0, 0, .06);
}

.sg-es-search__field {
    position: relative;
    display: flex;
    align-items: center;
    min-width: 0;
    background: #fff;
}

.sg-es-search__field:not(:last-child)::after {
    content: "";
    position: absolute;
    right: 0;
    top: 20%;
    width: 1px;
    height: 60%;
    background: #e5e7eb;
}

.sg-es-search__field select {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 58px;
    padding: 0 46px 0 20px;
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    color: #171717;
    font: inherit;
    font-size: 15px;
    cursor: pointer;
}

.sg-es-search__field select:focus {
    outline: 2px solid rgba(0, 0, 0, .14) !important;
    outline-offset: -2px;
}

.sg-es-search__field > svg {
    position: absolute;
    right: 18px;
    width: 18px;
    height: 18px;
    color: #737373;
    pointer-events: none;
}

.sg-es-search__actions {
    display: flex;
    gap: 10px;
    flex: 0 0 auto;
}

.sg-es-search__submit,
.sg-es-search__map {
    min-height: 58px;
    padding: 0 22px;
    border-radius: 14px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
    white-space: nowrap;
}

.sg-es-search__submit {
    background: #171717;
    color: #fff;
    box-shadow: 0 7px 20px rgba(0, 0, 0, .12);
}

.sg-es-search__map {
    background: #fff;
    color: #171717;
    border-color: #e5e7eb;
}

.sg-es-search__submit:hover,
.sg-es-search__map:hover {
    transform: translateY(-1px);
}

.sg-es-search__submit svg,
.sg-es-search__map svg {
    width: 19px;
    height: 19px;
    flex: 0 0 auto;
}

.sg-es-search__warning {
    margin: 10px 0 0;
    font-size: 13px;
    color: #b45309;
}

@media (max-width: 980px) {
    .sg-es-search__form {
        flex-direction: column;
    }

    .sg-es-search__actions {
        width: 100%;
    }

    .sg-es-search__submit,
    .sg-es-search__map {
        flex: 1 1 0;
    }
}

@media (max-width: 680px) {
    .sg-es-search__fields {
        grid-template-columns: 1fr;
        border-radius: 12px;
    }

    .sg-es-search__field:not(:last-child)::after {
        top: auto;
        bottom: 0;
        left: 18px;
        right: 18px;
        width: auto;
        height: 1px;
    }

    .sg-es-search__field select {
        min-height: 54px;
    }

    .sg-es-search__actions {
        flex-direction: column;
    }

    .sg-es-search__submit,
    .sg-es-search__map {
        width: 100%;
        min-height: 54px;
    }
}

/* Estado breve mientras se recalculan las facetas dependientes. */
.sg-es-search--loading .sg-es-search__field select {
    cursor: progress;
}
