/* Pinnacle Project Maps - Frontend Styles */

.ppm-map-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.ppm-map-wrapper {
    flex: 1 1 60%;
    min-width: 300px;
    position: relative;
}

.ppm-map {
    width: 100%;
    min-height: 450px;
    z-index: 1;
}

/* Legend / Filter Panel */
.ppm-legend {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #fff;
    padding: 12px 15px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 1000;
    min-width: 200px;
}

.ppm-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}

.ppm-legend-item:last-of-type {
    margin-bottom: 12px;
}

.ppm-legend-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.ppm-marker-dot {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.ppm-show-hotspots {
    width: 100%;
    padding: 8px 12px;
    background: #c41230;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}

.ppm-show-hotspots:hover {
    background: #a30f28;
}

/* Location List Panel */
.ppm-location-list {
    flex: 0 0 40%;
    min-width: 280px;
    max-width: 350px;
    max-height: 450px;
    overflow-y: auto;
    border-left: 1px solid #ddd;
    background: #fafafa;
}

.ppm-list-inner {
    padding: 0;
}

/* Pagination */
.ppm-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 10px;
    background: #f0f0f0;
    border-bottom: 1px solid #ddd;
}

.ppm-page-link {
    display: inline-block;
    padding: 4px 10px;
    font-size: 13px;
    color: #0066cc;
    text-decoration: none;
    border-radius: 3px;
}

.ppm-page-link:hover {
    background: #e0e0e0;
}

.ppm-page-current {
    background: #c41230;
    color: #fff;
    font-weight: 600;
}

.ppm-page-disabled {
    color: #999;
    cursor: default;
}

/* List Items */
.ppm-list-item {
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background 0.2s;
}

.ppm-list-item:hover,
.ppm-list-item.active {
    background: #fff;
    border-left: 3px solid #c41230;
}

.ppm-list-item-title {
    font-weight: 700;
    font-size: 14px;
    color: #333;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.ppm-list-item-link {
    display: block;
    font-size: 13px;
    color: #0066cc;
    text-decoration: none;
    margin-bottom: 4px;
}

.ppm-list-item-link:hover {
    text-decoration: underline;
}

.ppm-list-item-location {
    font-size: 12px;
    color: #666;
}

.ppm-list-item-status {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* Popup Styling */
.ppm-info-window {
    padding: 5px;
    min-width: 200px;
}

.ppm-info-window h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
    color: #333;
    font-weight: 600;
    text-transform: uppercase;
}

.ppm-info-window p {
    margin: 0 0 5px 0;
    font-size: 13px;
    color: #666;
}

.ppm-info-window a {
    color: #0066cc;
    text-decoration: none;
}

.ppm-info-window a:hover {
    text-decoration: underline;
}

.leaflet-popup-content-wrapper {
    border-radius: 4px;
}

.leaflet-popup-content {
    margin: 12px 15px;
}

/* Loading state */
.ppm-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 100px;
    color: #666;
    padding: 20px;
    text-align: center;
}

/* No results */
.ppm-no-results {
    padding: 30px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 900px) {
    .ppm-map-container {
        flex-direction: column;
    }
    
    .ppm-map-wrapper {
        flex: none;
        width: 100%;
    }
    
    .ppm-location-list {
        flex: none;
        width: 100%;
        max-width: none;
        max-height: 300px;
        border-left: none;
        border-top: 1px solid #ddd;
    }
    
    .ppm-legend {
        position: relative;
        top: auto;
        right: auto;
        margin: 10px;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Scrollbar */
.ppm-location-list::-webkit-scrollbar {
    width: 8px;
}

.ppm-location-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.ppm-location-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.ppm-location-list::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* Leaflet z-index fix */
.leaflet-control-layers {
    z-index: 999;
}
