/* BioOne-inspired palette */
:root {
    --iml-primary: #ff6900;
    --iml-primary-dark: #d95a00;
    --iml-ink: #2b2b2b;
    --iml-ink-light: #4a4a4a;
    --iml-bg: #f6f2e8;
    --iml-panel: #ffffff;
    --iml-border: #dcd4c4;
    --iml-muted: #7a7a7a;
    --iml-card-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.iml-wrapper {
    width: 100%;
    display: grid;
    grid-template-columns: 420px 1fr;
    min-height: 720px;
    background: linear-gradient(135deg, #f6f2e8 0%, #f0eadc 100%);
    border: 1px solid var(--iml-border);
    overflow: hidden;
    font-family: "Barlow", "Helvetica Neue", Arial, sans-serif;
    color: var(--iml-ink);
}

.iml-panel {
    background: var(--iml-panel);
    border-right: 1px solid var(--iml-border);
    display: flex;
    flex-direction: column;
    max-height: 100vh;
}

.iml-panel__header {
    padding: 28px 24px 18px;
    border-bottom: 1px solid var(--iml-border);
    position: sticky;
    top: 0;
    z-index: 5;
    background: var(--iml-panel);
}

.iml-eyebrow {
    letter-spacing: 0.16em;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--iml-primary-dark);
    margin: 0 0 8px;
}

.iml-title {
    margin: 0 0 12px;
    font-weight: 700;
    font-size: 22px;
}

.iml-search {
    display: flex;
    gap: 8px;
}

.iml-search input {
    flex: 1;
    border: 1px solid var(--iml-border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    background: #faf8f3;
}

.iml-search input:focus {
    border-color: var(--iml-primary);
    box-shadow: 0 0 0 3px rgba(200, 216, 9, 0.2);
}

.iml-search__locate {
    border: 1px solid var(--iml-border);
    background: #fff;
    border-radius: 12px;
    padding: 0 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.iml-search__locate:hover {
    border-color: var(--iml-primary);
    color: var(--iml-primary-dark);
}

.iml-list {
    overflow-y: auto;
    padding: 12px 16px 24px;
    display: grid;
    gap: 12px;
}

.iml-card {
    border: 1px solid var(--iml-border);
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    box-shadow: var(--iml-card-shadow);
    display: grid;
    gap: 12px;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.iml-card:hover,
.iml-card.is-active {
    border-color: var(--iml-primary);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    transform: translateY(-1px);
}

.iml-card__meta {
    display: grid;
    gap: 4px;
}

.iml-card__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

.iml-card__distance {
    margin: 0;
    color: var(--iml-muted);
    font-size: 13px;
    letter-spacing: 0.01em;
}

.iml-card__address {
    margin: 6px 0 0;
    color: var(--iml-ink-light);
    line-height: 1.5;
}

.iml-card__phone {
    color: var(--iml-ink);
    font-weight: 600;
    text-decoration: none;
}

.iml-card__phone:hover {
    text-decoration: underline;
}

.iml-card__actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.iml-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid var(--iml-ink);
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.iml-btn--primary {
    background: var(--iml-primary);
    color: var(--iml-ink);
    border-color: var(--iml-primary-dark);
}

.iml-btn--primary:hover {
    background: var(--iml-primary-dark);
    color: #fff;
}

.iml-btn--ghost {
    background: #fff;
    color: var(--iml-ink);
}

.iml-btn--ghost:hover {
    border-color: var(--iml-primary);
    color: var(--iml-primary-dark);
}

.iml-map {
    position: relative;
    min-width: 0;
}

#iml-map-canvas {
    width: 100%;
    min-width: 100%;
    height: 100%;
    min-height: 720px;
}

.iml-map__badge {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--iml-border);
    border-radius: 10px;
    padding: 8px 12px;
    font-weight: 600;
    color: var(--iml-ink);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(6px);
}

.iml-infowindow {
    max-width: 280px;
}

.iml-infowindow__title {
    margin: 0 0 6px;
    font-size: 16px;
    font-weight: 700;
}

.iml-infowindow__address {
    margin: 0;
    color: var(--iml-ink-light);
    line-height: 1.4;
    font-size: 13px;
}

.iml-infowindow__phone {
    display: inline-block;
    margin-top: 8px;
    color: var(--iml-ink);
    font-weight: 600;
}

.iml-infowindow__actions {
    margin-top: 10px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.screen-reader-text {
    position: absolute;
    left: -9999px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 1024px) {
    .iml-wrapper {
        grid-template-columns: 1fr;
        grid-template-rows: 420px auto;
        min-height: auto;
    }

    #iml-map-canvas {
        min-height: 420px;
    }

    .iml-panel {
        max-height: none;
    }
}

@media (max-width: 680px) {
    .iml-panel__header {
        position: relative;
    }

    .iml-search {
        flex-direction: column;
    }

    .iml-card {
        padding: 14px;
    }

    .iml-wrapper {
        border-radius: 0;
    }
}
