/* ── Nuvo Location Map v3.0 ─────────────────────────────────────────────────── */

/* ── Map view ────────────────────────────────────────────────────────────────── */
.nlm-container {
    display: flex;
    gap: 0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    min-height: var(--nlm-map-height, 500px);
    margin-bottom: 32px;
}

.nlm-map {
    flex: var(--nlm-map-flex, 60) 1 0%;
    min-height: var(--nlm-map-height, 500px);
    z-index: 1;
}

/* ── Card ────────────────────────────────────────────────────────────────────── */
.nlm-card {
    flex: 0 0 var(--nlm-card-width, 320px);
    background: #fff;
    display: flex;
    flex-direction: column;
    border-left: 1px solid #e8e8e8;
    position: relative;
    overflow: hidden;
    height: var(--nlm-map-height, 500px);
    max-height: var(--nlm-map-height, 500px);
}
.nlm-card--empty { background: #f7f8fa; }
.nlm-card__inner {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    height: 100%;
}
.nlm-card__hint { color: #aaa; font-size: 14px; margin: auto; text-align: center; line-height: 1.6; padding: 32px 24px; }

.nlm-card__featured { width: 100%; height: 160px; object-fit: cover; display: block; flex-shrink: 0; }

.nlm-card__body { padding: 20px 24px 28px; flex: 1; display: flex; flex-direction: column; overflow-y: auto; }

.nlm-card__group {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; color: #fff;
    padding: 3px 10px; border-radius: 5px;
    margin-bottom: 10px; width: fit-content;
}

.nlm-card__name { font-size: 18px; font-weight: 700; color: #1a1a2e; margin: 0 0 6px; line-height: 1.3; }
.nlm-card__divider { width: 36px; height: 3px; border-radius: 2px; margin: 0 0 16px; }

.nlm-card__details { display: flex; gap: 12px; align-items: flex-start; flex: 1; }
.nlm-card__rows { flex: 1; min-width: 0; }

.nlm-card__logo {
    flex-shrink: 0; width: 80px; max-height: 80px;
    object-fit: contain; border: 1px solid #f0f0f0;
    border-radius: 6px; padding: 6px; background: #fafafa;
    align-self: flex-start; margin-top: 2px;
}

.nlm-card__row { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; font-size: 13px; color: #444; line-height: 1.5; }
.nlm-card__icon { flex-shrink: 0; width: 16px; display: flex; align-items: flex-start; padding-top: 1px; color: #999; font-style: normal; }
.nlm-card__icon svg { display: block; flex-shrink: 0; }
.nlm-card__row a { color: #2271b1; text-decoration: none; word-break: break-all; }
.nlm-card__row a:hover { text-decoration: underline; }

.nlm-card__gmaps {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 14px; font-size: 13px; font-weight: 500;
    color: #2271b1; text-decoration: none;
}
.nlm-card__gmaps:hover { text-decoration: underline; }

.nlm-card.nlm-card--active .nlm-card__inner { animation: nlm-fadein 0.25s ease; }
@keyframes nlm-fadein { from { opacity:0; transform:translateY(6px); } to { opacity:1; transform:translateY(0); } }

/* ── Legend ──────────────────────────────────────────────────────────────────── */
.nlm-legend { background:#fff; border-radius:6px; padding:10px 14px; box-shadow:0 2px 8px rgba(0,0,0,0.15); font-size:12px; line-height:1.9; }
.nlm-legend-item { display:flex; align-items:center; gap:7px; white-space:nowrap; }
.nlm-legend-dot { width:10px; height:10px; border-radius:50%; flex-shrink:0; border:1px solid rgba(0,0,0,0.1); }

/* ── List view ───────────────────────────────────────────────────────────────── */
.nlm-list-wrap {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.nlm-list-search {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.nlm-postcode-input {
    flex: 1;
    min-width: 180px;
    max-width: 280px;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}
.nlm-postcode-input:focus { border-color: #ff5b00; box-shadow: 0 0 0 2px rgba(255,91,0,0.12); }

.nlm-postcode-btn {
    padding: 10px 18px;
    background: #ff5b00;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}
.nlm-postcode-btn:hover { background: #d94e00; }

.nlm-postcode-clear {
    padding: 10px 14px;
    background: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}
.nlm-postcode-clear:hover { background: #e0e0e0; }

.nlm-list-status {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
}
.nlm-list-status.error { color: #d63638; }

.nlm-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
}

.nlm-list-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.15s, transform 0.15s;
}
.nlm-list-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.12); transform: translateY(-2px); }

.nlm-list-card__img { width: 100%; height: 120px; object-fit: cover; display: block; }
.nlm-list-card__img-placeholder { width: 100%; height: 6px; display: block; }

.nlm-list-card__body { padding: 16px; }

.nlm-list-card__group {
    display: inline-block;
    font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; color: #fff;
    padding: 2px 8px; border-radius: 4px;
    margin-bottom: 8px;
}

.nlm-list-card__name { font-size: 15px; font-weight: 700; color: #1a1a2e; margin: 0 0 10px; line-height: 1.3; }

.nlm-list-card__row { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: #555; margin-bottom: 6px; line-height: 1.5; }
.nlm-list-card__icon { flex-shrink: 0; width: 14px; color: #aaa; padding-top: 1px; }
.nlm-list-card__icon svg { display: block; }
.nlm-list-card__row a { color: #2271b1; text-decoration: none; }
.nlm-list-card__row a:hover { text-decoration: underline; }

.nlm-list-card__distance {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 12px; font-weight: 600; color: #ff5b00;
    margin-top: 10px;
}

.nlm-list-card__footer {
    padding: 10px 16px;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}
.nlm-list-card__gmaps {
    font-size: 12px; font-weight: 500; color: #2271b1; text-decoration: none;
    display: inline-flex; align-items: center; gap: 5px;
}
.nlm-list-card__gmaps:hover { text-decoration: underline; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 680px) {
    .nlm-container { flex-direction: column; }
    .nlm-card { flex: 0 0 auto; border-left: none; border-top: 1px solid #e8e8e8; min-height: 220px; }
    .nlm-map  { min-height: 320px !important; }
    .nlm-card__featured { height: 120px; }
    .nlm-list { grid-template-columns: 1fr; }
}

/* ── In-card list panel ──────────────────────────────────────────────────────── */
.nlm-card__hint-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    padding: 32px 24px;
    gap: 16px;
}

.nlm-view-all-btn {
    background: #ff5b00;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    max-width: 200px;
}
.nlm-view-all-btn:hover { background: #d94e00; }

.nlm-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: #888;
    font-size: 12px;
    cursor: pointer;
    padding: 0 0 12px 0;
    margin: 0;
}
.nlm-back-btn:hover { color: #ff5b00; }

.nlm-list-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.nlm-list-panel__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px 10px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.nlm-list-panel__title {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a2e;
}

.nlm-list-panel__search {
    display: flex;
    gap: 6px;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}

.nlm-postcode-input {
    flex: 1;
    min-width: 0;
    padding: 7px 10px;
    border: 1px solid #ddd !important;
    border-radius: 5px;
    font-size: 12px;
    outline: none;
    color: #1a1a2e !important;
    background: #fff !important;
    -webkit-text-fill-color: #1a1a2e !important;
}
.nlm-postcode-input:focus { border-color: #ff5b00 !important; }

.nlm-postcode-btn {
    padding: 7px 12px;
    background: #ff5b00;
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}
.nlm-postcode-btn:hover { background: #d94e00; }

.nlm-postcode-clear {
    padding: 7px 10px;
    background: #f0f0f0;
    color: #555;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
}
.nlm-postcode-clear:hover { background: #e0e0e0; }

.nlm-list-panel__status {
    font-size: 11px;
    color: #888;
    padding: 4px 16px 0;
    flex-shrink: 0;
    min-height: 18px;
}
.nlm-list-panel__status--error { color: #d63638; }

.nlm-list-panel__items {
    flex: 1;
    overflow-y: auto;
    padding: 6px 0;
}

.nlm-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.1s;
}
.nlm-list-item:hover { background: #fef8f5; }
.nlm-list-item:last-child { border-bottom: none; }

.nlm-list-item__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    border: 1px solid rgba(0,0,0,0.1);
}

.nlm-list-item__info { flex: 1; min-width: 0; }

.nlm-list-item__name {
    font-size: 13px;
    font-weight: 600;
    color: #1a1a2e !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.nlm-list-item__addr {
    font-size: 11px;
    color: #888 !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.nlm-list-item__dist {
    font-size: 11px;
    font-weight: 600;
    color: #ff5b00;
    white-space: nowrap;
}

.nlm-list-item__gmaps {
    flex-shrink: 0;
    color: #aaa;
    line-height: 1;
    padding: 4px;
}
.nlm-list-item__gmaps:hover { color: #2271b1; }

/* Adjust card gmaps link */
.nlm-card__gmaps {
    display: inline-flex; align-items: center; gap: 6px;
    margin-top: 14px; font-size: 13px; font-weight: 500;
    color: #2271b1; text-decoration: none;
}
.nlm-card__gmaps:hover { text-decoration: underline; }
