/* Location editor navigation */
.location-editor-nav-head {
    display: flex;
    gap: 16px;
    align-items: flex-end;
    justify-content: space-between;
    margin: 4px 4px 10px;
    scroll-margin-top: 24px;
}

.location-editor-nav-eyebrow {
    display: block;
    margin-bottom: 3px;
    color: #2563eb;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.location-editor-nav-head strong {
    color: #0f172a;
    font-size: 14px;
    letter-spacing: -.01em;
}

.location-editor-nav-progress {
    display: inline-flex;
    gap: 10px;
    align-items: center;
    padding: 6px 12px;
    border: 1px solid #dce5f1;
    border-radius: 999px;
    color: #64748b;
    background: #fff;
    font-size: 10.5px;
    white-space: nowrap;
}

.location-editor-nav-progress b {
    color: #1d4ed8;
}

.location-editor-nav-dots {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.location-editor-nav-dots i {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: #d8e0eb;
    transition: width .3s ease, background .3s ease;
}

.location-editor-nav-dots i.is-done {
    background: #93c5fd;
}

.location-editor-nav-dots i.is-active {
    width: 18px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.location-editor-tabs {
    position: sticky;
    z-index: 20;
    top: 12px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin-bottom: 18px;
    padding: 6px;
    border: 1px solid #dce5f1;
    border-radius: 20px;
    background: rgba(238, 242, 248, .92);
    box-shadow: 0 14px 36px rgba(31, 58, 108, .1), inset 0 1px 0 rgba(255, 255, 255, .7);
    backdrop-filter: blur(16px) saturate(1.4);
}

.location-editor-tabs-indicator {
    position: absolute;
    z-index: 0;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 0 0 1.5px #3b82f6, 0 12px 26px rgba(37, 99, 235, .2);
    pointer-events: none;
    transition: transform .38s cubic-bezier(.2, .8, .2, 1), width .38s cubic-bezier(.2, .8, .2, 1), height .38s cubic-bezier(.2, .8, .2, 1);
}

.location-editor-tabs-indicator::after {
    position: absolute;
    right: 18px;
    bottom: -1px;
    left: 18px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    content: "";
    background: linear-gradient(90deg, #60a5fa, #2563eb, #7c3aed);
}

.location-editor-tabs button {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 11px;
    align-items: center;
    min-width: 0;
    min-height: 62px;
    padding: 10px 12px;
    border: 0;
    border-radius: 15px;
    color: #475569;
    background: rgba(255, 255, 255, .55);
    box-shadow: inset 0 0 0 1px #e1e8f2;
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.location-editor-tabs button:hover {
    color: #1d4ed8;
    background: #fff;
    box-shadow: inset 0 0 0 1px #c7d7ee, 0 8px 18px rgba(31, 58, 108, .08);
    transform: translateY(-1px);
}

.location-editor-tabs button[aria-selected="true"] {
    color: #1d4ed8;
    background: transparent;
    box-shadow: none;
    transform: none;
}

/* Zanim JS ustawi przesuwany wskaźnik, aktywna zakładka ma własne tło. */
.location-form-screen:not(.is-ready) .location-editor-tabs button[aria-selected="true"] {
    background: #fff;
    box-shadow: 0 0 0 1.5px #3b82f6;
}

.location-editor-tabs button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .25);
    outline-offset: 2px;
}

/* Pulsująca kropka na sekcjach, których użytkownik jeszcze nie otworzył. */
.location-editor-tabs button.is-unseen::before {
    position: absolute;
    top: 9px;
    right: 9px;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    content: "";
    background: #2563eb;
    animation: location-tab-unseen 1.8s ease-out infinite;
}

.location-editor-tab-icon {
    display: grid;
    place-items: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    color: #64748b;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e2e8f0;
    transition: .2s ease;
}

.location-editor-tabs button:hover .location-editor-tab-icon {
    color: #2563eb;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

.location-editor-tabs button[aria-selected="true"] .location-editor-tab-icon {
    color: #fff;
    background: linear-gradient(145deg, #3b82f6, #1d4ed8);
    box-shadow: 0 7px 16px rgba(37, 99, 235, .3);
}

.location-editor-tab-icon svg {
    width: 17px;
    height: 17px;
}

.location-editor-tab-copy {
    flex: 1 1 auto;
    min-width: 0;
}

.location-editor-tab-step {
    display: block;
    margin-bottom: 1px;
    color: #94a3b8;
    font-size: 8.5px;
    font-weight: 800;
    letter-spacing: .1em;
}

.location-editor-tabs button[aria-selected="true"] .location-editor-tab-step {
    color: #3b82f6;
}

.location-editor-tabs strong,
.location-editor-tabs small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.location-editor-tabs strong {
    color: inherit;
    font-size: 12px;
    line-height: 1.3;
}

.location-editor-tabs small {
    margin-top: 2px;
    color: #8794a6;
    font-size: 9.5px;
}

.location-editor-tab-badge {
    flex: 0 0 auto;
    padding: 3px 8px;
    border-radius: 999px;
    color: #475569;
    background: #fff;
    box-shadow: inset 0 0 0 1px #e2e8f0;
    font-size: 9px;
    font-weight: 700;
    white-space: nowrap;
    transition: .2s ease;
}

.location-editor-tabs button[aria-selected="true"] .location-editor-tab-badge {
    color: #1d4ed8;
    background: #eff6ff;
    box-shadow: inset 0 0 0 1px #bfdbfe;
}

/* Przejście do kolejnej sekcji na dole każdej zakładki */
.location-editor-next {
    display: flex;
    gap: 18px;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding: 14px 14px 14px 22px;
    border: 1px solid #dce5f1;
    border-radius: 20px;
    background:
        radial-gradient(circle at 100% 0, rgba(59, 130, 246, .1), transparent 55%),
        linear-gradient(145deg, #fff, #f6f9fe);
}

.location-editor-next-step {
    color: #2563eb;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.location-editor-next-copy p {
    margin: 3px 0 0;
    color: #64748b;
    font-size: 11px;
}

.location-editor-next-button {
    display: inline-flex;
    gap: 12px;
    align-items: center;
    padding: 8px 10px 8px 8px;
    border: 0;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8 60%, #4338ca);
    box-shadow: 0 12px 26px rgba(37, 99, 235, .28);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease;
}

.location-editor-next-button:hover {
    box-shadow: 0 16px 32px rgba(37, 99, 235, .36);
    transform: translateY(-2px);
}

.location-editor-next-button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .3);
    outline-offset: 3px;
}

.location-editor-next-icon,
.location-editor-next-arrow {
    display: grid;
    place-items: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, .16);
}

.location-editor-next-icon {
    width: 36px;
    height: 36px;
}

.location-editor-next-arrow {
    width: 28px;
    height: 28px;
    transition: transform .2s ease;
}

.location-editor-next-button:hover .location-editor-next-arrow {
    transform: translateX(3px);
}

.location-editor-next.is-last .location-editor-next-button:hover .location-editor-next-arrow {
    transform: translateX(-3px);
}

.location-editor-next-icon svg,
.location-editor-next-arrow svg {
    width: 16px;
    height: 16px;
}

.location-editor-next-label small {
    display: block;
    color: rgba(255, 255, 255, .75);
    font-size: 9.5px;
}

.location-editor-next-label strong {
    display: block;
    font-size: 13px;
}

.location-editor-next.is-last .location-editor-next-button {
    color: #1e293b;
    background: #fff;
    box-shadow: inset 0 0 0 1px #dce5f1, 0 8px 18px rgba(31, 58, 108, .08);
}

.location-editor-next.is-last .location-editor-next-icon,
.location-editor-next.is-last .location-editor-next-arrow {
    color: #2563eb;
    background: #eff6ff;
}

.location-editor-next.is-last .location-editor-next-label small {
    color: #64748b;
}

@keyframes location-tab-unseen {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 99, 235, .45);
    }

    70%,
    100% {
        box-shadow: 0 0 0 7px rgba(37, 99, 235, 0);
    }
}

