﻿/* General Styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    color: #333;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* Centered Container */
.centered-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100vh;
    text-align: center;
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    font-family: 'Roboto', sans-serif;
}

    .centered-container .mud-button {
        margin-top: 16px;
    }

/* Containers */
.mud-container,
.dashboard-container {
    padding: 16px;
    margin: 0 auto;
}

/* App Container */
#appVillageHealth {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

/* Logo Styling */
.logo-container {
    text-align: center;
    margin: 16px 0;
}

.logo-img {
    max-height: 48px;
    max-width: 100%;
    transition: transform 0.2s ease-in-out;
}

    .logo-container img:hover,
    .logo-img:hover {
        transform: scale(1.05);
    }

/* App Bar Styling */
.mud-app-bar {
    background-color: var(--mud-palette-background);
    color: var(--mud-palette-text-primary);
    padding: 8px 16px;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: 'Roboto', sans-serif;
}

.manage-appbar {
    background-color: var(--mud-palette-primary);
}

/* Button Styling */
.mud-button,
.auth-button {
    border-radius: 24px;
    padding: 10px 20px;
    font-weight: 600;
    text-transform: none;
    box-shadow: none;
    transition: all 0.3s ease-in-out;
}

    .mud-button:hover,
    .auth-button:hover {
        transform: translateY(-2px);
        box-shadow: 0px 6px 12px rgba(0, 0, 0, 0.1);
    }

/ /* Navigation and Drawers */
.nav-menu, .responsive-drawer, .main-drawer {
    padding: 4px;
    background-color: var(--mud-palette-background);
    border-radius: 8px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease-in-out;
}

.nav-menu .mud-divider, .mud-divider {
    margin: 16px 0;
}

/* Responsive Drawer (Static Width, No Mini Mode CSS) */
.responsive-drawer {
    width: 260px;
    transition: width 0.3s ease-in-out;
    box-shadow: none;
    overflow: hidden;
}

    .responsive-drawer.open {
        width: 260px;
    }

    .responsive-drawer.closed {
        width: 60px; /* Standardized to match `.mud-drawer-mini` */
    }

        /* Hide text when the drawer is closed */
        .responsive-drawer.closed .nav-link span {
            display: none;
        }

        /* Ensure icons remain visible */
        .responsive-drawer.closed .menu-item-icon {
            justify-content: center;
            width: 100%;
            display: flex;
        }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .responsive-drawer.open {
        width: 200px;
    }

    .responsive-drawer.closed {
        width: 50px;
    }
}
/* Navigation Links */
.nav-link {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
    padding: 6px 8px;
    color: var(--mud-palette-text-primary);
    font-weight: 500;
    border-radius: 6px;
    transition: background-color 0.3s ease, color 0.3s ease;
    white-space: nowrap;
}

    .nav-link span {
        display: inline-flex;
        align-items: center;
        vertical-align: middle;
    }

    .nav-link:hover {
        background-color: rgba(0, 0, 0, 0.05);
        color: var(--mud-palette-primary);
    }

    .nav-link.mud-nav-link-active {
        font-weight: bold;
        background-color: var(--mud-palette-primary);
        color: white;
    }

/* Menu Item Icons */
.menu-item-icon {
    font-size: 12px;
    margin-right: 4px;
    min-width: 16px;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    transition: color 0.3s ease;
}

.nav-link:hover .menu-item-icon {
    color: var(--mud-palette-primary);
}

/* Adjusted Nav Menu Title Spacing */
.nav-menu-title {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 4px;
    text-align: left;
}

.nav-menu-description {
    font-size: 12px;
    color: var(--mud-palette-text-secondary);
    margin-bottom: 8px;
    text-align: left;
}

