/* =========================================================
   PL SALES MAP – DEVENTE 2.0
========================================================= */

.pl-sales-map,
.pl-sales-map * {
    box-sizing: border-box;
}

.pl-sales-map {
    --dv-green: #9eea00;
    --dv-bg: #050606;
    --dv-card: #090a0a;
    --dv-card-2: #0d0f0e;
    --dv-white: #f3f3f3;
    --dv-text: #929592;
    --dv-line: rgba(255,255,255,.11);
    --dv-line-strong: rgba(255,255,255,.18);
    --dv-map-region: var(--dv-map-region-custom, #171a19);
    --dv-map-border: rgba(255,255,255,.32);
    --dv-map-hover: #7fbf00;
    --dv-map-active: #9eea00;

    width: 100%;
    position: relative;
    color: var(--dv-white);
    font-family: "Montserrat", Arial, Helvetica, sans-serif;
}

/* =========================================================
   INTRO
========================================================= */

.dv-sales-map__intro {
    max-width: 760px;
    margin: 0 0 34px;
}

.dv-sales-map__eyebrow {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    color: var(--dv-green);
    font-size: 10px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.dv-sales-map__eyebrow::before {
    content: "";
    width: 22px;
    height: 1px;
    background: var(--dv-green);
}

.dv-sales-map__title {
    margin: 0 0 13px;
    color: var(--dv-white);
    font-size: clamp(32px, 3.3vw, 54px);
    line-height: 1.05;
    font-weight: 300;
    letter-spacing: -.04em;
}

.dv-sales-map__description {
    max-width: 650px;
    margin: 0;
    color: var(--dv-text);
    font-size: 13px;
    line-height: 1.75;
    font-weight: 300;
}

/* =========================================================
   LAYOUT
========================================================= */

.dv-sales-map__layout {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(360px, .82fr);
    gap: clamp(28px, 4vw, 64px);
    align-items: stretch;
}

.pl-sales-map--map-right .dv-sales-map__map-wrap {
    grid-column: 2;
}

.pl-sales-map--map-right .dv-sales-map__panel {
    grid-column: 1;
    grid-row: 1;
}

.pl-sales-map--mode-coverage .dv-sales-map__layout {
    grid-template-columns: 1fr;
}

.pl-sales-map--mode-coverage .dv-sales-map__map-wrap {
    max-width: 820px;
    width: 100%;
    margin: 0 auto;
}

/* =========================================================
   MAPA
========================================================= */

.dv-sales-map__map-wrap {
    position: relative;
    min-width: 0;
    padding: clamp(22px, 3vw, 42px);
    border: 1px solid var(--dv-line);
    background:
        radial-gradient(circle at 50% 35%, rgba(158,234,0,.045), transparent 43%),
        linear-gradient(145deg, rgba(255,255,255,.018), rgba(255,255,255,.003));
    overflow: hidden;
}

.dv-sales-map__map-wrap::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 62px;
    height: 1px;
    background: var(--dv-green);
}

.dv-sales-map__map-frame {
    position: relative;
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.pl-sales-map__svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 650px;
    margin: 0 auto;
    overflow: visible;
}

.pl-sales-map__voivode {
    fill: var(--dv-map-region) !important;
    stroke: var(--dv-map-border) !important;
    stroke-width: 3 !important;
    vector-effect: non-scaling-stroke;
    cursor: pointer;
    outline: none;
    transition:
        fill .22s ease,
        stroke .22s ease,
        filter .22s ease,
        opacity .22s ease;
}

.pl-sales-map__voivode.is-hovered {
    fill: var(--dv-map-hover) !important;
    stroke: rgba(158,234,0,.82) !important;
    filter: drop-shadow(0 0 8px rgba(158,234,0,.12));
}

.pl-sales-map__voivode.is-active {
    fill: var(--dv-map-active) !important;
    stroke: rgba(158,234,0,.95) !important;
    filter: drop-shadow(0 0 10px rgba(158,234,0,.20));
}

.pl-sales-map__voivode:focus-visible {
    stroke: var(--dv-green) !important;
    stroke-width: 6 !important;
}

.dv-sales-map__map-hint {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    margin-top: 17px;
    color: #747774;
    font-size: 9px;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: .13em;
}

.dv-sales-map__map-hint::before {
    content: "";
    width: 18px;
    height: 1px;
    background: var(--dv-green);
}

/* =========================================================
   TOOLTIP
========================================================= */

.dv-sales-map__tooltip {
    position: absolute;
    z-index: 6;
    left: 0;
    top: 0;
    transform: translate(12px, -50%);
    pointer-events: none;
    padding: 8px 10px;
    border: 1px solid rgba(158,234,0,.44);
    background: rgba(5,6,6,.96);
    color: #f5f5f5;
    font-size: 10px;
    line-height: 1;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity .15s ease, visibility .15s ease;
    box-shadow: 0 12px 28px rgba(0,0,0,.28);
}

.dv-sales-map__tooltip.is-visible {
    opacity: 1;
    visibility: visible;
}

/* =========================================================
   PANEL
========================================================= */

.dv-sales-map__panel {
    position: relative;
    min-width: 0;
    min-height: 520px;
    display: flex;
    border: 1px solid var(--dv-line);
    background:
        radial-gradient(circle at 100% 0, rgba(158,234,0,.035), transparent 38%),
        linear-gradient(150deg, #0b0d0c 0%, #070808 100%);
    overflow: hidden;
}

.dv-sales-map__panel::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    width: 84px;
    height: 1px;
    background: var(--dv-green);
    opacity: .7;
}

/* =========================================================
   PLACEHOLDER / BRAK HANDLOWCA
========================================================= */

.dv-sales-map__placeholder,
.dv-sales-map__no-rep {
    width: 100%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 4vw, 58px);
}

