/*
 Theme Name: Invest Match
 Theme URI: https://github.com/elementor/hello-theme/
 Description: Child theme for Hello Elementor. Służy do nadpisywania styli, dodawania własnego CSS/JS i funkcji.
 Template: hello-elementor
 Version: 1.0.0
 Text Domain: hello-elementor-child
*/

/* ==========================================================
   INVEST MATCH - WYSZUKIWARKA OFERT
   Shortcode: [im_oferty_search]
   ========================================================== */

.im-offer-search {
    width: 100%;
    font-family: "Area Normal", Arial, sans-serif;
    background: #fff;
    color: #171717;
}


/* ==========================================================
   TABS
   ========================================================== */

.im-offer-search__tabs {
    display: flex;
    align-items: stretch;
    gap: 0;

    width: 100%;
    min-height: 48px;

    padding: 0 6px;

    border-bottom: 1px solid #e7e7e7;

    overflow-x: auto;
    overflow-y: hidden;

    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.im-offer-search__tabs::-webkit-scrollbar {
    display: none;
}

.im-offer-search__tab {
    position: relative;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: max-content;

    padding: 0 22px;

    color: #323232;
    font-size: 12px;
    font-weight: 400;
    line-height: 1;

    text-decoration: none !important;

    transition:
        color .2s ease,
        background-color .2s ease;
}

.im-offer-search__tab:hover {
    color: #111;
}

.im-offer-search__tab::after {
    content: "";

    position: absolute;

    left: 18px;
    right: 18px;
    bottom: -1px;

    height: 2px;

    background: transparent;

    transition: background-color .2s ease;
}

.im-offer-search__tab.is-active {
    color: #111;
    font-weight: 500;
}

.im-offer-search__tab.is-active::after {
    background: #d2262c;
}


/* ==========================================================
   FORM
   ========================================================== */

.im-offer-search__form {
    display: grid;

    grid-template-columns:
        minmax(150px, 1.35fr)
        minmax(150px, 1.1fr)
        minmax(115px, .9fr)
        minmax(115px, .9fr)
        minmax(135px, 1fr)
        minmax(135px, 1fr)
        166px;

    gap: 10px;

    width: 100%;

    padding: 14px 6px 18px;
}


/* ==========================================================
   FIELDS
   ========================================================== */

.im-offer-search__field {
    position: relative;

    width: 100%;
    height: 46px;

    border: 1px solid #dedede;
    border-radius: 4px;

    background: #fff;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

.im-offer-search__field:hover {
    border-color: #c6c6c6;
}

.im-offer-search__field:focus-within {
    border-color: #b8b8b8;

    box-shadow:
        0 0 0 2px rgba(0, 0, 0, .025);
}


/* SELECT + INPUT */

.im-offer-search__field select,
.im-offer-search__field input {
    width: 100%;
    height: 100%;

    padding: 0 38px 0 14px;

    border: 0 !important;
    outline: 0 !important;

    background: transparent !important;

    color: #474747;

    font-family: inherit;
    font-size: 11px;
    font-weight: 400;

    box-shadow: none !important;

    appearance: none;
    -webkit-appearance: none;
}


/* placeholders */

.im-offer-search__field input::placeholder {
    color: #656565;
    opacity: 1;
}


/* usunięcie spinnera number */

.im-offer-search__field input[type="number"]::-webkit-inner-spin-button,
.im-offer-search__field input[type="number"]::-webkit-outer-spin-button {
    margin: 0;

    -webkit-appearance: none;
}

.im-offer-search__field input[type="number"] {
    -moz-appearance: textfield;
}


/* ==========================================================
   SELECT CHEVRON
   ========================================================== */

.im-offer-search__field:has(select)::after {
    content: "";

    position: absolute;

    top: 50%;
    right: 14px;

    width: 6px;
    height: 6px;

    border-right: 1px solid #555;
    border-bottom: 1px solid #555;

    pointer-events: none;

    transform:
        translateY(-70%)
        rotate(45deg);
}


/* ==========================================================
   LOCATION ICON
   ========================================================== */

.im-offer-search__field--location select {
    padding-left: 38px;
}

.im-offer-search__field-icon {
    position: absolute;

    top: 50%;
    left: 12px;

    display: flex;

    width: 16px;
    height: 16px;

    color: #555;

    pointer-events: none;

    transform: translateY(-50%);
}

.im-offer-search__field-icon svg {
    display: block;

    width: 100%;
    height: 100%;

    fill: none;

    stroke: currentColor;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}


/* ==========================================================
   BUTTON
   ========================================================== */

.im-offer-search__submit {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 10px !important;

    width: 100% !important;
    height: 46px !important;
    min-height: 46px !important;

    padding: 0 22px !important;
    margin: 0 !important;

    border: 0 !important;
    border-radius: 4px !important;

    background: #CC2429 !important;
    color: #fff !important;

    font-family: "Area Normal", Arial, sans-serif !important;
    font-size: 12px !important;
    font-weight: 400 !important;
    line-height: 1 !important;

    white-space: nowrap;
    cursor: pointer;

    box-shadow: none !important;

    transition:
        background-color .2s ease,
        transform .15s ease;
}

.im-offer-search__submit:hover {
    background: #B81F24 !important;
    color: #fff !important;
}

.im-offer-search__submit:active {
    transform: translateY(1px);
}

.im-offer-search__submit svg {
    display: block !important;

    width: 16px !important;
    height: 16px !important;

    flex: 0 0 16px;

    fill: none !important;
    stroke: currentColor !important;
    stroke-width: 1.6 !important;
    stroke-linecap: round;
    stroke-linejoin: round;
}
/* ==========================================================
   TABLET
   ========================================================== */

@media (max-width: 1100px) {

    .im-offer-search__form {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .im-offer-search__submit {
        grid-column: span 1;
    }
}


/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 767px) {

    .im-offer-search__tabs {
        min-height: 46px;

        padding: 0;
    }

    .im-offer-search__tab {
        padding: 0 17px;

        font-size: 11px;
    }

    .im-offer-search__tab::after {
        left: 14px;
        right: 14px;
    }


    .im-offer-search__form {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 9px;

        padding: 14px 0;
    }


    /* lokalizacja + typ pełna szerokość */

    .im-offer-search__field--location,
    .im-offer-search__field:nth-of-type(2) {
        grid-column: 1 / -1;
    }


    .im-offer-search__submit {
        grid-column: 1 / -1;
    }
}


/* ==========================================================
   SMALL MOBILE
   ========================================================== */

@media (max-width: 480px) {

    .im-offer-search__form {
        grid-template-columns: 1fr;
    }

    .im-offer-search__field,
    .im-offer-search__field--location,
    .im-offer-search__field:nth-of-type(2),
    .im-offer-search__submit {
        grid-column: auto;
    }

    .im-offer-search__field,
    .im-offer-search__submit {
        height: 48px;
    }
}