﻿/* wwwroot/css/overview.css - Updated */
.glass-card {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    overflow: hidden;
}

    .glass-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }

.donut-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
}

    /* Make the canvas fill the wrapper */
    .donut-wrapper canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
    }

/* Text overlay that sits on top of the canvas */
.donut-text-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    pointer-events: none; /* Allow clicks to pass through to canvas */
    z-index: 10;
}

.donut-value {
    font-size: 2rem;
    font-weight: 700;
    color: darkblue !important;
    text-shadow: 0 2px 8px rgba(255, 255, 255, 0.8);
    line-height: 1;
    margin: 0;
}

.donut-percentage {
    font-size: 1rem;
    color: darkblue !important;
    text-shadow: 0 1px 4px rgba(255, 255, 255, 0.6);
    margin-top: 5px;
    font-weight: 600;
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-card {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

/* Color themes for each card */
.card-1 {
    border-top: 4px solid #FF6B8B;
}

.card-2 {
    border-top: 4px solid #4ECDC4;
}

.card-3 {
    border-top: 4px solid #FFA726;
}

.card-4 {
    border-top: 4px solid #9C27B0;
}

.card-5 {
    border-top: 4px solid #00BCD4;
}

.card-6 {
    border-top: 4px solid #8BC34A;
}

.card-7 {
    border-top: 4px solid #FF5722;
}

.card-8 {
    border-top: 4px solid #673AB7;
}

/* Button styles */
.btn.glass-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: darkblue !important;
    backdrop-filter: blur(10px);
    font-weight: 500;
}

    .btn.glass-card.active {
        background: rgba(255, 255, 255, 0.25);
        border-color: rgba(255, 255, 255, 0.4);
        font-weight: bold;
    }

    .btn.glass-card:hover:not(.active) {
        background: rgba(255, 255, 255, 0.2);
        border-color: rgba(255, 255, 255, 0.3);
    }

/* Update all text to darkblue */
.text-white {
    color: darkblue !important;
}

.text-muted {
    color: rgba(0, 0, 139, 0.7) !important; /* darkblue with opacity */
}

h1, h2, h3, h4, h5, h6 {
    color: darkblue !important;
}

.card-subtitle {
    color: darkblue !important;
    font-weight: 600;
}

.card-text {
    color: darkblue !important;
}

.badge.glass-card {
    background: rgba(255, 255, 255, 0.2);
    color: darkblue !important;
    border: 1px solid rgba(0, 0, 139, 0.3);
    font-weight: 500;
}

.progress.glass-card {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(0, 0, 139, 0.2);
}

.text-darkblue {
    color: darkblue !important;
}

/* Also update the container text if you have one */
.container h1,
.container h2,
.container h3,
.container h4,
.container h5,
.container h6,
.container p,
.container span {
    color: darkblue !important;
}
/* Add to wwwroot/css/overview.css */
/* Loading animation for text */
@keyframes pulse {
    0% {
        opacity: 0.3;
    }

    50% {
        opacity: 1;
    }

    100% {
        opacity: 0.3;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.loading-text {
    animation: pulse 1.5s infinite;
    color: rgba(0, 0, 139, 0.5) !important;
}

/* Add a shimmer effect to cards during loading */
.glass-card.loading {
    position: relative;
    overflow: hidden;
}

    .glass-card.loading::after {
        content: '';
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100%;
        background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
        animation: shimmer 1.5s infinite;
    }

@keyframes shimmer {
    100% {
        left: 100%;
    }
}

/* Ensure canvas is visible during loading */
.donut-wrapper canvas {
    background: transparent !important;
}
/* Add to wwwroot/css/overview.css */
/* Smooth transitions for donuts */
.donut-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

    .donut-wrapper:hover {
        transform: scale(1.02);
    }

    .donut-wrapper canvas {
        position: absolute;
        top: 0;
        left: 0;
        width: 100% !important;
        height: 100% !important;
        transition: opacity 0.5s ease;
    }

/* Loading state for cards */
.glass-card.loading {
    animation: pulse-glow 2s infinite alternate;
}

@keyframes pulse-glow {
    from {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    to {
        box-shadow: 0 8px 32px var(--card-color, rgba(255, 107, 139, 0.3));
    }
}

/* Define color variables for each card */
.card-1 {
    --card-color: #FF6B8B;
}

.card-2 {
    --card-color: #4ECDC4;
}

.card-3 {
    --card-color: #FFA726;
}

.card-4 {
    --card-color: #9C27B0;
}

.card-5 {
    --card-color: #00BCD4;
}

.card-6 {
    --card-color: #8BC34A;
}

.card-7 {
    --card-color: #FF5722;
}

.card-8 {
    --card-color: #673AB7;
}
/* Add to wwwroot/css/overview.css */
/* Smooth transitions */
.donut-wrapper canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Loading pulse for text */
@keyframes gentle-pulse {
    0%, 100% {
        opacity: 0.7;
    }

    50% {
        opacity: 1;
    }
}

.loading .donut-value,
.loading .donut-percentage {
    animation: gentle-pulse 2s infinite;
}

/* Smooth card appearance */
.glass-card {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

    .glass-card.loading {
        animation: subtle-glow 3s infinite alternate;
    }

@keyframes subtle-glow {
    from {
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    }

    to {
        box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    }
}
