/* Area Intelligence panel. Sits left of the control box on desktop, as a bottom sheet on phones. */
.my-area-panel {
    position: fixed;
    top: 80px;
    left: 20px;
    bottom: 30px;
    width: 340px;
    display: flex;
    flex-direction: column;
    background: rgba(22, 28, 36, 0.94);
    color: #ecf0f1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    font-size: 13px;
    overflow: hidden;
}
.my-area-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px 8px;
    font-size: 15px;
    font-weight: 600;
}
.my-area-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 0;
    background: none;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}
.my-area-summary { display: none; font-size: 12px; font-weight: 400; opacity: 0.75; }
.my-area-header-buttons { display: flex; gap: 2px; }
.my-area-icon {
    background: none;
    border: none;
    color: inherit;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
}
/* Collapsed: just the header bar, so the map underneath is usable */
.my-area-panel.collapsed { bottom: auto; }
.my-area-panel.collapsed .my-area-header { padding-bottom: 12px; }
.my-area-panel.collapsed .my-area-summary { display: inline; }
.my-area-panel.collapsed > :not(.my-area-header) { display: none; }
.my-area-panel.is-hidden { display: none; }
.my-area-controls {
    display: flex;
    gap: 8px;
    padding: 0 14px 8px;
}
.my-area-controls label {
    flex: 1;
    font-size: 11px;
    opacity: 0.75;
}
.my-area-controls select {
    display: block;
    width: 100%;
    margin-top: 2px;
    padding: 4px;
    font-size: 13px;
    border-radius: 4px;
    border: 1px solid rgba(127, 127, 127, 0.5);
    background: transparent;
    color: inherit;
}
.my-area-controls option { color: #1f2933; }
.my-area-chips {
    display: flex;
    gap: 4px;
    padding: 0 14px 8px;
    flex-wrap: wrap;
}
.my-area-chip {
    flex: none;
    padding: 2px 8px;
    border-radius: 10px;
    border: 1px solid rgba(127, 127, 127, 0.5);
    background: none;
    color: inherit;
    font-size: 11px;
    cursor: pointer;
    opacity: 0.7;
}
.my-area-chip.on { background: #3498db; border-color: #3498db; color: #000; opacity: 1; }
.my-area-hint {
    padding: 0 14px 8px;
    font-size: 12px;
    opacity: 0.75;
}
.my-area-body {
    flex: 1;
    overflow-y: auto;
    padding: 0 14px 14px;
}
.my-area-headline { margin: 4px 0 2px; font-size: 14px; line-height: 1.4; }
.my-area-compare { margin: 0 0 8px; font-size: 12px; opacity: 0.75; }
.my-area-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 10px; }
.my-area-tag {
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
    background: rgba(127, 127, 127, 0.25);
}
.my-area-section { margin: 12px 0 4px; font-size: 11px; letter-spacing: 0.04em; text-transform: uppercase; opacity: 0.7; }
.my-area-row {
    display: block;
    width: 100%;
    padding: 6px 4px;
    text-align: left;
    background: none;
    border: none;
    border-top: 1px solid rgba(127, 127, 127, 0.25);
    color: inherit;
    font-size: 12px;
    cursor: pointer;
}
.my-area-row:hover { background: rgba(127, 127, 127, 0.15); }
.my-area-row.selected { background: #3498db; color: #000; }
.my-area-row-top { display: flex; justify-content: space-between; gap: 8px; }
.my-area-row-top strong { font-size: 13px; }
.my-area-row-sub { opacity: 0.75; margin-top: 1px; }
.my-area-note { margin-top: 12px; font-size: 11px; opacity: 0.65; line-height: 1.4; }

.my-area-popup { font-size: 12px; line-height: 1.4; }
.my-area-popup-title { font-size: 13px; font-weight: 600; }
.my-area-popup-detail { margin-top: 4px; }
.my-area-popup-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 4px; }
.my-area-popup-link {
    padding: 0;
    background: none;
    border: none;
    color: #2471a8;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

@media (max-width: 768px) {
    .my-area-panel {
        top: auto;
        left: 8px;
        right: 8px;
        bottom: 8px;
        width: auto;
        height: 50vh;
        z-index: 2000; /* above the floating map buttons */
    }
    /* Collapsed bar sits above the floating map and control-panel buttons */
    .my-area-panel.collapsed { top: auto; bottom: 84px; height: auto; }
}