.dv-sales-map__placeholder[hidden],
.dv-sales-map__no-rep[hidden],
.dv-sales-map__rep-card[hidden] {
    display: none !important;
}

.dv-sales-map__placeholder-kicker,
.dv-sales-map__rep-label {
    color: var(--dv-green);
    font-size: 9px;
    line-height: 1;
    font-weight: 600;
    letter-spacing: .15em;
    text-transform: uppercase;
}

.dv-sales-map__placeholder h3,
.dv-sales-map__no-rep h3 {
    max-width: 390px;
    margin: 15px 0 12px;
    color: var(--dv-white);
    font-size: clamp(26px, 2.3vw, 38px);
    line-height: 1.13;
    font-weight: 300;
    letter-spacing: -.03em;
}

.dv-sales-map__placeholder p,
.dv-sales-map__no-rep p {
    max-width: 410px;
    margin: 0;
    color: var(--dv-text);
    font-size: 12px;
    line-height: 1.7;
    font-weight: 300;
}

/* =========================================================
   KARTA HANDLOWCA
========================================================= */

.dv-sales-map__rep-cards {
    width: 100%;
    display: contents;
}

.dv-sales-map__rep-card {
    width: 100%;
    min-height: 100%;
    display: grid;
    grid-template-columns: minmax(155px, .86fr) minmax(0, 1.14fr);
    grid-template-rows: auto 1fr;
    animation: dvSalesMapCardIn .34s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes dvSalesMapCardIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dv-sales-map__region-line {
    grid-column: 1 / -1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 56px;
    padding: 0 24px;
    border-bottom: 1px solid var(--dv-line);
}

.dv-sales-map__region-line span {
    color: #717571;
    font-size: 8px;
    line-height: 1;
    letter-spacing: .14em;
}

.dv-sales-map__region-line strong {
    color: var(--dv-green);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 500;
    text-align: right;
}

.dv-sales-map__photo-wrap {
    position: relative;
    min-width: 0;
    min-height: 100%;
    border-right: 1px solid var(--dv-line);
    overflow: hidden;
    background: #101211;
}

.dv-sales-map__photo-wrap::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 58%, rgba(5,6,6,.38) 100%);
    pointer-events: none;
}

