/*
 * FYNDA 2.7T
 *
 * Direct styling for:
 * .map-segment.fynda-map-browse-refined
 *
 * This component already exists in Vue.
 *
 * No added JavaScript.
 * No DOM manipulation.
 * No new event handlers.
 * No map or GPS modifications.
 */

/* ONE OUTER CONTAINER */

html body #app
.map-segment.fynda-map-browse-refined {
    display: grid !important;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr) !important;

    align-items: stretch !important;
    justify-items: stretch !important;

    gap: 0 !important;
    column-gap: 0 !important;

    width: min(280px, calc(100vw - 20px)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 20px) !important;

    height: 52px !important;
    min-height: 52px !important;
    max-height: 52px !important;

    padding: 3px !important;
    margin-inline: 0 !important;

    box-sizing: border-box !important;

    border: 1px solid #dbe4ee !important;
    border-radius: 18px !important;

    background: #ffffff !important;
    background-image: none !important;

    box-shadow:
        0 4px 12px rgba(8,27,51,.12) !important;

    overflow: hidden !important;
    isolation: isolate;
}

/* REMOVE CONTAINER DECORATION */

html body #app
.map-segment.fynda-map-browse-refined::before,
html body #app
.map-segment.fynda-map-browse-refined::after {
    content: none !important;
    display: none !important;
}

/* EXACTLY TWO EXISTING VUE BUTTONS */

html body #app
.map-segment.fynda-map-browse-refined > button {
    appearance: none !important;
    -webkit-appearance: none !important;

    display: inline-flex !important;

    align-items: center !important;
    justify-content: center !important;

    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;

    height: 44px !important;
    min-height: 44px !important;
    max-height: 44px !important;

    margin: 0 !important;
    padding: 6px 8px !important;

    gap: 6px !important;

    position: relative !important;
    inset: auto !important;

    transform: none !important;

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

    background: #ffffff !important;
    background-image: none !important;

    color: #102a43 !important;

    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;

    letter-spacing: 0 !important;
    white-space: nowrap !important;

    text-align: center !important;

    box-shadow: none !important;
    filter: none !important;

    box-sizing: border-box !important;

    overflow: hidden !important;
    z-index: 0 !important;
}

/* MAP — BLUE, LEFT SEGMENT */

html body #app
.map-segment.fynda-map-browse-refined
> button:first-child {
    background: #07559a !important;
    background-image: none !important;

    color: #ffffff !important;

    border-radius:
        14px 0 0 14px !important;
}

/* BROWSE — WHITE, RIGHT SEGMENT */

html body #app
.map-segment.fynda-map-browse-refined
> button:last-child {
    background: #ffffff !important;
    background-image: none !important;

    color: #102a43 !important;

    border-left:
        1px solid #dbe4ee !important;

    border-radius:
        0 14px 14px 0 !important;
}

/* HONOUR THE EXISTING VUE ACCESSIBILITY STATE */

html body #app
.map-segment.fynda-map-browse-refined
> button[aria-pressed="true"] {
    background: #07559a !important;
    color: #ffffff !important;
}

html body #app
.map-segment.fynda-map-browse-refined
> button[aria-pressed="false"] {
    background: #ffffff !important;
    color: #102a43 !important;
}

/* PRESERVE ICONS */

html body #app
.map-segment.fynda-map-browse-refined
> button svg {
    display: inline-block !important;

    width: 18px !important;
    height: 18px !important;

    min-width: 18px !important;
    flex: 0 0 18px !important;

    visibility: visible !important;
    opacity: 1 !important;

    position: static !important;
    transform: none !important;
}

/* NO INTERNAL BUTTON DECORATION */

html body #app
.map-segment.fynda-map-browse-refined
> button::before,
html body #app
.map-segment.fynda-map-browse-refined
> button::after {
    content: none !important;
    display: none !important;
}

/* ACCESSIBLE FOCUS */

html body #app
.map-segment.fynda-map-browse-refined
> button:focus-visible {
    outline: 2px solid #a3e635 !important;
    outline-offset: -2px !important;
}

/* NARROW PHONES */

@media (max-width: 299px) {
    html body #app
    .map-segment.fynda-map-browse-refined {
        width: min(
            200px,
            calc(100vw - 16px)
        ) !important;

        height: 48px !important;
        min-height: 48px !important;
        max-height: 48px !important;

        padding: 2px !important;
    }

    html body #app
    .map-segment.fynda-map-browse-refined
    > button {
        height: 42px !important;
        min-height: 42px !important;
        max-height: 42px !important;

        padding: 4px 3px !important;
        gap: 3px !important;

        font-size: 12px !important;
    }

    html body #app
    .map-segment.fynda-map-browse-refined
    > button svg {
        width: 14px !important;
        height: 14px !important;

        min-width: 14px !important;
        flex-basis: 14px !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html body #app
    .map-segment.fynda-map-browse-refined
    > button {
        transition: none !important;
    }
}
