/* ============================================================
   CH Support Network — frontend styles
   Dark theme: matches CH website design system
   ============================================================ */

.elementor-widget-shortcode:has(.ch-support-wrapper) {
    width: 100%;
}

.ch-support-wrapper {
    --ch-support-layout-height: 60vh;
    --ch-support-sidebar-width: 35%;
    --ch-support-card-border: rgba(255, 255, 255, 0.2);
    --ch-support-card-padding: 20px;
    --ch-support-border-subtle: rgba(255, 255, 255, 0.12);
    --ch-support-input-border: #353535;
    --ch-support-map-height-mobile: 300px;

    display: flex;
    gap: 100px;
    height: var(--ch-support-layout-height);
}

@media screen and (max-width: 1500px) {
    .ch-support-wrapper {
        gap: 20px;
    }
}

/* ============================================================
   Sidebar
   ============================================================ */
.ch-support-wrapper .ch-support-sidebar {
    flex: 0 0 var(--ch-support-sidebar-width);
    display: flex;
    flex-direction: column;
    position: relative;
}

.ch-support-wrapper .ch-support-sidebar::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(30, 30, 30, 0) 0%, rgb(33, 33, 33) 100%);
    pointer-events: none;
    width: 100%;
    height: 200px;
}

.ch-support-wrapper #ch-support-total {
    font-size: 0.9rem;
    color: #767676;
    text-transform: uppercase;
    font-family: var(--font-stack-heading);
    min-height: 25.6px;
}

/* ============================================================
   Location list
   ============================================================ */

.ch-support-wrapper #ch-support-locations {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    height: 100%;
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

.ch-support-wrapper #ch-support-locations:hover {
    scrollbar-color: rgba(255, 255, 255, 0.15) transparent;
}

.ch-support-wrapper #ch-support-locations::-webkit-scrollbar {
    width: 3px;
}

.ch-support-wrapper #ch-support-locations::-webkit-scrollbar-track {
    background: transparent;
}

.ch-support-wrapper #ch-support-locations::-webkit-scrollbar-thumb {
    background: transparent;
    border-radius: 999px;
}

.ch-support-wrapper #ch-support-locations:hover::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
}

/* ============================================================
   Distributor cards
   ============================================================ */

.ch-support-wrapper .support-location {
    background: var(--darktheme-black);
    border: 1px solid var(--ch-support-card-border);
    padding: var(--ch-support-card-padding);
    border-radius: 10px;
    backdrop-filter: blur(10px);
}

.ch-support-wrapper .support-location .custom-title-4 {
    margin-top: 0;
}

.ch-support-wrapper .support-location-avatar {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ch-support-wrapper .support-location-icon {
    display: block;
    width: 32px;
    height: 40px;
}

.ch-support-wrapper .support-location-subtitle {
    font-size: 0.85rem;
    color: #f8cba0;
    text-align: center;
    margin-bottom: 8px;
}

.ch-support-wrapper .support-location-name {
    font-size: 1.25rem;
    font-family: var(--font-stack-heading);
    font-weight: 300;
    color: var(--darktheme-light-orange);
    margin: 0 0 0.75rem;
    text-align: center;
}

.ch-support-wrapper .support-location-address {
    font-size: 0.9rem;
    margin-top: 10px;
    border-bottom: 1px var(--darktheme-white) solid;
    cursor: pointer;
}

/* ============================================================
   Contacts
   ============================================================ */

.ch-support-wrapper .support-location-contacts {
    margin-top: 12px;
    font-size: 0.9rem;
}

.ch-support-wrapper .support-location-contact + .support-location-contact {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--ch-support-border-subtle);
}

.ch-support-wrapper .support-location-contact-name {
    margin-bottom: 10px;
    color: var(--darktheme-bg-lightest-gray);
}

.ch-support-wrapper .support-location-contact-name::before {
    background: url(/wp-content/uploads/2026/06/network-person.svg);
}

.support-location-phone::before {
    background: url(/wp-content/uploads/2026/06/network-phone.svg);
}

.support-location-email::before {
    background: url(/wp-content/uploads/2026/06/network-mail.svg);
}

.support-location-fax::before {
    background: url(/wp-content/uploads/2026/06/network-fax.svg);
}

.support-location-address::before {
    background: url(/wp-content/uploads/2026/06/network-location.svg);
    transform: translateY(5px);
}

.support-location-address {
    align-items: start !important;
    position: relative;
}

.support-location-address::after {
    content: "";
    width: 12px;
    height: 12px;
    display: block;
    background-size: contain;
    background-position: 50% 50%;
    background-repeat: no-repeat;
    background-image: url(/wp-content/uploads/2026/06/network-arrow.svg);
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
}

