﻿/* === Dashboard Layout === */
.lp-app-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 1.5rem;
    /*padding: 1rem;*/
}

/* === MudPaper Styling (White Card Look) === */
.mudpaper-dashboard {
    background-color: #ffffff !important;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    backdrop-filter: blur(4px);
}

    .mudpaper-dashboard:hover {
        transform: translateY(-3px);
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    }

/* === Headings and Text === */
.dashboard-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--mud-palette-primary);
    margin-bottom: 0.75rem;
}

.dashboard-stat {
    font-size: 0.9rem;
    color: var(--mud-palette-text-primary);
}

.dashboard-value {
    color: var(--mud-palette-success);
    font-weight: 600;
}

/* === Avatar Row Containers === */
.dashboard-avatars {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
}

.dashboard-avatar {
    background-color: var(--mud-palette-primary-hover);
    border-radius: 50px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-width: 220px;
    box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease;
}

    .dashboard-avatar:hover {
        background-color: var(--mud-palette-primary-lighten);
    }

/* --- Titles and Subtitles --- */
.dashboard-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--mud-palette-primary);
    margin-bottom: 0.75rem;
}

.dashboard-subtitle {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--mud-palette-text-primary);
}
/* === Responsive Behavior === */
@media (max-width: 992px) {
    .lp-app-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (max-width: 768px) {
    .mudpaper-dashboard {
        padding: 1rem;
    }

    .dashboard-avatar {
        flex-direction: column;
        min-width: 100%;
        border-radius: 12px;
        text-align: center;
        padding: 0.75rem;
    }

    .dashboard-title {
        font-size: 1rem;
        text-align: center;
    }
}

/* Optional – Add Subtle Animations */
.dashboard-avatar {
    animation: fadeInUp 0.4s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Global CSR Exam Results responsive styling */
.mud-paper {
    transition: all 0.3s ease-in-out;
}

/* Ensure stacks within the items do not wrap by default */
.mud-stack {
    flex-wrap: nowrap;
}

/* Desktop and larger screens (md and up) */
@media (min-width: 900px) {
    .mud-grid {
        display: flex;
        justify-content: center; /* Center the grid items */
        align-items: stretch;
        gap: 16px; /* Spacing between grid items */
    }

    .mud-item {
        flex: 1 1 auto; /* Allow items to grow/shrink but maintain aspect */
        max-width: 300px; /* Max width for each item on desktop */
        min-width: 280px; /* Ensure items don't get too small */
    }

    /* Ensure text within stacks for desktop stays on one line */
    .mud-stack .mud-text {
        white-space: nowrap; /* Prevent text from wrapping */
    }
}

/* Tablet screens (sm breakpoint) */
@media (min-width: 600px) and (max-width: 899px) {
    .mud-grid {
        display: flex;
        flex-wrap: wrap; /* Allow wrapping for two columns */
        justify-content: center;
        gap: 1px;
        /*width: 80%;*/
    }

    .mud-item {
        flex: 1 1 calc(50% - 8px);  /*Two columns, accounting for gap */
        max-width: calc(50% - 8px);
        margin-bottom: 0;  /*No extra margin, gap handles it */
    }

    .mud-stack .mud-text {
        font-size: 0.7rem !important; /* Slightly smaller for tablets if needed */
        white-space: nowrap;
    }
    /* .mud-grid-spacing-xs-6 {
        width: calc(100% + 24px);
        margin-left: -84px;
        margin-top: -24px;
    }
   .d-flex {
        display: flex !important;
        width: 230px !important;*/
        /*margin-left: 12px !important;*/
    /*}*/
    .mud-typography-h6 {
        font-size: 12px;
        font-weight:bold;
    }
    .mud-typography-caption {
        font-size: 8px;
        font-weight: bold;
    }

    .mud-typography-subtitle1 {
        font-size: 8px;
        font-weight: bold;
    }

    .mud-grid-spacing-xs-6 > .mud-grid-item {
        padding-left: 24px;
        padding-top: 12px;
    }

  .mb-3, .my-3 {
        margin-bottom: 24px !important;
    }
    .mud-icon-size-small {
        font-size: 1.05rem;
    }
 /*     .pl-3, .px-3 {
        padding-left: 6px !important;
    }

    .pr-3, .px-3 {
        padding-right: 6px !important;
    }

    .pb-2, .py-2 {
        padding-bottom: 2px !important;
    }

    .pt-2, .py-2 {
        padding-top: 2px !important;
    }*/
}


/* Mobile screens (xs breakpoint) */
@media (max-width: 599px) { /* Changed from 480px to 599px to cover all xs */
    .mud-item {
        width: 100%;
        margin-bottom: 12px; /* Add some space between stacked items */
    }

    /* Reduce font size for all text in the result items on mobile */
    .mud-stack .mud-text {
        font-size: 0.6rem !important; /* Smaller size for professional, compact look */
        white-space: nowrap; /* Attempt to keep on one line, will truncate if too long */
        overflow: hidden;
        text-overflow: ellipsis; /* Add ellipsis if text overflows */
    }
    /* If the inner stack must wrap due to very small screen and long text */
    .mud-stack.flex-wrap-nowrap {
        flex-wrap: wrap; /* Allow the inner stack to wrap if necessary */
    }
    .mud-grid {
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        box-sizing: border-box;
    }
    .d-flex {
        display: flex !important;
        /*width: 280px !important;*/
    }
    .mud-typography-caption {
        font-size: 12px;
        font-weight: bold;
    }
    .mud-typography-subtitle1 {
        font-size: 12px;
        font-weight: bold;
 
    }
    .mud-grid-spacing-xs-6 > .mud-grid-item {
        padding-left: 24px;
        padding-top: 12px;
    }
    .mb-3, .my-3 {
        margin-bottom: 24px !important;
    }
    .pl-3, .px-3 {
        padding-left: 6px !important;
    }

    .pr-3, .px-3 {
        padding-right: 6px !important;
    }
    .mud-container--gutters {
        padding-left: 8px;
        padding-right: 8px;
    }
  /*  .lp-app-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
        gap: 1.5rem;
        padding: 1rem;
        margin-left: 10px;
    }*/
}