/**
 * Frontend Styles für Kleingarten Verwaltung
 */

/* Global Styles */
.kg-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Parzellenkarte Frontend */
.kg-parzellenkarte-wrapper {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
}

.kg-parzellenkarte-header {
    text-align: center;
    margin-bottom: 30px;
}

.kg-parzellenkarte-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kg-parzellenkarte-header p {
    margin: 0;
    color: #7f8c8d;
    font-size: 16px;
}

.kg-parzellenkarte-content {
    display: grid;
    grid-template-columns: 280px 1fr 320px;
    gap: 25px;
}

@media (max-width: 1200px) {
    .kg-parzellenkarte-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .kg-parzelle-details-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 768px) {
    .kg-parzellenkarte-content {
        grid-template-columns: 1fr;
    }
    
    .kg-parzellenkarte-wrapper {
        padding: 20px;
    }
}

.kg-map-sidebar {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
}

.kg-sidebar-section {
    margin-bottom: 25px;
}

.kg-sidebar-section h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.kg-filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kg-filter-option {
    padding: 12px 15px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #2c3e50;
}

.kg-filter-option:hover {
    border-color: #667eea;
    color: #667eea;
}

.kg-filter-option.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.kg-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.kg-search-input:focus {
    outline: none;
    border-color: #667eea;
}

.kg-legend-frontend {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kg-legend-item-frontend {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
}

.kg-legend-color-frontend {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.kg-map-display {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.kg-svg-frontend-container {
    width: 100%;
    height: 700px;
    overflow: auto;
    border: 1px solid #e1e8ed;
    border-radius: 8px;
    background: #fafafa;
}

.kg-svg-frontend-container svg {
    width: 100%;
    height: auto;
}

.kg-svg-frontend-container path {
    cursor: pointer;
    transition: all 0.3s ease;
}

.kg-svg-frontend-container path:hover {
    filter: brightness(0.85);
    transform: scale(1.02);
    transform-origin: center;
}

.kg-svg-frontend-container path.occupied {
    fill: #f4d7d7;
}

.kg-svg-frontend-container path.free {
    fill: #00ffff;
}

.kg-svg-frontend-container path.common {
    fill: #ffd5d5;
}

.kg-parzelle-details-panel {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    height: fit-content;
}

.kg-details-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #667eea;
}

.kg-details-panel-header h3 {
    margin: 0;
    font-size: 18px;
    color: #2c3e50;
}

.kg-close-panel {
    background: white;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #95a5a6;
    transition: all 0.2s ease;
}

.kg-close-panel:hover {
    background: #e74c3c;
    color: white;
}

.kg-details-panel-content {
    background: white;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.kg-detail-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.kg-detail-item:last-child {
    border-bottom: none;
}

.kg-detail-label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.kg-detail-value {
    color: #7f8c8d;
    font-size: 14px;
}

.kg-details-panel-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.kg-panel-button {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
}

.kg-panel-button-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.kg-panel-button-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.kg-panel-button-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.kg-panel-button-secondary:hover {
    background: #667eea;
    color: white;
}

/* Mitgliederliste Frontend */
.kg-mitgliederliste-wrapper {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    margin: 30px 0;
}

.kg-mitgliederliste-header {
    text-align: center;
    margin-bottom: 30px;
}

.kg-mitgliederliste-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.kg-mitgliederliste-header p {
    margin: 0;
    color: #7f8c8d;
    font-size: 16px;
}

.kg-mitgliederliste-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.kg-mitglieder-search {
    flex: 1;
    min-width: 250px;
}

.kg-mitglieder-search input {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.kg-mitglieder-search input:focus {
    outline: none;
    border-color: #667eea;
}

.kg-mitglieder-filter {
    display: flex;
    gap: 10px;
}

.kg-filter-btn-frontend {
    padding: 12px 20px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.kg-filter-btn-frontend:hover {
    border-color: #667eea;
    color: #667eea;
}

.kg-filter-btn-frontend.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.kg-mitglieder-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.kg-mitglied-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.kg-mitglied-card:hover {
    transform: translateY(-5px);
    border-color: #667eea;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.2);
}

.kg-mitglied-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.kg-mitglied-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    font-weight: 700;
}

.kg-mitglied-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
}

.kg-mitglied-status {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 5px;
    display: inline-block;
}

.kg-mitglied-status.active {
    background: #d4edda;
    color: #155724;
}

.kg-mitglied-status.inactive {
    background: #f8d7da;
    color: #721c24;
}

.kg-mitglied-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kg-mitglied-info-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #7f8c8d;
}

.kg-mitglied-info-item span {
    color: #2c3e50;
    font-weight: 500;
}

.kg-mitglied-parzelle {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.kg-mitglied-parzelle-label {
    font-size: 12px;
    color: #7f8c8d;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 5px;
}

.kg-mitglied-parzelle-value {
    font-size: 16px;
    color: #667eea;
    font-weight: 600;
}

/* Loading State */
.kg-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #7f8c8d;
}

.kg-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: kg-spin 1s linear infinite;
    margin-right: 15px;
}

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

/* Empty State */
.kg-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.kg-empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    color: #dee2e6;
}

.kg-empty-state h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.kg-empty-state p {
    margin: 0;
}

/* Animations */
@keyframes kg-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kg-animate-in {
    animation: kg-fadeIn 0.5s ease forwards;
}

/* Responsive improvements */
@media (max-width: 480px) {
    .kg-parzellenkarte-wrapper,
    .kg-mitgliederliste-wrapper {
        padding: 15px;
        border-radius: 12px;
    }
    
    .kg-parzellenkarte-header h2,
    .kg-mitgliederliste-header h2 {
        font-size: 24px;
    }
    
    .kg-mitglieder-grid {
        grid-template-columns: 1fr;
    }
    
    .kg-mitglied-card {
        padding: 15px;
    }
}
