/* ==========================================================================
   Map Integration — TASK-028 v1.3.0
   ========================================================================== */

.ip-search-container.has-map {
    grid-template-columns: 280px 1fr 480px;
}

.ip-search-map-section {
    position: sticky;
    top: 16px;
    align-self: start;
    height: calc(100vh - 32px);
    max-height: 800px;
}

.ip-search-map {
    width: 100%;
    height: 100%;
    min-height: 400px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

.ip-search-map-status {
    margin-top: 8px;
    padding: 6px 12px;
    font-size: 13px;
    color: #666;
    background: #f9f9f9;
    border-radius: 4px;
    min-height: 28px;
}
.ip-search-map-status:empty { display: none; }

.ip-search-map-error {
    padding: 24px;
    color: #c62828;
    background: #ffebee;
    border-radius: 4px;
    text-align: center;
}

/* Pin popup (D10) */
.ip-search-pin-popup {
    min-width: 180px;
    padding: 4px;
    font-size: 13px;
}
.ip-search-pin-name {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
}
.ip-search-pin-id {
    display: inline-block;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #666;
    margin-bottom: 6px;
}
.ip-search-pin-meta {
    display: inline-block;
    background: #e3f2fd;
    color: #1565c0;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    margin-bottom: 6px;
    margin-left: 4px;
}
.ip-search-pin-badge--promoted {
    display: inline-block;
    background: #fff8e1;
    color: #f57c00;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 500;
    margin-left: 4px;
}
.ip-search-pin-cta {
    display: block;
    margin-top: 8px;
    padding: 6px 12px;
    background: #1976d2;
    color: #fff !important;
    text-align: center;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 12px;
    font-weight: 500;
}
.ip-search-pin-cta:hover { background: #1565c0; }

/* Mobile view toggle (D7) */
.ip-search-view-toggle {
    display: none;
    grid-column: 1 / -1;
    margin-bottom: 12px;
    background: #f0f0f0;
    border-radius: 6px;
    padding: 4px;
}
.ip-search-view-btn {
    flex: 1;
    padding: 8px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    font-weight: 500;
    color: #555;
}
.ip-search-view-btn.is-active {
    background: #fff;
    color: #1976d2;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

@media (max-width: 1024px) {
    .ip-search-container.has-map {
        grid-template-columns: 280px 1fr;
    }
    .ip-search-map-section { display: none; }
}

@media (max-width: 768px) {
    .ip-search-container.has-map {
        grid-template-columns: 1fr;
    }
    .ip-search-view-toggle { display: flex; }
    .ip-search-results-section.is-hidden,
    .ip-search-map-section.is-hidden { display: none; }
    .ip-search-map-section {
        display: block;
        position: static;
        height: 60vh;
    }
}