/* Drawer Styling */
.main-drawer {
    background-color: var(--mud-palette-background);
    padding: 4px;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

    .main-drawer.mud-drawer-mini {
        width: 60px; /* Ensure it matches MiniVariantWidth */
        overflow: visible; /* Prevent clipping */
        padding: 4px 0; /* Adjust padding for better alignment */
    }

        .main-drawer.mud-drawer-mini .menu-item-icon {
            font-size: 22px; /* Adjust size for better visibility */
            width: 100%;
            height: 22px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        /* Prevent overlapping and ensure visibility */
        .main-drawer.mud-drawer-mini .mud-nav-item {
            overflow: visible;
            white-space: nowrap;
        }

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1100;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(4px);
}

    /* Circular Spinner */
    .loading-overlay .mud-progress-circular {
        width: 40px;
        height: 40px;
        border: 2px solid rgba(0, 0, 0, 0.1);
        border-top: 2px solid var(--mud-palette-primary);
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

/* Keyframes for Spin */
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Event Card Styling */
.event-card {
    background-color: white;
    padding: 16px;
    border-radius: 12px;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeIn 0.5s ease-in-out;
}

    .event-card:hover {
        transform: scale(1.03);
        box-shadow: 0px 8px 16px rgba(0, 0, 0, 0.12);
    }

/* Event Title and Description */
.event-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.event-description {
    color: #555;
    margin-bottom: 24px;
    font-size: 1rem;
}

/* Event Time */
.event-time {
    color: #555;
    font-size: 0.9rem;
}

/* MudCalendar Styling */
.mud-calendar {
    margin-top: 16px;
}

/* Form Elements */
.progress-field {
    width: 100%;
    margin-bottom: 16px;
}

.validation-message {
    font-size: 0.875rem;
    color: #d32f2f;
    margin-top: 4px;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 16px;
}

.submit-btn,
.cancel-btn {
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.submit-btn {
    background-color: #007bff;
    color: #fff;
}

    .submit-btn:hover {
        background-color: #0056b3;
    }

.cancel-btn {
    background-color: #f44336;
    color: #fff;
}

    .cancel-btn:hover {
        background-color: #d32f2f;
    }

/* Dialog and Form Padding */
.mud-dialog-content {
    padding: 24px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .event-title {
        font-size: 1.25rem;
    }

    .event-description {
        font-size: 0.9rem;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .submit-btn,
    .cancel-btn {
        width: 100%;
        margin-bottom: 8px;
    }

    .mud-text.h3 {
        font-size: 1.5rem;
    }

    .mud-button {
        width: 100%;
        font-size: 16px;
        margin-top: 16px;
        animation: fadeIn 0.5s ease-in-out;
    }

    .mud-text-field {
        margin-bottom: 12px;
    }
}

/* Scrollable Div */
#resultDiv {
    overflow-y: auto;
}

/* Animation Effects */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Divider between sections */
.menu-divider {
    margin: 8px 0;
    background-color: var(--mud-palette-lines-light);
}

/* ✅ Chat Session Container - Ensures proper alignment */
.chat-session-container {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    justify-content: flex-start;
    width: 100%;
}

/* ✅ Chat Text - Prevents overflow and ensures alignment */
.chat-session-text {
    display: flex;
    flex-direction: column;
    max-width: 160px; /* Increased for better readability */
    align-items: flex-start;
    overflow: hidden;
    text-overflow: ellipsis;
}

    /* Prevent text from overflowing and keep it readable */
    .chat-session-text .mud-text {
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Limits text to 2 lines */
        -webkit-box-orient: vertical;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: normal;
        max-width: 160px;
    }

/* ✅ Chat Timestamp - Ensures proper spacing */
.chat-session-time {
    font-size: 0.7rem;
    color: var(--mud-palette-text-secondary);
    margin-top: 2px;
    text-align: left;
}

/* ✅ Properly align icons in mini mode */
.main-drawer.mud-drawer-mini .menu-item-icon {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: auto;
}

/* ✅ Scrollable Chat List */
.chat-list-container {
    max-height: 400px; /* Controls chat section height */
    overflow-y: auto;
    padding-right: 8px;
}

    /* ✅ Scrollbar Styling for a sleek look */
    .chat-list-container::-webkit-scrollbar {
        width: 6px;
    }

    .chat-list-container::-webkit-scrollbar-thumb {
        background-color: rgba(0, 0, 0, 0.2);
        border-radius: 6px;
    }

    .chat-list-container::-webkit-scrollbar-track {
        background: transparent;
    }

/* ✅ Proper alignment for "Load More" button */
.load-more-container {
    display: flex;
    justify-content: flex-start; /* Align to the left */
    padding: 12px 0;
}

    .load-more-container .mud-button {
        font-size: 0.9rem;
        padding: 6px 16px;
        border-radius: 8px;
        transition: all 0.2s ease-in-out;
        text-align: left;
    }

/* ✅ Better alignment for section titles */
.nav-section-title {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--mud-palette-text-secondary);
    padding: 8px 12px;
    text-align: left;
}

/* ✅ Adjustments for chat list items */
.mud-nav-link {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    width: 100%;
}

/* ✅ Properly align and center chat icons */
.mud-icon.menu-item-icon {
    font-size: 18px;
    min-width: 22px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.blurred {
    filter: blur(5px);
    pointer-events: none;
}

.dialog-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

/* ---  Register page layout  --- */
.register-layout {
    display: flex;
    flex-wrap: wrap; /* stacks on small screens */
    justify-content: center; /* centred as a unit */
    gap: 48px; /* space between form & plans */
}

/* pricing cards auto-wrap, min 260 px each */
.pricing-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit,minmax(200px,1fr));
}

.feature-tile {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    min-height: 160px;
}

.register-form {
    flex: 0 0 380px;
    max-width: 380px;
    box-shadow: 0 10px 22px rgba(0,0,0,.15);
    border: 1px solid #C1C1C1;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    background: #fff;
    align-self: stretch;
}

.pricing-card-list .mud-list-item {
    padding: 4px 0;
}

.pricing-card-list .mud-typography-body2 {
    font-size: 0.80rem;
    line-height: 1.25;
}