/* NIDFIL Map - Specialist Map & Search Styles */

.dsgmp-wrapper {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: visible;
    position: relative;
    padding-bottom: 20px;
    /* Safe area on notched phones */
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
}

/* Top Search Bar — above map tiles, but below global modals */
.dsgmp-search-bar {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    overflow: visible;
    position: relative;
    z-index: 30;
    isolation: isolate;
}

.dsgmp-search-bar-inner {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1340px;
    width: 100%;
    box-sizing: border-box;
    margin: 0 auto;
    background: #fff;
    padding: 16px 22px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.06);
    overflow: visible;
}

.dsgmp-search-primary-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px 14px;
    width: 100%;
    max-width: min(1200px, 100%);
    margin-left: auto;
    margin-right: auto;
    overflow: visible;
}

/* Distance line directly under specialist name in map popup */
.dsgmp-info-window .dsgmp-info-distance {
    margin: 2px 0 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #f97316;
}

.dsgmp-search-field-dropdown {
    flex: 0 1 280px;
    min-width: 200px;
    max-width: 300px;
    width: min(300px, 100%);
    position: relative;
}

.dsgmp-select {
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0 40px 0 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.2;
    color: #333;
    background-color: #fff;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dsgmp-select:focus,
.dsgmp-select:active,
.dsgmp-select.has-value {
    outline: none;
    border-color: #FFB84D;
    box-shadow: 0 0 0 2px rgba(255, 184, 77, 0.15);
}

.dsgmp-search-field-location {
    flex: 1 1 480px;
    position: relative;
    min-width: 220px;
    max-width: 640px;
    width: min(640px, 100%);
}

/* Only native <input> — do not apply padding/border to gmp-place-autocomplete (breaks shadow UI). */
input.dsgmp-location-input {
    width: 100%;
    height: 48px;
    padding: 13px 45px 13px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    color: #333;
    background-color: #fff;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

input.dsgmp-location-input:focus {
    outline: none;
    border-color: #FF9500;
    box-shadow: 0 0 0 2px rgba(255, 149, 0, 0.1);
}

input.dsgmp-location-input::placeholder {
    color: #999;
}

/* Google widget already includes icons — hide duplicate pin overlay */
.dsgmp-search-field-location.dsgmp-has-place-autocomplete .dsgmp-location-icon {
    display: none;
}

/*
 * PlaceAutocompleteElement: border lives inside shadow (.input-container). Host must stay chrome-less
 * or it stacks as a “double” box. Shadow styles: nidfil-gmp-place-autocomplete-shadow-patch.js.
 */
.dsgmp-search-field-location gmp-place-autocomplete {
    display: block;
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
    border: none;
    background: transparent;
    box-shadow: none;
    min-height: 0;
    color-scheme: light;
    --gmp-mat-color-surface: #ffffff;
    --gmp-mat-color-on-surface: #1a1a2e;
    --gmp-mat-color-on-surface-variant: #64748b;
    --gmp-mat-color-primary: #f97316;
    --gmp-mat-color-outline-decorative: #e0e0e0;
}

/* Fallback when shadow patch does not run (closed shadow) */
.dsgmp-search-field-location gmp-place-autocomplete::part(input) {
    color: #1a1a2e;
    -webkit-text-fill-color: #1a1a2e;
    caret-color: #1a1a2e;
    font-size: 16px;
}

.dsgmp-location-icon {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #666;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dsgmp-btn-search {
    flex: 0 0 auto;
    padding: 13px 28px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #FF9500;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    white-space: nowrap;
    box-shadow: 0 2px 4px rgba(255, 149, 0, 0.2);
}

.dsgmp-btn-search:hover {
    background: #e8850e;
    box-shadow: 0 3px 6px rgba(255, 149, 0, 0.3);
    transform: translateY(-1px);
}

.dsgmp-btn-search:disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.dsgmp-search-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Main Container: Map + Results Panel */
.dsgmp-map-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 1340px;
    box-sizing: border-box;
    height: 700px !important;
    margin: 20px auto;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.08), 0 1px 3px rgba(15, 23, 42, 0.06);
}

/* Wrapper that holds the OSM iframe + Google Maps canvas */
.dsgmp-map-area {
    flex: 0 0 66.666%;
    width: 66.666%;
    min-height: 600px;
    height: 100%;
    position: relative;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    overflow: hidden;
    background: #e8e8e8;
    /* neutral while loading */
}