.location-editor-tab-panel[hidden] {
    display: none !important;
}

.location-editor-tab-panel {
    animation: location-tab-enter .2s ease;
}

.location-editor-organization > .panel + .panel {
    margin-top: 18px;
}

@keyframes location-tab-enter {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/*
 * Na desktopie obszar roboczy ma wĹ‚asne, zawsze dostÄ™pne przewijanie.
 * DziÄ™ki temu dĹ‚ugie ustawienia kaĹĽdej zakĹ‚adki nie koĹ„czÄ… siÄ™ poza ekranem
 * laptopa, a pasek zakĹ‚adek pozostaje widoczny podczas przewijania.
 */
@media (min-width: 981px) {
    .workspace:has(.location-form-screen[data-location-tabs-root]) {
        display: flex;
        flex-direction: column;
        height: 100dvh;
        overflow: hidden;
    }

    .workspace:has(.location-form-screen[data-location-tabs-root]) > :not(.content) {
        flex: 0 0 auto;
    }

    .workspace:has(.location-form-screen[data-location-tabs-root]) > .content {
        min-height: 0;
        flex: 1 1 auto;
        overflow-y: scroll;
        overscroll-behavior-y: contain;
        scrollbar-color: #94a3b8 #e8eef6;
        scrollbar-gutter: stable;
        scrollbar-width: thin;
    }

    .workspace:has(.location-form-screen[data-location-tabs-root]) .location-editor-tabs {
        /* Kompensuje gĂłrny padding przewijanego .content: wizualnie 12 px pod topbarem. */
        top: -20px;
    }

    .workspace:has(.location-form-screen[data-location-tabs-root]) > .content::-webkit-scrollbar {
        width: 11px;
    }

    .workspace:has(.location-form-screen[data-location-tabs-root]) > .content::-webkit-scrollbar-track {
        background: #e8eef6;
    }

    .workspace:has(.location-form-screen[data-location-tabs-root]) > .content::-webkit-scrollbar-thumb {
        border: 3px solid #e8eef6;
        border-radius: 999px;
        background: #94a3b8;
    }

    .workspace:has(.location-form-screen[data-location-tabs-root]) > .content::-webkit-scrollbar-thumb:hover {
        background: #64748b;
    }
}

@media (max-width: 980px) {
    .location-editor-tabs {
        position: relative;
        top: auto;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 620px) {
    .location-editor-tabs {
        display: flex;
        gap: 6px;
        margin-right: -16px;
        margin-left: -16px;
        padding: 7px 16px;
        overflow-x: auto;
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        box-shadow: 0 8px 22px rgba(31, 58, 108, .07);
        scrollbar-width: none;
        scroll-snap-type: x proximity;
    }

    .location-editor-tabs::-webkit-scrollbar {
        display: none;
    }

    .location-editor-tabs button {
        flex: 0 0 170px;
        min-height: 54px;
        scroll-snap-align: start;
    }

    .location-editor-tab-icon {
        flex-basis: 34px;
        width: 34px;
        height: 34px;
    }

    .location-editor-tab-badge {
        display: none;
    }

    .location-editor-nav-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .location-editor-next {
        align-items: stretch;
        flex-direction: column;
        padding: 16px;
    }

    .location-editor-next-arrow {
        margin-left: auto;
    }
}

@media (prefers-reduced-motion: reduce) {
    .location-editor-tab-panel {
        animation: none;
    }

    .location-editor-tabs-indicator,
    .location-editor-tabs button,
    .location-editor-nav-dots i {
        transition: none;
    }

    .location-editor-tabs button.is-unseen::before {
        animation: none;
    }
}
