/* Park Mall Interactive Map — Public Styles */
.pm-map {
    position: relative;
    width: 100%;
    border: 1px solid var(--pm-border, #e5e7eb);
    border-radius: 8px;
    overflow: hidden;
    background: var(--pm-bg-light, #f9fafb);
}

/* Loading overlay — shown while the SVG map is fetched */
.pm-map__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-height: 320px;
    color: var(--pm-text-secondary, #6b7280);
    font-size: 0.875rem;
}

/* CSS border-based spinner matching the theme design language */
.pm-map__spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid rgba(201, 168, 76, 0.25);
    border-top-color: var(--pm-accent, #c9a84c);
    border-radius: 50%;
    animation: pm-map-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes pm-map-spin {
    to { transform: rotate(360deg); }
}

/* Controls Bar */
.pm-map__controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    background: var(--pm-white, #fff);
    border-bottom: 1px solid var(--pm-border, #e5e7eb);
    flex-wrap: wrap;
}

/* Floor Tabs */
.pm-map__floor-tabs {
    display: flex;
    gap: 0.25rem;
}
.pm-map__floor-tab {
    padding: 0.4rem 1rem;
    border: 1px solid var(--pm-border, #e5e7eb);
    border-radius: 4px;
    background: var(--pm-white, #fff);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--pm-text-secondary, #6b7280);
    cursor: pointer;
    transition: all 0.2s ease;
}
.pm-map__floor-tab:hover {
    border-color: var(--pm-accent, #c9a84c);
    color: var(--pm-accent, #c9a84c);
}
.pm-map__floor-tab--active {
    background: var(--pm-accent, #c9a84c);
    border-color: var(--pm-accent, #c9a84c);
    color: var(--pm-white, #fff);
}

/* Search */
.pm-map__search {
    position: relative;
    flex: 1;
    min-width: 200px;
    max-width: 300px;
}
.pm-map__search-input {
    width: 100%;
    padding: 0.4rem 0.75rem;
    border: 1px solid var(--pm-border, #e5e7eb);
    border-radius: 4px;
    font-size: 0.8125rem;
}
.pm-map__search-input:focus {
    outline: none;
    border-color: var(--pm-accent, #c9a84c);
    box-shadow: 0 0 0 2px rgba(201, 168, 76, 0.15);
}
.pm-map__search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 10;
    background: var(--pm-white, #fff);
    border: 1px solid var(--pm-border, #e5e7eb);
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 240px;
    overflow-y: auto;
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.pm-map__search-results[hidden] {
    display: none;
}
.pm-map__search-item {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.pm-map__search-item:hover,
.pm-map__search-item--active {
    background: var(--pm-bg-light, #f9fafb);
}
.pm-map__search-item-logo {
    width: 24px;
    height: 24px;
    object-fit: contain;
    border-radius: 2px;
}

/* Zoom Controls */
.pm-map__zoom-controls {
    display: flex;
    gap: 0.25rem;
    margin-left: auto;
}
.pm-map__zoom-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--pm-border, #e5e7eb);
    border-radius: 4px;
    background: var(--pm-white, #fff);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}
.pm-map__zoom-btn:hover {
    border-color: var(--pm-accent, #c9a84c);
    color: var(--pm-accent, #c9a84c);
}

/* Canvas */
.pm-map__canvas {
    position: relative;
    height: var(--pm-map-height, 600px);
    overflow: hidden;
    cursor: grab;
}
.pm-map__canvas:active {
    cursor: grabbing;
}
.pm-map__svg-container {
    width: 100%;
    height: 100%;
    transform-origin: 0 0;
    transition: transform 0.15s ease;
}
.pm-map__svg-container svg {
    width: 100%;
    height: 100%;
}

/* Store Markers */
.pm-map__marker {
    cursor: pointer;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.pm-map__marker:hover {
    transform: scale(1.2);
}
.pm-map__marker--highlighted {
    animation: pm-map-pulse 1.5s ease infinite;
}
@keyframes pm-map-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.3); opacity: 0.7; }
}
.pm-map__marker--dimmed {
    opacity: 0.3;
}

/* Tooltip */
.pm-map__tooltip {
    position: absolute;
    z-index: 20;
    padding: 0.5rem 0.75rem;
    background: var(--pm-primary, #1a1a2e);
    color: var(--pm-white, #fff);
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    pointer-events: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: translate(-50%, -100%);
    margin-top: -8px;
}
.pm-map__tooltip[hidden] {
    display: none;
}
.pm-map__tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: var(--pm-primary, #1a1a2e);
}

/* Legend */
.pm-map__legend {
    padding: 0.75rem 1rem;
    background: var(--pm-white, #fff);
    border-top: 1px solid var(--pm-border, #e5e7eb);
}
.pm-map__legend-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--pm-text-secondary, #6b7280);
    margin: 0 0 0.5rem;
}
.pm-map__legend-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}
.pm-map__legend-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.75rem;
    cursor: pointer;
}
.pm-map__legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.pm-map__legend-item--inactive .pm-map__legend-dot {
    opacity: 0.3;
}

/* Info Panel */
.pm-map__info-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 320px;
    max-width: 90%;
    height: 100%;
    background: var(--pm-white, #fff);
    border-left: 1px solid var(--pm-border, #e5e7eb);
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.06);
    z-index: 30;
    overflow-y: auto;
    padding: 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}
.pm-map__info-panel[hidden] {
    display: none;
}
.pm-map__info-panel--open {
    transform: translateX(0);
}
.pm-map__info-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: var(--pm-bg-light, #f9fafb);
    border-radius: 50%;
    font-size: 1.125rem;
    cursor: pointer;
}
.pm-map__info-content h3 {
    font-family: var(--pm-font-heading, 'Playfair Display', serif);
    font-size: 1.125rem;
    margin: 0 0 0.75rem;
}
.pm-map__info-logo {
    max-width: 100px;
    height: auto;
    margin-bottom: 0.75rem;
}
.pm-map__info-thumbnail {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}
.pm-map__info-meta {
    list-style: none;
    margin: 0;
    padding: 0;
}
.pm-map__info-meta li {
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--pm-border, #e5e7eb);
    font-size: 0.8125rem;
    display: flex;
    justify-content: space-between;
}
.pm-map__info-meta li:last-child {
    border-bottom: none;
}
.pm-map__info-link {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1.25rem;
    background: var(--pm-accent, #c9a84c);
    color: var(--pm-white, #fff);
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.8125rem;
    font-weight: 500;
    transition: background 0.2s ease;
}
.pm-map__info-link:hover {
    background: var(--pm-accent-dark, #b8963f);
}

/* Loading */
.pm-map--loading .pm-map__canvas::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .pm-map__controls {
        gap: 0.5rem;
        padding: 0.5rem;
    }
    .pm-map__search {
        order: 3;
        max-width: none;
        width: 100%;
    }
    .pm-map__info-panel {
        width: 100%;
    }
}