/* Map-only loading while searching (list panel stays as-is). */
.dsgmp-map-area.dsgmp-map-area-searching::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 4;
    /* Subtle dim only; strong tints looked like a broken map overlay. */
    background: rgba(255, 255, 255, 0.08);
    pointer-events: none;
}

.dsgmp-map-area.dsgmp-map-area-searching .dsgmp-map-searching-spinner {
    opacity: 1;
    visibility: visible;
}

.dsgmp-map-searching-spinner {
    position: absolute;
    right: 14px;
    bottom: 52px;
    z-index: 5;
    width: 40px;
    height: 40px;
    border: 3px solid rgba(249, 115, 22, 0.25);
    border-top-color: #f97316;
    border-radius: 50%;
    animation: dsgmp-spin 0.8s linear infinite;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    background: rgba(255, 255, 255, 0.92);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.dsgmp-map {
    flex: 0 0 66.666%;
    width: 66.666%;
    min-height: 500px;
    height: 100%;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    overflow: hidden;
}

.dsgmp-results-panel-wrapper {
    flex: 0 0 33.333%;
    width: 33.333%;
    background: #fff;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.dsgmp-results-panel {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    height: 100%;
    box-sizing: border-box;
    position: relative;
}

/* In-panel fetch overlay: keeps existing cards visible while updating (no full list wipe). */
.dsgmp-results-panel.dsgmp-results-fetching {
    min-height: 120px;
}

.dsgmp-results-fetch-overlay {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(2px);
    border-radius: 8px;
    pointer-events: none;
}

.dsgmp-results-fetch-overlay .dsgmp-loading-state {
    padding: 24px 16px;
}

.dsgmp-results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dsgmp-results-radius-note {
    font-size: 13px;
    line-height: 1.5;
    color: #92400e;
    background: linear-gradient(135deg, #fffbeb 0%, #fef9c3 100%);
    border: 1px solid #fde047;
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 4px;
    box-shadow: 0 1px 2px rgba(234, 179, 8, 0.12);
}

.dsgmp-results-loading {
    min-height: 120px;
    justify-content: center;
    align-items: center;
}

.dsgmp-loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    gap: 16px;
}

.dsgmp-loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e2e8f0;
    border-top-color: #f97316;
    border-radius: 50%;
    animation: dsgmp-spin 0.8s linear infinite;
}

.dsgmp-loading-text {
    margin: 0;
    font-size: 15px;
    color: #64748b;
}

@keyframes dsgmp-spin {
    to {
        transform: rotate(360deg);
    }
}

.dsgmp-no-results {
    text-align: center;
    padding: 48px 20px;
    color: #64748b;
    background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
    border-radius: 10px;
    border: 1px dashed #e2e8f0;
}

.dsgmp-no-results p {
    font-size: 15px;
    line-height: 1.55;
    margin: 0 0 16px 0;
    color: #334155;
    max-width: 28em;
    margin-left: auto;
    margin-right: auto;
}

.dsgmp-view-more {
    display: inline-block;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    cursor: pointer;
    color: #f97316;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.2s ease;
}

.dsgmp-view-more:hover {
    color: #ea580c;
    text-decoration: underline;
}

/* Result Items */
.dsgmp-result-item {
    background: #fff;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    cursor: pointer;
}

.dsgmp-result-item:hover {
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    border-color: rgba(249, 115, 22, 0.45);
    transform: translateY(-1px);
}

.dsgmp-result-item-inner {
    display: flex;
    gap: 15px;
}

.dsgmp-result-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.dsgmp-result-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e0e0e0;
}

.dsgmp-result-avatar-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #e0e0e0;
    color: #999;
}

.dsgmp-result-avatar-placeholder svg {
    width: 30px;
    height: 30px;
}

.dsgmp-result-content {
    flex: 1;
    min-width: 0;
}

.dsgmp-result-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
}

.dsgmp-result-header-main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
}

.dsgmp-result-header h4 {
    margin: 0;
    font-size: 17px;
    color: #333;
    font-weight: 600;
    flex: 0 1 auto;
    min-width: 0;
    text-align: start;
}

.dsgmp-plan-badge--pro {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    line-height: 0;
}

.dsgmp-btn-view-on-map.is-disabled,
.dsgmp-btn-view-on-map[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}

.dsgmp-info-window .dsgmp-info-name {
    margin-right: 6px;
    display: inline-block;
    vertical-align: middle;
}

.dsgmp-info-window .dsgmp-plan-badge--pro {
    display: inline-flex;
    vertical-align: middle;
}

.dsgmp-result-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
}

