/* Activity Log Pro - Map Styles */

/* Small map in IP dropdown */
.alp-ip-map-small {
    width: 280px;
    height: 150px;
    border-radius: 4px;
    border: 1px solid #c3c4c7;
    margin-bottom: 10px;
    cursor: pointer;
    position: relative;
}

.alp-ip-map-small:hover {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
}

/* Map loading state */
.alp-map-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f6f7f7;
    color: #646970;
    font-size: 12px;
}

/* Map error state */
.alp-map-error {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fcf2f2;
    color: #d63638;
    font-size: 12px;
    border-color: #d63638;
}

/* Click to expand indicator */
.alp-map-expand-hint {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    pointer-events: none;
    z-index: 1000;
}

/* Large map modal */
.alp-map-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.alp-map-modal-overlay.active {
    opacity: 1;
}

.alp-map-modal {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    max-width: 90vw;
    max-height: 90vh;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    width: 600px;
    overflow: hidden;
}

.alp-map-modal-overlay.active .alp-map-modal {
    transform: scale(1);
}

.alp-map-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #c3c4c7;
    background: #f0f0f1;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 50px;
    width: 100%;
    box-sizing: border-box;
}

.alp-map-modal-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 10px;
}

.alp-map-modal-title {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin: 0;
    flex: 1;
    word-break: break-word;
    line-height: 1.3;
    max-width: calc(100% - 120px);
}

.alp-map-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #646970;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
    flex-shrink: 0;
    z-index: 10;
}

.alp-map-modal-close:hover {
    background: #2c3338;
    color: #f0f0f1;
}

.alp-map-modal-content {
    padding: 0;
    position: relative;
    background: white;
    border-radius: 0 0 8px 8px;
}

.alp-map-large {
    width: 600px;
    height: 600px;
    border-radius: 0 0 8px 8px;
}

/* Map info panel */
.alp-map-info {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    padding: 10px;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    max-width: 250px;
    z-index: 1000;
}

.alp-map-info h4 {
    margin: 0 0 8px 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.alp-map-info-item {
    display: flex;
    margin-bottom: 4px;
    font-size: 12px;
}

.alp-map-info-label {
    font-weight: 600;
    color: #646970;
    width: 80px;
    flex-shrink: 0;
}

.alp-map-info-value {
    color: #1d2327;
}

/* Accuracy indicator */
.alp-map-accuracy {
    background: #f0f6fc;
    border: 1px solid #c8d7e1;
    color: #2c3338;
    padding: 8px 10px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 12px;
    display: flex;
    align-items: center;
}

.alp-map-accuracy::before {
    content: "";
    margin-right: 0;
}

/* Map controls styling to match WordPress admin */
.leaflet-control-zoom a {
    background-color: #f6f7f7 !important;
    border-color: #c3c4c7 !important;
    color: #2c3338 !important;
}

.leaflet-control-zoom a:hover {
    background-color: #2271b1 !important;
    border-color: #2271b1 !important;
    color: white !important;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .alp-ip-map-small {
        width: 100%;
        max-width: 280px;
    }
    
    .alp-map-large {
        width: 90vw;
        height: 60vh;
        max-width: 500px;
        max-height: 400px;
    }
    
    .alp-map-modal {
        width: 95vw;
        max-width: 500px;
    }
    
    .alp-map-modal-header {
        padding: 12px 15px;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .alp-map-modal-title {
        font-size: 14px;
        max-width: 100%;
        margin-bottom: 8px;
        flex: 1 1 100%;
        order: 1;
    }
    
    .alp-map-modal-header-actions {
        flex-direction: row;
        gap: 8px;
        align-items: center;
        margin-left: 0;
        flex: 0 0 auto;
        order: 2;
        justify-content: flex-end;
        width: 100%;
    }
    
    .alp-copy-ip-large-btn {
        width: auto !important;
        padding: 6px 12px !important;
        font-size: 12px !important;
        flex: 1;
    }
    
    .alp-map-modal-close {
        flex-shrink: 0;
    }
    
    .alp-map-info {
        position: relative;
        top: auto;
        left: auto;
        margin: 10px;
        max-width: none;
    }
}

/* Dark mode support (if WordPress admin uses dark mode) */
@media (prefers-color-scheme: dark) {
    .alp-map-modal {
        background: #1d2327;
    }
    
    .alp-map-modal-header {
        border-bottom-color: #3c434a;
    }
    
    .alp-map-modal-title {
        color: #000000;
    }
    
    .alp-map-modal-close {
        color: #a7aaad;
    }
    
    .alp-map-modal-close:hover {
        background: #2c3338;
        color: #f0f0f1;
    }
    
    .alp-map-info {
        background: #2c3338;
        color: #f0f0f1;
    }
    
    .alp-map-info h4 {
        color: #f0f0f1;
    }
    
    .alp-map-info-label {
        color: #a7aaad;
    }
    
    .alp-map-info-value {
        color: #f0f0f1;
    }
}

/* Additional header styling to prevent dark areas */
.alp-map-modal-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 20px;
    background: #f0f0f1;
    pointer-events: none;
    z-index: -1;
} 