/*** RESELLER MAP ***/
/* Uses the theme's colour variables when available, with brand fallbacks */

/* Search form */
.viper-reseller-app {
    padding: 40px;
    background: var(--light);
}
.viper-reseller-search {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 20px 24px;
    margin-bottom: 16px;
}
.viper-reseller-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.viper-reseller-field--address {
    flex: 1 1 420px;
}
.viper-reseller-field--distance {
    flex: 0 1 200px;
}
.viper-reseller-field label {
    font-weight: 600;
    font-size: 15px;
    color: var(--black);
}
.viper-reseller-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}
.viper-reseller-search input[type="text"],
.viper-reseller-search input[type="number"] {
    flex: 1;
    min-width: 0;
    height: 53px;
    padding: 0 16px;
    background: var(--white);
    border: 2px solid var(--border);
    border-radius: 0;
    box-shadow: none;
    font: inherit;
    font-size: 16px;
    color: var(--black);
    transition: border-color 0.2s ease-in-out;
}
.viper-reseller-search input:focus {
    border-color: var(--yellow);
    outline: none;
}
.viper-reseller-unit {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--muted);
}

/* Buttons */
.viper-reseller-submit {
    display: inline-block;
    background: var(--yellow);
    padding: 16px 34px 17px 34px;
    color: var(--black) !important;
    text-decoration: none;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    transition: 0.2s all ease-in-out;
    overflow: hidden;
    position: relative;
    border:none;
    --cut: 14px;
    clip-path: polygon(var(--cut) 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%, 0 var(--cut));
    font-family: 'Milker';
    font-weight: 400;
    letter-spacing: 1px;
    cursor: pointer;
    white-space: normal;
}
.viper-reseller-submit:hover {
    background: var(--dark-yellow);
}
.viper-reseller-locate,
.viper-reseller-reset {
    align-self: flex-start;
    padding: 0;
    background: none;
    border: none;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    text-decoration: underline;
    text-decoration-color: var(--yellow);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
    cursor: pointer;
}
.viper-reseller-reset {
    align-self: center;
    margin-top: 4px;
    background: var(--white);
    padding: 8px;
}
.viper-reseller-locate:hover,
.viper-reseller-reset:hover {
    color: var(--dark-yellow);
}
.viper-reseller-app button:focus-visible,
.viper-reseller-app a:focus-visible {
    outline: 2px solid var(--black);
    outline-offset: 3px;
}
.viper-reseller-app button:disabled {
    opacity: 0.5;
    cursor: wait;
}

/* Status line */
.viper-reseller-status {
    min-height: 1.5em;
    margin: 0 0 16px 0;
    font-size: 15px;
    color: var(--muted);
}
.viper-reseller-app[aria-busy="true"] .viper-reseller-list {
    opacity: 0.5;
    transition: opacity 0.2s;
}

/* List + map */
.viper-reseller-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
    gap: 24px;
    align-items: start;
}
.viper-reseller-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 640px;
    overflow-y: auto;
    padding-right: 6px;
}
.viper-reseller-map {
    position: sticky;
    top: 120px;
    height: 640px;
    background: var(--light);
    z-index: 1;
}

/* Reseller card */
.viper-reseller {
    padding: 20px;
    background: var(--white);
    box-shadow: inset 4px 0 0 transparent;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.viper-reseller:hover,
.viper-reseller.is-active {
    box-shadow: inset 4px 0 0 var(--dark-yellow);
}
.viper-reseller.is-active {
    border-color: var(--dark-yellow);
}
.viper-reseller-title {
    margin: 0 0 6px 0;
    font-size: 20px;
    line-height: 1.3;
}
.viper-reseller-title a {
    color: var(--black);
    text-decoration: none;
}
.viper-reseller-title a:hover {
    color: var(--dark-yellow);
}
.viper-reseller-distance {
    display: inline-block;
    margin: 0 0 10px 0;
    padding: 4px 9px 3px 9px;
    background: var(--black);
    color: var(--yellow) !important;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}
.viper-reseller-contact {
    list-style: none;
    margin: 0 0 14px 0;
    padding: 0;
}
.viper-reseller-contact li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0 0 6px 0;
    font-size: 15px;
    line-height: 1.5;
    color: var(--black);
}
.viper-reseller-contact a {
    color: var(--black);
    word-break: break-word;
}
.viper-reseller-icon {
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin-top: 2px;
    fill: var(--yellow);
}
.viper-reseller-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
}
.viper-reseller-show {
    padding: 8px 14px;
    background: var(--light);
    border: none;
    border-radius: 0;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    color: var(--black);
    cursor: pointer;
}
/*.viper-reseller-show:hover {
    border-color: var(--yellow);
}*/
.viper-reseller-more {
    font-size: 14px;
    font-weight: 700;
    color: var(--black);
    text-decoration: underline;
    text-decoration-color: var(--yellow);
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}
.viper-reseller-empty {
    padding: 24px;
    background: var(--light);
    color: var(--black);
}

/* Map pins */
.viper-reseller-pin-wrap {
    background: none;
    border: none;
}
.viper-reseller-pin {
    display: block;
    width: 22px;
    height: 22px;
    margin: 0 auto;
    background: var(--yellow);
    border: 2px solid var(--black);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}
.viper-reseller-me {
    display: block;
    width: 20px;
    height: 20px;
    background: var(--black);
    border: 2px solid var(--white);
    border-radius: 50%;
}
.viper-reseller-radius {
    stroke: var(--black);
    stroke-width: 2;
    stroke-dasharray: 6 6;
    fill: var(--yellow);
    fill-opacity: 0.12;
}