.dv-sales-map__photo {
    width: 100%;
    height: 100%;
    min-height: 460px;
    display: block;
    object-fit: cover;
    object-position: center top;
}

.dv-sales-map__photo-wrap--empty {
    display: flex;
    align-items: center;
    justify-content: center;
}

.dv-sales-map__photo-wrap--empty svg {
    width: 84px;
    height: 84px;
    fill: none;
    stroke: rgba(255,255,255,.22);
    stroke-width: 1;
}

.dv-sales-map__rep-copy {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 3.7vw, 52px);
}

.dv-sales-map__rep-name {
    margin: 13px 0 7px;
    color: var(--dv-white);
    font-size: clamp(27px, 2.5vw, 40px);
    line-height: 1.08;
    font-weight: 300;
    letter-spacing: -.035em;
}

.dv-sales-map__rep-role {
    margin-bottom: 28px;
    color: var(--dv-text);
    font-size: 11px;
    line-height: 1.5;
    font-weight: 300;
}

.dv-sales-map__contacts {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.dv-sales-map__contact {
    width: 100%;
    min-height: 47px;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 9px 12px;
    border: 1px solid var(--dv-line);
    color: #d9dbd9 !important;
    text-decoration: none !important;
    font-size: 10px;
    line-height: 1.35;
    overflow-wrap: anywhere;
    transition: border-color .2s ease, background .2s ease, color .2s ease;
}

.dv-sales-map__contact:hover {
    border-color: rgba(158,234,0,.48);
    background: rgba(158,234,0,.025);
    color: var(--dv-white) !important;
}

.dv-sales-map__contact-icon {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dv-green);
}

.dv-sales-map__contact-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.45;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.dv-sales-map__rep-area {
    margin-top: 24px;
    padding-top: 19px;
    border-top: 1px solid var(--dv-line);
    color: #7d817d;
    font-size: 10px;
    line-height: 1.65;
    font-weight: 300;
}

/* =========================================================
   COVERAGE MODE
========================================================= */

.pl-sales-map--mode-coverage .dv-sales-map__map-hint {
    display: none;
}

