/* NIDFIL Map - Specialist Map & Search Styles */

.dsgmp-wrapper {
    width: 100%;
    background: #fff;
    padding-bottom: 20px;
}

/* Top Search Bar */
.dsgmp-search-bar {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.dsgmp-search-bar-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    max-width: 1340px;
    margin: 0 auto;
    background: #fff;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.dsgmp-search-field-dropdown {
    flex: 0 0 300px;
    position: relative;
}

.dsgmp-select {
    width: 100%;
    padding: 13px 40px 13px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    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;
    position: relative;
    max-width: 600px;
}

.dsgmp-location-input {
    width: 100%;
    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;
}

.dsgmp-location-input:focus {
    outline: none;
    border-color: #FF9500;
    box-shadow: 0 0 0 2px rgba(255, 149, 0, 0.1);
}

.dsgmp-location-input::placeholder {
    color: #999;
}

.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;
    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;
    width: 100%;
    max-width: 1340px;
    margin: 20px auto;
    display: flex;
    flex-direction: row;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Wrapper that holds the OSM iframe + Google Maps canvas */
.dsgmp-map-area {
    flex: 0 0 66.666%;
    width: 66.666%;
    min-height: 500px;
    height: 100%;
    position: relative;
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    overflow: hidden;
    background: #e8e8e8; /* neutral while loading */
}

.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;
}

.dsgmp-results-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.dsgmp-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.dsgmp-no-results p {
    font-size: 16px;
    margin: 0 0 20px 0;
    color: #333;
}

.dsgmp-view-more {
    color: #FF9500;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    transition: color 0.3s ease;
}

.dsgmp-view-more:hover {
    color: #e8850e;
    text-decoration: underline;
}

/* Result Items */
.dsgmp-result-item {
    background: #fff;
    padding: 18px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.dsgmp-result-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #FF9500;
    transform: translateY(-2px);
}

.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 h4 {
    margin: 0;
    font-size: 17px;
    color: #333;
    font-weight: 600;
    flex: 1;
}

.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;
}

.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 */
.dsgmp-info-window {
    padding: 15px;
    min-width: 280px;
    max-width: 320px;
}

.dsgmp-info-avatar-wrapper {
    text-align: center;
    margin-bottom: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.dsgmp-info-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #FF9500;
    display: block;
    margin: 0 auto;
}

.dsgmp-info-avatar-placeholder {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #FF9500;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    color: #999;
}

.dsgmp-info-window h4 {
    margin: 0 0 8px 0;
    font-size: 17px;
    color: #333;
    font-weight: 600;
    text-align: center;
}

.dsgmp-info-window .dsgmp-info-company {
    margin: 0 0 10px 0;
    color: #666;
    font-style: italic;
    font-size: 14px;
}

.dsgmp-info-window p {
    margin: 6px 0;
    font-size: 13px;
    color: #333;
}

.dsgmp-info-window .dsgmp-info-rating {
    color: #FFA500;
    font-weight: 600;
}

.dsgmp-info-actions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #eee;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dsgmp-info-actions-row {
    display: flex;
    gap: 8px;
}

.dsgmp-info-btn {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.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: 10px;
    background: #FF9500;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    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;
}

/* Google Places Autocomplete z-index */
.pac-container {
    z-index: 999999 !important;
}

/* Responsive */
@media (max-width: 1024px) {
    .dsgmp-map-container {
        flex-direction: column;
    }
    .dsgmp-map-area,
    .dsgmp-map {
        flex: 0 0 60%;
        width: 100%;
        min-height: 400px;
    }
    .dsgmp-results-panel-wrapper {
        flex: 0 0 40%;
        width: 100%;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .dsgmp-search-bar-inner {
        flex-direction: column;
        gap: 12px;
    }
    .dsgmp-search-field-dropdown,
    .dsgmp-search-field-location {
        flex: 1 1 100%;
        width: 100%;
        max-width: 100%;
    }
    .dsgmp-btn-search {
        width: 100%;
        justify-content: center;
    }
    .dsgmp-map-area,
    .dsgmp-map {
        flex: 0 0 50%;
        width: 100%;
        min-height: 350px;
    }
    .dsgmp-results-panel-wrapper {
        flex: 0 0 50%;
        width: 100%;
        max-height: 350px;
    }
    .dsgmp-results-panel {
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .dsgmp-search-bar {
        padding: 12px 15px;
    }
    .dsgmp-select,
    .dsgmp-location-input,
    .dsgmp-btn-search {
        font-size: 14px;
        padding: 10px 15px;
    }
    .dsgmp-result-item {
        padding: 15px;
    }
    .dsgmp-result-header {
        flex-direction: column;
    }
    .dsgmp-result-meta {
        align-items: flex-start;
        margin-top: 8px;
    }
}
