/*
 * Property map marker popup (info window) - Zillow-style card with tier badge,
 * photo carousel, price, details, address, agency line, kebab menu.
 *
 * Hosted inside Google's <gm-info-window-content> shadow so external styles only
 * apply to the inner `.pmp-*` nodes. Keep rules flat and scoped; don't touch
 * google's own .gm-* classes (see feedback_gmaps_css memory).
 */

.pmp-card {
    width: 300px;
    max-width: 300px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    cursor: pointer;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: #1a1a1a;
    -webkit-font-smoothing: antialiased;
}

/* Photo carousel */
.pmp-gallery {
    position: relative;
    width: 100%;
    height: 190px;
    background: #eee;
    overflow: hidden;
}

.pmp-gallery-slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0;
    transition: opacity 220ms ease;
}

.pmp-gallery-slide.is-active {
    opacity: 1;
}

.pmp-gallery-empty {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #bbb;
}

/* Carousel dots */
.pmp-dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
    pointer-events: none;
}

.pmp-dots button {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    border: none;
    padding: 0;
    pointer-events: auto;
    cursor: pointer;
    transition: background-color 150ms ease, transform 150ms ease;
}

.pmp-dots button.is-active {
    background: #ffffff;
    transform: scale(1.25);
}

/* Carousel prev/next chevrons - only show when >1 photo */
.pmp-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 150ms ease;
}

.pmp-card:hover .pmp-nav {
    opacity: 1;
}

.pmp-nav.prev { left: 8px; }
.pmp-nav.next { right: 8px; }

.pmp-nav svg {
    width: 14px;
    height: 14px;
    color: #333;
}

/* Tier badge (top-left) */
.pmp-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #ffffff;
    background: var(--color-badge-premium);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
}

.pmp-badge.featured {
    background: var(--color-badge-featured);
    color: var(--color-badge-featured-text);
}

.pmp-badge.premium {
    background: var(--color-badge-premium);
}

.pmp-badge.basic {
    background: var(--color-badge-basic);
}

.pmp-badge svg {
    width: 11px;
    height: 11px;
}

/* Heart (top-right) */
.pmp-heart {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.pmp-heart svg {
    width: 16px;
    height: 16px;
    color: #333;
}

.pmp-heart:hover {
    background: #ffffff;
}

/* Filled state once the user saves the listing. Uses the brand-error red so it
   matches the search-card heart (Color.Error) the rest of the app uses. */
.pmp-heart.is-active svg {
    color: #d6334b;
    fill: #d6334b;
}

/* Content */
.pmp-body {
    padding: 14px 16px 12px 16px;
    position: relative;
}

.pmp-price {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 22px;
    font-weight: 600;
    line-height: 1.15;
    color: #1a1a1a;
    letter-spacing: -0.01em;
    margin: 0 0 4px 0;
}

.pmp-details {
    font-size: 13px;
    color: #444;
    line-height: 1.45;
    margin: 0 0 4px 0;
}

.pmp-address {
    font-size: 12.5px;
    color: #666;
    line-height: 1.4;
    margin: 0 0 4px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pmp-agency {
    font-size: 12px;
    color: #8a8a8a;
    font-style: italic;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Kebab (bottom-right of body) */
.pmp-kebab {
    position: absolute;
    right: 8px;
    bottom: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

.pmp-kebab:hover {
    background: #f3f3f3;
    color: #333;
}

.pmp-kebab svg {
    width: 16px;
    height: 16px;
}

/* Kebab dropdown - rendered inline inside .pmp-body when the user clicks the kebab.
   Position anchors to the kebab button's bottom-right corner. */
.pmp-kebab-menu {
    position: absolute;
    right: 8px;
    bottom: 40px;
    min-width: 180px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
    padding: 6px;
    z-index: 5;
    display: flex;
    flex-direction: column;
}

.pmp-kebab-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: #1a1a1a;
    font-size: 13px;
    text-align: left;
    width: 100%;
}

.pmp-kebab-menu-item:hover {
    background: #f5f5f5;
}

.pmp-kebab-menu-icon {
    color: #555;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Inline ephemeral toast for compare/hide actions inside the popup. */
.pmp-toast {
    position: absolute;
    left: 50%;
    bottom: 8px;
    transform: translateX(-50%);
    background: rgba(26, 26, 26, 0.92);
    color: #ffffff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    max-width: calc(100% - 24px);
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
    opacity: 1;
    transition: opacity 200ms ease;
    z-index: 6;
    pointer-events: none;
}

.pmp-toast.is-leaving {
    opacity: 0;
}
