/* ========================================
   Lake Visualization Styles
   Three.js 3D-Voralpensee Visualisierung
   ======================================== */

/* Container */
.lake-visualization-container {
    position: relative;
    width: 100%;
    height: 400px;
    min-height: 400px;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(180deg, 
        #87CEEB 0%,      /* Himmel */
        #B0C4DE 30%,     /* Horizont */
        #4682B4 60%,     /* See */
        #2F4F4F 100%     /* Tiefe */
    );
}

/* Canvas-Anpassung */
.lake-visualization-container canvas {
    display: block;
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px;
    position: relative;
    z-index: 1;
}

/* Loading Overlay */
.lake-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(135, 206, 235, 0.9);
    backdrop-filter: blur(4px);
    z-index: 10;
    border-radius: 12px;
}

.lake-loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: #4682B4;
    border-radius: 50%;
    animation: lake-spin 1s linear infinite;
}

@keyframes lake-spin {
    to {
        transform: rotate(360deg);
    }
}

.lake-loading-text {
    margin-top: 1rem;
    color: #2F4F4F;
    font-size: 0.9rem;
    font-weight: 500;
}

/* WebGL Fallback */
.lake-webgl-fallback {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(180deg, 
        #87CEEB 0%, 
        #B0C4DE 50%, 
        #4682B4 100%
    );
    border-radius: 12px;
}

.fallback-content {
    text-align: center;
    color: #2F4F4F;
    padding: 2rem;
}

.fallback-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 1rem;
}

.fallback-content p {
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0.5rem 0;
}

.fallback-content small {
    color: #4A5568;
    font-size: 0.85rem;
}

/* Status-Overlay */
.lake-status-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    gap: 0.5rem;
    z-index: 5;
}

.lake-status-badge {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: #2F4F4F;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(4px);
}

.lake-status-badge.stock-high {
    background: rgba(72, 187, 120, 0.9);
    color: white;
}

.lake-status-badge.stock-medium {
    background: rgba(237, 137, 54, 0.9);
    color: white;
}

.lake-status-badge.stock-low {
    background: rgba(245, 101, 101, 0.9);
    color: white;
}

/* Controls-Hinweis */
.lake-controls-hint {
    position: absolute;
    bottom: 12px;
    right: 12px;
    padding: 0.5rem 0.75rem;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 8px;
    font-size: 0.75rem;
    color: white;
    z-index: 5;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.lake-controls-hint:hover {
    opacity: 1;
}

/* Animation-Hinweise */
.lake-animation-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #2F4F4F;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 15;
    animation: lake-fade-in 0.3s ease;
    display: none;
}

.lake-animation-indicator.visible {
    display: block;
}

@keyframes lake-fade-in {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* Reset-Button */
.lake-reset-camera {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.lake-reset-camera:hover {
    background: rgba(255, 255, 255, 1);
    transform: scale(1.05);
}

.lake-reset-camera:active {
    transform: scale(0.95);
}

.lake-reset-camera svg {
    width: 20px;
    height: 20px;
    fill: #4682B4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .lake-visualization-container {
        height: 250px;
        border-radius: 8px;
    }

    .lake-visualization-container canvas {
        border-radius: 8px;
    }

    .lake-loading-overlay,
    .lake-webgl-fallback {
        border-radius: 8px;
    }

    .lake-loading-spinner {
        width: 36px;
        height: 36px;
    }

    .lake-loading-text {
        font-size: 0.8rem;
    }

    .fallback-icon {
        font-size: 3rem;
    }

    .fallback-content p {
        font-size: 1rem;
    }

    .lake-status-badge {
        padding: 0.2rem 0.5rem;
        font-size: 0.7rem;
    }

    .lake-controls-hint {
        display: none;
    }

    .lake-animation-indicator {
        padding: 0.75rem 1.5rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .lake-visualization-container {
        height: 200px;
    }

    .lake-status-overlay {
        top: 8px;
        left: 8px;
    }

    .lake-reset-camera {
        bottom: 8px;
        left: 8px;
        padding: 0.4rem;
    }

    .lake-reset-camera svg {
        width: 16px;
        height: 16px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .lake-status-badge {
        background: rgba(45, 55, 72, 0.9);
        color: #E2E8F0;
    }

    .lake-status-badge.stock-high,
    .lake-status-badge.stock-medium,
    .lake-status-badge.stock-low {
        color: white;
    }

    .lake-animation-indicator {
        background: rgba(45, 55, 72, 0.95);
        color: #E2E8F0;
    }

    .lake-reset-camera {
        background: rgba(45, 55, 72, 0.9);
    }

    .lake-reset-camera:hover {
        background: rgba(45, 55, 72, 1);
    }

    .lake-reset-camera svg {
        fill: #90CDF4;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .lake-loading-spinner {
        animation: none;
        border-top-color: #2F4F4F;
    }

    .lake-animation-indicator {
        animation: none;
    }

    .lake-reset-camera {
        transition: none;
    }
}
