/* static/css/tileCache.css */
/* Tile Cache UI Styles */

.cache-control {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0,0,0,0.65);
}

.cache-control-btn {
    background: white;
    border: none;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #333;
    font-size: 16px;
    border-radius: 4px;
}

.cache-control-btn:hover {
    background: #f4f4f4;
}

.cache-stats-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.cache-stats-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    min-width: 300px;
    max-width: 400px;
}

.cache-stats-content h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.stats-grid div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #666;
    font-size: 14px;
}

.stats-grid strong {
    color: #333;
    font-weight: 600;
}

.cache-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.cache-actions button {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s;
}

.btn-warning {
    background: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background: #e0a800;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Loading indicator */
.tile-loading {
    position: relative;
}

.tile-loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 1000;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Cache status indicator */
.cache-indicator {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    z-index: 1001;
}

.cache-indicator.cache-hit {
    background: #28a745;
}

.cache-indicator.cache-miss {
    background: #dc3545;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .cache-stats-content {
        margin: 20px;
        min-width: auto;
        max-width: none;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .cache-actions {
        flex-direction: column;
    }
}

/* Integration with existing sidebar styles */
.radar-sidebar .cache-info {
    padding: 10px;
    margin-top: 10px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 12px;
    color: #666;
}

.radar-sidebar .cache-info strong {
    color: #333;
}
.cache-info { display: none !important; }