.pl-sales-map--mode-coverage .pl-sales-map__voivode.is-coverage-active {
    fill: var(--dv-coverage-active, #9eea00) !important;
    stroke: rgba(158,234,0,.92) !important;
}

.pl-sales-map--mode-coverage .pl-sales-map__voivode.is-coverage-inactive {
    fill: var(--dv-coverage-inactive, #171a19) !important;
}

.pl-sales-map--mode-coverage .pl-sales-map__voivode.is-coverage-hover {
    fill: var(--dv-coverage-hover, #7fbf00) !important;
}

/* =========================================================
   LIGHT MODE – DEVENTE
========================================================= */

html.dv-light-mode .pl-sales-map,
body.dv-light-mode .pl-sales-map {
    --dv-bg: #f4f4f1;
    --dv-card: #ffffff;
    --dv-card-2: #f2f2ee;
    --dv-white: #171817;
    --dv-text: #666966;
    --dv-line: rgba(0,0,0,.11);
    --dv-line-strong: rgba(0,0,0,.18);
    --dv-map-region: #d8dcd5;
    --dv-map-border: rgba(0,0,0,.28);
}

html.dv-light-mode .dv-sales-map__map-wrap,
body.dv-light-mode .dv-sales-map__map-wrap {
    background:
        radial-gradient(circle at 50% 35%, rgba(158,234,0,.06), transparent 43%),
        linear-gradient(145deg, rgba(255,255,255,.98), rgba(239,240,235,.88));
}

html.dv-light-mode .dv-sales-map__panel,
body.dv-light-mode .dv-sales-map__panel {
    background:
        radial-gradient(circle at 100% 0, rgba(158,234,0,.06), transparent 38%),
        linear-gradient(150deg, #ffffff 0%, #f2f2ee 100%);
}

html.dv-light-mode .dv-sales-map__tooltip,
body.dv-light-mode .dv-sales-map__tooltip {
    background: rgba(255,255,255,.98);
    color: #171817;
    box-shadow: 0 12px 28px rgba(0,0,0,.12);
}

html.dv-light-mode .dv-sales-map__photo-wrap,
body.dv-light-mode .dv-sales-map__photo-wrap {
    background: #e7e9e4;
}

html.dv-light-mode .dv-sales-map__photo-wrap--empty svg,
body.dv-light-mode .dv-sales-map__photo-wrap--empty svg {
    stroke: rgba(0,0,0,.24);
}

html.dv-light-mode .dv-sales-map__contact,
body.dv-light-mode .dv-sales-map__contact {
    color: #303230 !important;
    background: rgba(255,255,255,.42);
}

/* =========================================================
   TABLET
========================================================= */

@media (max-width: 1050px) {
    .dv-sales-map__layout {
        grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
        gap: 24px;
    }

    .dv-sales-map__map-wrap {
        padding: 24px;
    }

    .dv-sales-map__rep-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto 255px auto;
    }

    .dv-sales-map__photo-wrap {
        grid-row: 2;
        border-right: 0;
        border-bottom: 1px solid var(--dv-line);
    }

    .dv-sales-map__photo {
        min-height: 255px;
        object-position: center 20%;
    }

    .dv-sales-map__rep-copy {
        grid-row: 3;
        padding: 28px;
    }
}

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

@media (max-width: 767px) {
    .dv-sales-map__intro {
        margin-bottom: 24px;
    }

    .dv-sales-map__title {
        font-size: 34px;
    }

    .dv-sales-map__description {
        font-size: 12px;
    }

    .dv-sales-map__layout,
    .pl-sales-map--map-right .dv-sales-map__layout {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .pl-sales-map--map-right .dv-sales-map__map-wrap,
    .pl-sales-map--map-right .dv-sales-map__panel {
        grid-column: 1;
        grid-row: auto;
    }

    .dv-sales-map__map-wrap {
        padding: 18px 14px 16px;
    }

    .dv-sales-map__map-frame {
        max-width: 520px;
    }

    .pl-sales-map__svg {
        max-height: none;
    }

    .dv-sales-map__tooltip {
        display: none;
    }

    .dv-sales-map__panel {
        min-height: 0;
    }

    .dv-sales-map__placeholder,
    .dv-sales-map__no-rep {
        min-height: 240px;
        padding: 28px 24px;
    }

    .dv-sales-map__rep-card {
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-rows: auto auto;
        min-height: 0;
    }

    .dv-sales-map__region-line {
        grid-column: 1 / -1;
        min-height: 48px;
        padding: 0 15px;
    }

    .dv-sales-map__photo-wrap {
        grid-column: 1;
        grid-row: 2;
        min-height: 100%;
        border-right: 1px solid var(--dv-line);
        border-bottom: 0;
    }

    .dv-sales-map__photo {
        min-height: 100%;
        height: 100%;
        object-position: center top;
    }

    .dv-sales-map__rep-copy {
        grid-column: 2;
        grid-row: 2;
        padding: 22px 17px;
    }

    .dv-sales-map__rep-name {
        font-size: 24px;
        margin-top: 10px;
    }

    .dv-sales-map__rep-role {
        margin-bottom: 18px;
    }

    .dv-sales-map__contact {
        min-height: 42px;
        padding: 7px 9px;
        font-size: 9px;
    }

    .dv-sales-map__rep-area {
        margin-top: 17px;
        padding-top: 15px;
        font-size: 9px;
    }
}

@media (max-width: 420px) {
    .dv-sales-map__rep-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .dv-sales-map__rep-copy {
        padding: 20px 14px;
    }

    .dv-sales-map__rep-name {
        font-size: 21px;
    }

    .dv-sales-map__contact-icon {
        display: none;
    }
}

/* =========================================================
   WIELU HANDLOWCÓW W JEDNYM WOJEWÓDZTWIE – v2.1
   Te reguły uruchamiają się tylko wtedy, gdy do wybranego
   województwa przypisano więcej niż jedną osobę.
========================================================= */

.dv-sales-map__panel.has-multiple-reps {
    display: block;
    max-height: 650px;
    overflow: hidden;
}

.dv-sales-map__rep-cards.has-multiple-reps {
    width: 100%;
    height: 100%;
    max-height: 650px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(158,234,0,.55) rgba(255,255,255,.05);
}

.dv-sales-map__rep-cards.has-multiple-reps::-webkit-scrollbar {
    width: 7px;
}

.dv-sales-map__rep-cards.has-multiple-reps::-webkit-scrollbar-track {
    background: rgba(255,255,255,.035);
}

.dv-sales-map__rep-cards.has-multiple-reps::-webkit-scrollbar-thumb {
    background: rgba(158,234,0,.52);
}

.dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-card {
    min-height: 300px;
    flex: 0 0 auto;
    grid-template-columns: minmax(135px, .72fr) minmax(0, 1.28fr);
    grid-template-rows: auto 1fr;
    border-bottom: 1px solid var(--dv-line);
}

.dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-card:last-child {
    border-bottom: 0;
}

.dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__photo {
    min-height: 244px;
}

.dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-copy {
    padding: 26px 28px;
}

.dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-name {
    font-size: clamp(25px, 2.1vw, 34px);
}

.dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-role {
    margin-bottom: 20px;
}

.dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-area {
    margin-top: 17px;
    padding-top: 14px;
}

html.dv-light-mode .dv-sales-map__rep-cards.has-multiple-reps,
body.dv-light-mode .dv-sales-map__rep-cards.has-multiple-reps {
    scrollbar-color: rgba(105,153,0,.55) rgba(0,0,0,.05);
}

html.dv-light-mode .dv-sales-map__rep-cards.has-multiple-reps::-webkit-scrollbar-track,
body.dv-light-mode .dv-sales-map__rep-cards.has-multiple-reps::-webkit-scrollbar-track {
    background: rgba(0,0,0,.035);
}

@media (max-width: 1050px) {
    .dv-sales-map__panel.has-multiple-reps,
    .dv-sales-map__rep-cards.has-multiple-reps {
        max-height: 720px;
    }

    .dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-card {
        grid-template-columns: 1fr;
        grid-template-rows: auto 230px auto;
        min-height: 0;
    }

    .dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__photo-wrap {
        grid-row: 2;
        border-right: 0;
        border-bottom: 1px solid var(--dv-line);
    }

    .dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__photo {
        min-height: 230px;
        height: 230px;
        object-position: center 20%;
    }

    .dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-copy {
        grid-row: 3;
        padding: 25px 27px 29px;
    }
}

@media (max-width: 767px) {
    .dv-sales-map__panel.has-multiple-reps,
    .dv-sales-map__rep-cards.has-multiple-reps {
        max-height: none;
        overflow: visible;
    }

    .dv-sales-map__rep-cards.has-multiple-reps {
        gap: 8px;
    }

    .dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-card {
        grid-template-columns: 112px minmax(0, 1fr);
        grid-template-rows: auto auto;
        border: 1px solid var(--dv-line);
    }

    .dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__region-line {
        grid-column: 1 / -1;
        grid-row: 1;
    }

    .dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__photo-wrap {
        grid-column: 1;
        grid-row: 2;
        min-height: 100%;
        border-right: 1px solid var(--dv-line);
        border-bottom: 0;
    }

    .dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__photo {
        min-height: 100%;
        height: 100%;
        object-position: center top;
    }

    .dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-copy {
        grid-column: 2;
        grid-row: 2;
        padding: 21px 17px;
    }
}

@media (max-width: 420px) {
    .dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-card {
        grid-template-columns: 96px minmax(0, 1fr);
    }

    .dv-sales-map__rep-cards.has-multiple-reps .dv-sales-map__rep-copy {
        padding: 19px 14px;
    }
}
