/**
 * Solapur Layer Control Panel Styles
 */

.solapur-layer-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 350px;
    max-height: calc(100vh - 120px);
    overflow: hidden;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    z-index: 1000;
}

/* Panel Header */
.layer-panel-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 12px 12px 0 0;
}

.layer-panel-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.toggle-panel-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-panel-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Panel Content */
.layer-panel-content {
    max-height: calc(100vh - 180px);
    overflow-y: auto;
    padding: 15px;
}

/* Custom Scrollbar */
.layer-panel-content::-webkit-scrollbar {
    width: 8px;
}

.layer-panel-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.layer-panel-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

.layer-panel-content::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Search */
.layer-search {
    margin-bottom: 15px;
}

.layer-search input {
    width: 100%;
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
}

.layer-search input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.action-btn {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.action-btn:active {
    transform: translateY(0);
}

/* Category Section */
.layer-category {
    margin-bottom: 10px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.category-header {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    transition: all 0.3s;
}

.category-header:hover {
    background: linear-gradient(135deg, #e0e7ff 0%, #b8c5e0 100%);
}

.category-icon {
    font-size: 18px;
}

.category-name {
    flex: 1;
}

.category-count {
    font-size: 12px;
    color: #666;
    font-weight: normal;
}

.category-toggle {
    font-size: 12px;
    color: #666;
    transition: transform 0.3s;
}

/* Category Layers */
.category-layers {
    background: white;
    padding: 8px;
}

/* Layer Item */
.layer-item {
    padding: 8px 10px;
    border-radius: 6px;
    transition: all 0.2s;
}

.layer-item:hover {
    background: #f8f9fa;
}

.layer-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
}

.layer-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #667eea;
}

.layer-icon {
    font-size: 16px;
}

.layer-name {
    flex: 1;
    user-select: none;
}

/* Statistics */
.layer-stats {
    margin-top: 15px;
    padding: 12px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 8px;
    text-align: center;
    color: #555;
    font-size: 12px;
}

/* Responsive */
@media (max-width: 768px) {
    .solapur-layer-panel {
        max-width: 280px;
        font-size: 12px;
    }

    .layer-panel-header h3 {
        font-size: 14px;
    }

    .category-header {
        font-size: 12px;
        padding: 10px 12px;
    }

    .layer-label {
        font-size: 12px;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.solapur-layer-panel {
    animation: slideIn 0.3s ease-out;
}

/* Loading State */
.layer-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #666;
}

.layer-loading::after {
    content: '';
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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