.ch-support-with-icon {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ch-support-with-icon::before {
    content: '';
    width: 18px;
    height: 18px;
    display: block;
    background-size: contain;
    background-position: 50% 50%;
    background-repeat: no-repeat;
}

/* ============================================================
   Links — phone, email, website
   ============================================================ */

.ch-support-wrapper .support-location-fax,
.ch-support-wrapper .support-location-phone,
.ch-support-wrapper .support-location-email,
.ch-support-wrapper .ch-support-website-link {
    margin-top: 4px;
    color: var(--darktheme-bg-lightest-gray);
    transition: color 0.2s ease;
    text-decoration: none;
}

.ch-support-wrapper .support-location-fax:hover,
.ch-support-wrapper .support-location-phone:hover,
.ch-support-wrapper .support-location-email:hover,
.ch-support-wrapper .ch-support-website-link:hover {
    color: #fe6b00;
}

.ch-support-wrapper .support-location-links {
    margin-top: 4px;
    font-size: 0.9rem;
}

.ch-support-wrapper .ch-support-website-link::before {
    background-image: url(/wp-content/uploads/2026/06/network-website.svg);
}

/* ============================================================
   Search & filters
   ============================================================ */

.ch-support-wrapper .ch-support-search {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ch-support-wrapper .ch-support-input input {
    width: 100%;
    padding: 12px 12px;
    border-radius: 8px;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-sizing: border-box;
    background: linear-gradient(to right, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.05));
    font-size: .9rem;
    color: white;
    margin-bottom: 10px;
}

.ch-support-wrapper .ch-support-input input::placeholder {
    color: var(--darktheme-bg-medium-gray);
}

.ch-support-wrapper .ch-support-office-type-filter {
    margin: 0;
    padding: 0;
    border: none;
    min-inline-size: 0;
}

.ch-support-wrapper .ch-support-office-type-legend {
    font-size: 0.85rem;
    margin-bottom: 6px;
    padding: 0;
    color: var(--darktheme-bg-lightest-gray);
}

.ch-support-wrapper .ch-support-office-type-options {
    display: flex;
    gap: 20px;
}

.ch-support-wrapper .ch-support-office-type-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    color: var(--darktheme-bg-lightest-gray);
}

.ch-support-wrapper .ch-support-office-type-option input:checked + span {
    color: var(--darktheme-light-orange);
}

.ch-support-wrapper .ch-support-office-type-checkbox {
    margin: 0;
    flex: 0 0 auto;
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid var(--darktheme-bg-light-gray);
    border-radius: 5px;
    background: transparent;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color 0.15s;
}

.ch-support-wrapper .ch-support-office-type-checkbox:checked::after {
    content: "";
    width: calc(100% - 5px);
    height: calc(100% - 5px);
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: var(--darktheme-bg-orange);
    border-radius: 3px;
}

/* ============================================================
   Empty / error state
   ============================================================ */

.ch-support-wrapper .ch-support-search-error {
    text-align: center;
    padding: 40px 10px;
    color: #767676;
}

/* ============================================================
   Map panel
   ============================================================ */

.ch-support-wrapper .ch-support-map-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    min-width: 0;
	z-index: 1;
}

.ch-support-wrapper .ch-support-map-zoom-hint {
    margin: 0 0 6px 0;
    font-size: 0.75rem;
    color: #767676;
    flex: 0 0 auto;
}

.ch-support-wrapper .ch-support-map-wrap {
    position: relative;
    flex: 1;
    min-height: 0;
}

.ch-support-wrapper #ch-support-map {
	border-radius: 10px;
    height: 100%;
    width: 100%;
}

.leaflet-popup-content-wrapper, .leaflet-popup-tip {
    background: var(--darktheme-black);
    color: var(--darktheme-white);
    box-shadow: 0 3px 14px rgba(0,0,0,0.4);
}

/* ============================================================
   Map scroll overlay
   ============================================================ */

.ch-support-map-overlay {
    position: absolute;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    transition: background 0.2s ease, backdrop-filter 0.2s ease;
    cursor: default;
}

.ch-support-map-overlay:hover {
    background: rgba(33, 33, 33, 0.6);
    backdrop-filter: blur(2px);
    cursor: pointer;
}

.ch-support-map-overlay.is-hidden {
    display: none;
}

.ch-support-map-activate {
    padding: 10px 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    background: #353535;
    color: var(--darktheme-bg-lightest-gray);
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.ch-support-map-overlay:hover .ch-support-map-activate {
    opacity: 1;
}

/* ============================================================
   Markers
   ============================================================ */

.ch-support-marker {
    background: transparent;
    border: none;
}

.ch-support-marker--main_ch_office {
    z-index: 1000 !important;
}

.ch-support-marker-svg {
    display: block;
    width: 32px;
    height: 40px;
}

/* ============================================================
   Map zoom interactions on card
   ============================================================ */

.ch-support-wrapper .support-location-address.map-zoomin,
.ch-support-wrapper .support-location-name.map-zoomin {
    cursor: pointer;
}

/* ============================================================
   Leaflet popup
   ============================================================ */

.leaflet-popup-content {
    font-size: .9rem;
}

.leaflet-popup-content .ch-support-popup {
    margin: 0;
}

.leaflet-popup-content .ch-support-popup strong {
    display: block;
    margin-bottom: 4px;
}

.support-popup-title {
    margin: 1rem 0 .5rem !important;
    color: var(--darktheme-light-orange);
}

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

@media screen and (max-width: 767px) {
    .ch-support-wrapper .ch-support-map-wrap {
        height: var(--ch-support-map-height-mobile);
        flex: auto;
    }

    .ch-support-wrapper {
        flex-direction: column-reverse;
        height: auto;
    }

}

