/* =========================================================
   Location Search
   ========================================================= */

.portal-location-search {
    width: calc(100% - 40px);
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
    padding-bottom:20px;
}

.hero--subpage .portal-location-search{
    padding-bottom:0;
    top:85px;
}

.portal-location-search__form {
    display: grid;
    grid-template-columns:
        minmax(280px, 1.5fr)
        minmax(180px, 0.7fr)
        minmax(430px, 1.6fr)
        max-content;
    column-gap: 20px;
    align-items: end;

    padding: 28px;

    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;

    box-shadow:
        0 20px 50px rgba(15, 23, 42, .12),
        0 4px 12px rgba(15, 23, 42, .05);
}



/* =========================================================
   Labels
   ========================================================= */

.portal-location-search label,
.portal-location-search legend {
    display: block;
    margin: 0 0 10px;

    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;

    color: var(--color-text);
}

.portal-location-search fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}


/* =========================================================
   Standort / Eingabefeld
   ========================================================= */

.portal-location-search__input-wrap,
.portal-location-search__select-wrap {
    position: relative;
}

.portal-location-search__input-icon,
.portal-location-search__select-icon {
    position: absolute;
    left: 16px;
    top: 50%;

    width: 20px;
    height: 20px;

    transform: translateY(-50%);

    color: var(--color-text-muted);

    pointer-events: none;
}

.portal-location-search__input-icon svg,
.portal-location-search__select-icon svg {
    display: block;
    width: 100%;
    height: 100%;
}

.portal-location-search input[type="text"],
.portal-location-search select {
    width: 100%;
    height: 54px;

    padding: 0 16px 0 48px;

    font: inherit;
    font-size: 15px;

    color: var(--color-text);
    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: 9px;

    outline: none;

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

.portal-location-search input[type="text"]::placeholder {
    color: var(--color-text-muted);
}

.portal-location-search input[type="text"]:focus,
.portal-location-search select:focus {
    border-color: var(--color-primary);

    box-shadow:
        0 0 0 3px
        color-mix(
            in srgb,
            var(--color-primary) 14%,
            transparent
        );
}


/* =========================================================
   Aktuellen Standort verwenden
   ========================================================= */

.portal-location-search__current-location {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    margin-top: 12px;
    padding: 0;

    border: 0;
    background: transparent;

    color: var(--color-link);

    font: inherit;
    font-size: 14px;
    font-weight: 500;

    cursor: pointer;

    transition: color .2s ease;
}

.portal-location-search__current-location:hover {
    color: var(--color-link-hover);
    text-decoration: underline;
}


/* =========================================================
   Fahrzeit
   ========================================================= */

.portal-location-search select {
    cursor: pointer;
}


/* =========================================================
   Verkehrsmittel
   ========================================================= */

.portal-location-search__transport-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.portal-transport-option {
    margin: 0 !important;
    cursor: pointer;
}

.portal-transport-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.portal-transport-option__content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    min-height: 54px;
    padding: 0 14px;

    white-space: nowrap;

    color: var(--color-text);
    background: var(--color-surface);

    border: 1px solid var(--color-border);
    border-radius: 9px;

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

.portal-transport-option__icon {
    font-size: 17px;
    line-height: 1;
}

.portal-transport-option:hover .portal-transport-option__content {
    border-color: var(--color-primary);
}

.portal-transport-option input:checked + .portal-transport-option__content {
    color: var(--color-primary);

    background:
        color-mix(
            in srgb,
            var(--color-primary) 8%,
            var(--color-surface)
        );

    border-color: var(--color-primary);

    box-shadow:
        0 0 0 2px
        color-mix(
            in srgb,
            var(--color-primary) 8%,
            transparent
        );
}


/* =========================================================
   Suchbutton
   ========================================================= */

.portal-location-search__submit{
    margin-left:20px;
}   

.portal-location-search__submit button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    min-width: 165px;
    height: 54px;

    padding: 0 22px;

    border: 0;
    border-radius: 9px;

    color: var(--color-button-text);
    background: var(--color-button-background);

    font: inherit;
    font-size: 15px;
    font-weight: 600;

    cursor: pointer;

    box-shadow:
        0 7px 18px
        color-mix(
            in srgb,
            var(--color-button-background) 25%,
            transparent
        );

    transition:
        transform .2s ease,
        background .2s ease,
        box-shadow .2s ease;
}

.portal-location-search__submit button svg {
    width: 19px;
    height: 19px;
}

.portal-location-search__submit button:hover {
    background: var(--color-button-hover);
    transform: translateY(-1px);
}

.portal-location-search__submit button:focus-visible {
    outline: none;

    box-shadow:
        0 0 0 3px
        color-mix(
            in srgb,
            var(--color-button-background) 25%,
            transparent
        );
}

.portal-transport-option__icon svg {    
    width:auto;
    height:24px;
    fill: currentColor;
}


/* =========================================================
   Tablet
   ========================================================= */

@media (max-width: 1100px) {

    .portal-location-search__form {
        grid-template-columns: 1fr 1fr;
    }

    .portal-location-search__transport {
        grid-column: 1 / -1;
    }

    .portal-location-search__submit {
        grid-column: 1 / -1;
    }

    .portal-location-search__submit button {
        width: 100%;
    }
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 700px) {

    .portal-location-search {
        width: min(100% - 24px, 1280px);
    }

    .portal-location-search__form {
        display: block;

        padding: 20px;

        border-radius: 14px;
    }

    .portal-location-search__time,
    .portal-location-search__transport,
    .portal-location-search__submit {
        margin-top: 22px;
    }

    .portal-location-search__transport-options {
        grid-template-columns: repeat(2, 1fr);
    }

    .portal-location-search__submit button {
        width: 100%;
    }
}


/* =========================================================
   Kleine Smartphones
   ========================================================= */

@media (max-width: 400px) {

    .portal-location-search__transport-options {
        grid-template-columns: 1fr;
    }
}