.dsgmp-btn-favorite {
    width: 34px;
    height: 34px;
    border: 1px solid #e0e0e0;
    border-radius: 999px;
    background: #fff;
    color: #999;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.dsgmp-btn-favorite:hover {
    border-color: #FF9500;
    color: #FF9500;
}

.dsgmp-btn-favorite.is-active {
    border-color: #FF9500;
    background: #fff5e8;
    color: #FF9500;
}

.dsgmp-btn-favorite.is-loading {
    opacity: 0.6;
    cursor: wait;
}

.dsgmp-rating {
    color: #FFA500;
    font-weight: 600;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.dsgmp-distance {
    color: #666;
    font-size: 13px;
}

.dsgmp-result-company {
    color: #666;
    font-size: 14px;
    margin: 0 0 10px 0;
    font-style: italic;
}

.dsgmp-result-specialty {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    text-align: start;
}

.dsgmp-result-location {
    margin: 6px 0;
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
}

.dsgmp-btn-view-on-map {
    margin-top: 12px;
    padding: 10px 18px;
    background: #FF9500;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    width: 100%;
}

.dsgmp-btn-view-on-map:hover {
    background: #e8850e;
}

/* Info Window Styles — compact card (maxWidth set in nidfil-map.js InfoWindow) */
.dsgmp-info-window {
    padding: 6px 8px 6px;
    width: 260px;
    max-width: 260px;
    height: auto;
    box-sizing: border-box;
    white-space: normal;
    overflow: hidden;
}

.dsgmp-info-avatar-wrapper {
    text-align: center;
    margin-bottom: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dsgmp-info-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #FF9500;
    display: block;
    margin: 0 auto;
}

.dsgmp-info-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid #FF9500;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #999;
}

.dsgmp-info-avatar-placeholder svg {
    width: 24px;
    height: 24px;
}

.dsgmp-info-window h4 {
    margin: 0 0 2px 0;
    font-size: 14px;
    line-height: 1.2;
    color: #333;
    font-weight: 600;
    text-align: center;
}

.dsgmp-info-window .dsgmp-info-company {
    margin: 0 0 3px 0;
    color: #666;
    font-style: italic;
    font-size: 11px;
    line-height: 1.25;
}

.dsgmp-info-window p {
    margin: 1px 0;
    font-size: 11px;
    line-height: 1.28;
    color: #333;
    word-wrap: break-word;
    word-break: break-word;
}

.dsgmp-info-window .dsgmp-info-rating {
    color: #FFA500;
    font-weight: 600;
}

.dsgmp-info-window .dsgmp-info-rating svg {
    width: 12px;
    height: 12px;
    vertical-align: -2px;
    margin-left: 2px;
}

.dsgmp-info-actions {
    margin-top: 5px;
    padding-top: 5px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dsgmp-info-actions-row {
    display: flex;
    gap: 4px;
}

.dsgmp-info-btn {
    flex: 1;
    padding: 5px 6px;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
}

.dsgmp-info-btn svg {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}

.dsgmp-btn-call {
    background: #FF6B36;
    color: white;
}

.dsgmp-btn-call:hover {
    background: #e55a2a;
}

.dsgmp-btn-chat {
    background: #FF6B36;
    color: white;
}

.dsgmp-btn-chat:hover {
    background: #e55a2a;
}

.dsgmp-btn-view-profile {
    width: 100%;
    padding: 5px 8px;
    background: #FF9500;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.dsgmp-btn-view-profile:hover {
    background: #e8850e;
}

.dsgmp-btn-view-profile.dsgmp-btn-secondary {
    background: #f0f0f0;
    color: #333;
}

.dsgmp-btn-view-profile.dsgmp-btn-secondary:hover {
    background: #e0e0e0;
}

/* Less vertical chrome on the default Google InfoWindow (scoped to map) */
#dsgmp-map .gm-style-iw-c {
    padding: 0 !important;
}

#dsgmp-map .gm-ui-hover-effect {
    width: 32px !important;
    height: 32px !important;
}

#dsgmp-map .gm-ui-hover-effect>span {
    margin: 4px !important;
    width: 18px !important;
    height: 18px !important;
}

/*
 * Mobile: Maps API sets very small inline max-height on .gm-style-iw-c / .gm-style-iw-d
 * (~190px), so the specialist card scrolls inside the bubble. Allow enough height for
 * avatar + text + buttons without a nested scrollbar.
 */
