/* ============================================================
   Oticon Branches Map - Styles
   Primary: #860B57
   ============================================================ */

.obm-container {
    display: flex;
    gap: 18px;
    height: 600px;
    border-radius: 12px;
    overflow: visible;
    box-shadow: none;
    font-family: 'Noto Sans Hebrew', sans-serif;
    direction: rtl;
}

/* ---- Right Panel: Search + List ---- */
.obm-panel-list {
    width: 40%;
    min-width: 360px;
    background: #fff;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    border: 1px solid #e8eaed;
    overflow: hidden;
}

.obm-search-wrapper {
    position: relative;
    padding: 16px 16px 12px 16px;
    border-bottom: 1px solid #e8eaed;
}

.obm-search-input {
    width: 100%;
    padding: 0.8rem 1rem !important;
    font-size: 15px;
    border: 2px solid #dadce0;
    border-radius: 150px !important;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    direction: rtl;
    box-sizing: border-box;
    font-family: 'Noto Sans Hebrew', sans-serif;
    background: #fafafa;
}

.obm-search-input:focus {
    border-color: #860B57;
    box-shadow: 0 0 0 3px rgba(134, 11, 87, 0.15);
    background: #fff;
}

.obm-search-spinner {
    position: absolute;
    left: 28px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    border: 2px solid #dadce0;
    border-top-color: #860B57;
    border-radius: 50%;
    animation: obm-spin 0.6s linear infinite;
}

@keyframes obm-spin {
    to { transform: translateY(-50%) rotate(360deg); }
}

/* ---- Branches List ---- */
.obm-branches-list {
    flex: 1;
    overflow-y: auto;
    padding: 8px;
    background: #F9F9F9;
}

.obm-branches-list::-webkit-scrollbar {
    width: 6px;
}

.obm-branches-list::-webkit-scrollbar-thumb {
    background: #c4c7cc;
    border-radius: 3px;
}

/* ---- Branch Card (compact) ---- */
.obm-branch-card {
    padding: 10px 14px;
    margin-bottom: 5px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    border: 1px solid transparent;
    background: #fff;
}

.obm-branch-card:hover {
    background: #fdf2f8;
    border-color: #e8c4d8;
}

.obm-branch-card.obm-active {
    background: #fce7f3;
    border-color: #860B57;
}

/* Header row: name (right) + nav button (left) */
.obm-branch-card .obm-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 3px;
}

.obm-branch-card .obm-branch-name {
    font-size: 20px;
    font-weight: 600;
    color: #202124;
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.obm-branch-card .obm-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #860B57;
    color: #fff;
    border: none;
    border-radius: 20px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s;
    font-family: 'Noto Sans Hebrew', sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
}

.obm-branch-card .obm-nav-btn:hover {
    background: #6B0946;
}

.obm-branch-card .obm-branch-address {
    font-size: 14px;
    color: #202124;
    line-height: 1.4;
}

.obm-branch-card .obm-branch-city {
    font-size: 14px;
    color: #202124;
    font-weight: 500;
}

.obm-branch-card .obm-branch-phone {
    font-size: 15px;
    color: #860B57;
    direction: ltr;
    display: inline-block;
}

.obm-branch-card .obm-branch-distance {
    font-size: 11px;
    color: #860B57;
    font-weight: 500;
    margin-top: 2px;
}

.obm-branch-card .obm-branch-nomap {
    font-size: 11px;
    color: #e37400;
    margin-top: 2px;
}

.obm-no-results {
    text-align: center;
    padding: 40px 20px;
    color: #9aa0a6;
    font-size: 15px;
    background: #F9F9F9;
}

.obm-branches-count {
    padding: 8px 16px;
    font-size: 12px;
    color: #9aa0a6;
    border-top: 1px solid #e8eaed;
    text-align: center;
    background: #F9F9F9;
}

/* ---- Left Panel: Map ---- */
.obm-panel-map {
    flex: 1;
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    border: 1px solid #e8eaed;
}

.obm-map {
    width: 100%;
    height: 100%;
}

/* ---- My Location Button ---- */
.obm-my-location-btn {
    position: absolute;
    bottom: 24px;
    left: 12px;
    background: #860B57;
    border: none;
    border-radius: 150px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.15);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Noto Sans Hebrew', sans-serif;
    color: #fff;
    white-space: nowrap;
    z-index: 1;
    transition: background 0.15s;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.obm-my-location-btn:hover {
    background: #6B0946;
}

.obm-my-location-btn.obm-locating {
    opacity: 0.7;
    pointer-events: none;
}

/* ---- Google Maps Info Window Overrides ---- */
.gm-style .gm-style-iw-c {
    padding: 12px !important;
    border-radius: 10px !important;
}

.gm-style .gm-style-iw-d {
    overflow: hidden !important;
    max-height: none !important;
}

.obm-info-window {
    direction: rtl;
    text-align: right;
    font-family: 'Noto Sans Hebrew', sans-serif;
    min-width: 200px;
}

.obm-info-window .obm-iw-name {
    font-size: 20px;
    font-weight: 700;
    color: #202124;
    margin-bottom: 6px;
}

.obm-info-window .obm-iw-address {
    font-size: 15px;
    color: #202124;
    margin-bottom: 2px;
    line-height: 1.4;
}

.obm-info-window .obm-iw-phone {
    font-size: 12px;
    color: #860B57;
    direction: ltr;
    display: inline-block;
    margin-bottom: 6px;
    margin-top: 4px;
}

.obm-info-window .obm-iw-nav-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 12px;
    background: #860B57;
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    margin-top: 4px;
    font-family: 'Noto Sans Hebrew', sans-serif;
}

.obm-info-window .obm-iw-nav-btn:hover {
    background: #6B0946;
    color: #fff;
    text-decoration: none;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .obm-container {
        flex-direction: column;
        height: auto;
        gap: 0;
        border-radius: 0;
        width: 100%;
        box-sizing: border-box;
    }

    .obm-panel-list {
        width: 100%;
        min-width: 0;
        max-height: none;
        border-radius: 0;
        box-shadow: none;
        border: none;
        border-bottom: 2px solid #e8eaed;
        box-sizing: border-box;
    }

    .obm-search-wrapper {
        padding: 12px 12px 8px 12px;
    }

    .obm-branches-list {
        max-height: 300px;
    }

    .obm-panel-map {
        flex: none;
        width: 100%;
        height: 350px;
        border-radius: 0;
        box-shadow: none;
        border: none;
    }

    .obm-my-location-btn {
        bottom: 12px;
        left: 8px;
        font-size: 13px;
        padding: 8px 16px;
    }
}

/* ---- Loading & Error States ---- */
.obm-loading,
.obm-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: #9aa0a6;
    font-size: 15px;
    font-family: 'Noto Sans Hebrew', sans-serif;
}

.obm-map-loading {
    background: #f8f9fa;
}

.obm-map-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: #fef7e0;
    color: #e37400;
    font-size: 14px;
    font-family: 'Noto Sans Hebrew', sans-serif;
    padding: 20px;
    text-align: center;
}
