/**
 * All of the CSS for your public-facing functionality should be
 * included in this file.
 */

/* General Styles */
.rmp-container {
    margin: 20px 0;
}

.rmp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.rmp-header h2 {
    margin: 0;
    padding: 0;
}

.rmp-content {
    background: #fff;
    padding: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.rmp-footer {
    margin-top: 20px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    font-size: 12px;
    color: #666;
    text-align: center;
}

/* Map Styles */
.rmp-map-container {
    position: relative;
    width: 100%;
    margin-bottom: 20px;
}

.rmp-map {
    width: 100%;
    height: 500px;
    border: 1px solid #eee;
    border-radius: 5px;
}

.rmp-map-controls {
    margin-bottom: 15px;
}

.rmp-map-sidebar {
    margin-top: 20px;
}

.rmp-map-info {
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 5px;
    margin-bottom: 20px;
}

.rmp-map-info h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

/* Map List Styles */
.rmp-map-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.rmp-map-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 5px;
    padding: 15px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease-in-out;
}

.rmp-map-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.rmp-map-item-title {
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

.rmp-map-item-description {
    margin-bottom: 15px;
    color: #666;
}

.rmp-map-item-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #999;
}

/* Marker Styles */
.rmp-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
    background: #3388ff;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.rmp-marker-default {
    background: #3388ff;
}

.rmp-marker-person {
    background: #ff8833;
}

.rmp-marker-vehicle {
    background: #33ff88;
}

.rmp-marker-building {
    background: #8833ff;
}

.rmp-marker-danger {
    background: #ff3333;
}

.rmp-marker-info {
    background: #33aaff;
}

.rmp-marker-medical {
    background: #ff3388;
}

.rmp-marker-water {
    background: #33ffff;
    color: #333;
}

.rmp-marker-food {
    background: #ffaa33;
}

.rmp-marker-shelter {
    background: #88ff33;
    color: #333;
}

.rmp-marker-popup {
    min-width: 200px;
}

.rmp-marker-popup h4 {
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.rmp-marker-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.rmp-marker-detail {
    margin-bottom: 5px;
}

/* Tracking Styles */
.rmp-tracking-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.rmp-tracking-sidebar {
    flex: 1;
    min-width: 250px;
}

.rmp-tracking-map-container {
    flex: 3;
    min-width: 500px;
}

.rmp-tracking-controls {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 5px;
}

.rmp-tracking-control {
    margin-bottom: 10px;
}

.rmp-tracking-control label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.rmp-tracking-users {
    margin-top: 20px;
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
}

.rmp-tracking-users-header {
    padding: 10px 15px;
    background: #f9f9f9;
    border-bottom: 1px solid #eee;
    font-weight: bold;
}

.rmp-tracking-users-list {
    max-height: 300px;
    overflow-y: auto;
}

.rmp-tracking-user-item {
    padding: 10px 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.rmp-tracking-user-item:hover {
    background: #f9f9f9;
}

.rmp-tracking-user-item.active {
    background: #f0f0f0;
}

.rmp-tracking-user-name {
    font-weight: bold;
}

.rmp-tracking-user-details {
    font-size: 12px;
    color: #666;
}

.rmp-tracking-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background: #3388ff;
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

.rmp-tracking-popup {
    min-width: 200px;
}

.rmp-tracking-popup h4 {
    margin-top: 0;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* Location Sharing Styles */
.rmp-location-sharing {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 5px;
}

.rmp-location-sharing h3 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.rmp-location-sharing-controls {
    margin-top: 15px;
}

.rmp-location-status {
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    font-weight: bold;
}

.rmp-location-status.active {
    background: #dff0d8;
    color: #3c763d;
}

.rmp-location-status.inactive {
    background: #f2dede;
    color: #a94442;
}

.rmp-location-status.error {
    background: #fcf8e3;
    color: #8a6d3b;
}

/* Responsive Styles */
@media screen and (max-width: 782px) {
    .rmp-map {
        height: 400px;
    }
    
    .rmp-map-list {
        grid-template-columns: 1fr;
    }
    
    .rmp-tracking-container {
        flex-direction: column;
    }
    
    .rmp-tracking-sidebar,
    .rmp-tracking-map-container {
        width: 100%;
    }
}

@media screen and (max-width: 480px) {
    .rmp-map {
        height: 300px;
    }
    
    .rmp-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rmp-header h2 {
        margin-bottom: 10px;
    }
}

/* Center Marker */
.rmp-center-marker {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 20px;
    height: 20px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    color: #fff;
    font-size: 12px;
}

/* Loading Animation */
.rmp-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.rmp-loading:after {
    content: ".";
    animation: dots 1s steps(5, end) infinite;
}

@keyframes dots {
    0%, 20% {
        color: rgba(0,0,0,0);
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    40% {
        color: #666;
        text-shadow:
            .25em 0 0 rgba(0,0,0,0),
            .5em 0 0 rgba(0,0,0,0);
    }
    60% {
        text-shadow:
            .25em 0 0 #666,
            .5em 0 0 rgba(0,0,0,0);
    }
    80%, 100% {
        text-shadow:
            .25em 0 0 #666,
            .5em 0 0 #666;
    }
}