@media (max-width: 768px) {

    #dsgmp-map .gm-style-iw,
    #dsgmp-map .gm-style-iw-c,
    #dsgmp-map .gm-style-iw-d {
        max-height: min(520px, 88vh) !important;
    }

    #dsgmp-map .gm-style-iw-d {
        overflow-y: visible !important;
        overflow: visible !important;
    }

    .dsgmp-search-bar-inner {
        flex-direction: column;
        gap: 12px;
        padding: 12px 14px;
    }

    .dsgmp-search-primary-row {
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        max-width: 100%;
        gap: 12px;
    }

    .dsgmp-search-field-dropdown,
    .dsgmp-search-field-location {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .dsgmp-btn-search {
        width: 100%;
        justify-content: center;
    }
}

/* Google Places Autocomplete z-index */
.pac-container {
    z-index: 1200 !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .dsgmp-map-container {
        flex-direction: column;
        height: auto !important;
        min-height: 550px;
        margin-left: 12px;
        margin-right: 12px;
        width: calc(100% - 24px);
    }

    .dsgmp-map-area {
        flex: none;
        width: 100%;
        min-height: 550px;
        height: auto;
        border-radius: 8px 8px 0 0;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .dsgmp-map {
        flex: none;
        width: 100%;
        min-height: 550px;
        height: auto;
        border-radius: 8px 8px 0 0;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }

    .dsgmp-results-panel-wrapper {
        flex: none;
        width: 100%;
        height: 550px;
        min-height: 550px;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        max-height: none;
        border-radius: 0 0 8px 8px;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .dsgmp-results-panel {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        height: 100%;
    }

    /* 16px+ avoids iOS Safari zooming inputs on focus */
    .dsgmp-select,
    input.dsgmp-location-input,
    .dsgmp-search-field-location gmp-place-autocomplete,
    .dsgmp-btn-search {
        font-size: 16px;
    }

    .dsgmp-search-bar-inner {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 14px;
        max-width: 100%;
    }

    .dsgmp-search-primary-row {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: stretch;
        justify-content: space-between;
        max-width: 100%;
        gap: 12px;
    }

    .dsgmp-search-field-dropdown,
    .dsgmp-search-field-location {
        flex: 1 1 320px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }

    .dsgmp-btn-search {
        flex: 0 0 auto;
        width: auto;
        min-width: 140px;
        justify-content: center;
        white-space: nowrap;
    }

    .dsgmp-map-container {
        flex-direction: column;
        height: auto !important;
        min-height: 550px;
        margin-left: 10px;
        margin-right: 10px;
        width: calc(100% - 20px);
    }

    /* Map and results panel — equal height */
    .dsgmp-map-area,
    .dsgmp-map {
        flex: none;
        width: 100%;
        min-height: 550px;
        height: auto;
    }

    .dsgmp-results-panel-wrapper {
        flex: none;
        width: 100%;
        height: 550px;
        min-height: 550px;
        max-height: none;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .dsgmp-results-panel {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        height: 100%;
        padding: 12px;
        min-width: 0;
    }

    /* Specialist list cards — tighter, cleaner on phones/tablets */
    .dsgmp-results-list {
        gap: 10px;
    }

    .dsgmp-result-item {
        padding: 12px;
        border-radius: 5px;
    }

    .dsgmp-result-item:hover {
        transform: none;
    }

    .dsgmp-result-item-inner {
        gap: 10px;
        align-items: flex-start;
    }

    .dsgmp-result-avatar,
    .dsgmp-result-avatar img,
    .dsgmp-result-avatar-placeholder {
        width: 48px;
        height: 48px;
    }

    .dsgmp-result-avatar-placeholder svg {
        width: 24px;
        height: 24px;
    }

    .dsgmp-result-header {
        margin-bottom: 6px;
        gap: 6px;
    }

    .dsgmp-result-header h4 {
        font-size: 15px;
        line-height: 1.25;
        font-weight: 600;
    }

    .dsgmp-result-meta {
        gap: 2px;
    }

    .dsgmp-rating {
        font-size: 13px;
    }

    .dsgmp-rating svg {
        width: 13px;
        height: 13px;
    }

    .dsgmp-result-specialty {
        margin: 0 0 6px 0;
        font-size: 13px;
        line-height: 1.35;
    }

    .dsgmp-result-location {
        margin: 3px 0;
        font-size: 12px;
        line-height: 1.35;
    }

    .dsgmp-result-location svg {
        width: 14px;
        height: 14px;
        margin-right: 4px !important;
        flex-shrink: 0;
    }

    .dsgmp-btn-view-on-map {
        margin-top: 8px;
        padding: 8px 12px;
        font-size: 13px;
        border-radius: 5px;
    }

    .dsgmp-info-window {
        max-width: 260px !important;
        width: 260px !important;
        overflow: hidden !important;
    }
}

@media (max-width: 480px) {
    .dsgmp-search-bar {
        padding: 8px 10px;
    }

    .dsgmp-search-bar-inner {
        padding: 10px 12px;
        gap: 10px;
    }

    .dsgmp-select {
        height: 48px;
        min-height: 48px;
        padding: 0 40px 0 14px;
        line-height: 1.2;
    }

    input.dsgmp-location-input {
        padding: 12px 42px 12px 14px;
    }

    .dsgmp-btn-search {
        padding: 12px 18px;
    }

    .dsgmp-map-container {
        flex-direction: column;
        height: auto !important;
        min-height: 550px;
        margin-left: 8px;
        margin-right: 8px;
        width: calc(100% - 16px);
        border-radius: 6px;
    }

    .dsgmp-map-area,
    .dsgmp-map {
        flex: none;
        min-height: 550px;
        height: auto;
    }

    .dsgmp-results-panel-wrapper {
        flex: none;
        height: 550px;
        min-height: 550px;
        max-height: none;
        overflow: hidden;
        display: flex;
        flex-direction: column;
    }

    .dsgmp-results-panel {
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
        height: 100%;
        padding: 10px;
    }

    .dsgmp-results-list {
        gap: 8px;
    }

    .dsgmp-result-item {
        padding: 10px 10px;
        min-width: 0;
    }

    .dsgmp-result-item-inner {
        gap: 8px;
    }

    .dsgmp-result-avatar,
    .dsgmp-result-avatar img,
    .dsgmp-result-avatar-placeholder {
        width: 44px;
        height: 44px;
    }

    .dsgmp-result-avatar-placeholder svg {
        width: 22px;
        height: 22px;
    }

    .dsgmp-result-header {
        flex-direction: column;
        margin-bottom: 4px;
    }

    .dsgmp-result-header h4 {
        font-size: 14px;
    }

    .dsgmp-result-meta {
        align-items: flex-start;
        margin-top: 4px;
    }

    .dsgmp-rating {
        font-size: 12px;
    }

    .dsgmp-result-specialty {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .dsgmp-result-location {
        font-size: 11px;
        margin: 2px 0;
    }

    .dsgmp-btn-view-on-map {
        margin-top: 6px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .dsgmp-info-window {
        width: 230px !important;
        max-width: 230px !important;
        padding: 6px 8px 6px !important;
        overflow: hidden !important;
        box-sizing: border-box !important;
    }

    .dsgmp-info-window h4,
    .dsgmp-info-window p {
        word-break: break-word;
        overflow-wrap: break-word;
    }
}

/* Larger tap targets for info window actions on touch devices */
@media (max-width: 768px) and (pointer: coarse) {

    .dsgmp-info-btn,
    .dsgmp-btn-view-profile {
        min-height: 40px;
        padding-top: 8px;
        padding-bottom: 8px;
    }
}

/* ── Google Maps Info Window — fixed width, no overflow ── */
.gm-style-iw {
    max-width: 260px !important;
    min-width: 260px !important;
    width: 260px !important;
    overflow: hidden !important;
}

.gm-style-iw-c {
    max-width: 260px !important;
    min-width: 260px !important;
    max-height: none !important;
    min-width: 0 !important;
}

.gm-style-iw-d {
    overflow: auto !important;
    overflow-x: hidden !important;
    max-width: 260px !important;
    scrollbar-width: none !important;
}

.dsgmp-info-window {
    width: 260px !important;
    max-width: 260px !important;
    min-width: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

@media (max-width: 768px) {
    .gm-style-iw {
        max-width: 250px !important;
        min-width: 250px !important;
        width: 250px !important;
    }

    .gm-style-iw-c {
        max-width: 250px !important;
        min-width: 250px !important;
    }

    .gm-style-iw-d {
        max-width: 250px !important;
    }

    .dsgmp-info-window {
        width: 250px !important;
        max-width: 250px !important;
    }
}

@media (max-width: 480px) {
    .gm-style-iw {
        max-width: 230px !important;
        min-width: 230px !important;
        width: 230px !important;
    }

    .gm-style-iw-c {
        max-width: 230px !important;
        min-width: 230px !important;
    }

    .gm-style-iw-d {
        max-width: 230px !important;
    }

    .dsgmp-info-window {
        width: 230px !important;
        max-width: 230px !important;
    }
}