/* Popups */
.viper-reseller-app .leaflet-popup-content-wrapper,
.viper-reseller-single-map .leaflet-popup-content-wrapper {
    border-radius: 0;
    border-top: 4px solid var(--yellow);
}
.viper-reseller-popup p {
    margin: 4px 0 0 0;
}
.viper-reseller-popup-title {
    font-weight: 700;
    font-size: 15px;
    color: var(--black) !important;
    font-family: 'SF UI Text Medium';
}
.viper-reseller-popup-distance {
    font-weight: 700;
}

/* Single reseller page map */
.viper-reseller-single-map {
    height: 320px;
    margin-top: 24px;
    background: var(--light);
    z-index: 1;
}

/* Screen reader only (if the theme doesn't define it) */
.viper-reseller-app .screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* Dotted line from the search point to a reseller */
.viper-reseller-line {
    stroke: var(--black);
    stroke-width: 2.5;
    stroke-dasharray: 2 8;
    stroke-linecap: round;
    fill: none;
}
.viper-reseller-line-label {
    padding: 3px 8px;
    background: var(--black);
    color: var(--yellow);
    border: none;
    border-radius: 0;
    box-shadow: none;
    font-weight: 700;
    font-size: 13px;
}
.viper-reseller-line-label::before {
    display: none; /* No tooltip arrow */
}


/* Popup contact details */
.viper-reseller-popup-contact {
    list-style: none;
    margin: 8px 0 0 0;
    padding: 0;
}
.viper-reseller-popup-contact li {
    position: relative;
    margin: 0 0 4px 0;
    padding-left: 22px;
    font-size: 13px;
    line-height: 1.5;
    font-family: 'SF UI Text Medium';
}
.viper-reseller-popup-contact li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 3px;
    width: 14px;
    height: 14px;
    background: var(--yellow);
    -webkit-mask: var(--icon) no-repeat center / contain;
    mask: var(--icon) no-repeat center / contain;
}
.viper-reseller-popup-address { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2C8.1 2 5 5.1 5 9c0 5.2 7 13 7 13s7-7.8 7-13c0-3.9-3.1-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E"); }
.viper-reseller-popup-phone { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6.6 10.8a15.1 15.1 0 0 0 6.6 6.6l2.2-2.2c.3-.3.7-.4 1-.2 1.1.4 2.3.6 3.6.6.6 0 1 .4 1 1V20c0 .6-.4 1-1 1A17 17 0 0 1 3 4c0-.6.4-1 1-1h3.5c.6 0 1 .4 1 1 0 1.3.2 2.5.6 3.6.1.3 0 .7-.2 1l-2.3 2.2z'/%3E%3C/svg%3E"); }
.viper-reseller-popup-email { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 4H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 4-8 5-8-5V6l8 5 8-5v2z'/%3E%3C/svg%3E"); }
.viper-reseller-popup-website { --icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20zm0 18c-.8-1.2-1.5-2.5-1.9-4h3.8c-.4 1.5-1.1 2.8-1.9 4zm-2.3-6a14.7 14.7 0 0 1 0-4h4.6a14.7 14.7 0 0 1 0 4H9.7zM12 4c.8 1.2 1.5 2.5 1.9 4h-3.8c.4-1.5 1.1-2.8 1.9-4z'/%3E%3C/svg%3E"); }
.viper-reseller-popup-contact a {
    color: var(--black) !important;
    word-break: break-word;
}
.viper-reseller-popup-distance {
    display: inline-block;
    margin: 6px 0 0 8px !important;
    padding: 4px 6px 0 6px;
    background: var(--black);
    color: var(--yellow) !important;
    font-size: 12px;
}

/* Pin highlight */
.viper-reseller-pin-scale {
    display: block;
    width: 30px;
    height: 30px;
    transfoorigin: 50% 100%; /* Grow from the pin's tip */
    transition: transform 0.15s ease-out, filter 0.15s ease-out;
}
.viper-reseller-pin-wrap.is-hover .viper-reseller-pin-scale {
    transform: scale(1.35);
}
.viper-reseller-pin-wrap.is-active .viper-reseller-pin-scale {
    transform: scale(1.2);
}
.viper-reseller-pin-wrap.is-active .viper-reseller-pin {
    background: var(--black);
    border-color: var(--yellow);
}



@media (prefers-reduced-motion: reduce) {
    .viper-reseller-pin-scale {
        transition: none;
    }
}





@media (prefers-reduced-motion: reduce) {
    .viper-reseller,
    .viper-reseller-search input,
    .viper-reseller-submit {
        transition: none;
    }
}

/* Tablet & mobile: map above the list */
@media (max-width: 900px) {
    .viper-reseller-layout {
        grid-template-columns: 1fr;
    }
    .viper-reseller-map {
        position: relative;
        top: 0;
        order: -1;
        height: 380px;
    }
    .viper-reseller-list {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }
    .viper-reseller-reset {
        margin-top: 0;
    }
    .viper-reseller-row {
        flex-wrap: wrap;
    }
    .viper-reseller-field--address .viper-reseller-row input,
    .viper-reseller-submit {
        flex-basis: 100%;
        height: 50px;
    }
}
@media (max-width: 520px) {
    .viper-reseller-map {
        height: 300px;
    }
    .viper-reseller-app {
        padding:20px;
    }
}
