/* 1) Google Font (only once) */
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700&display=swap');

/* 2) Root Variables (Default/Light Theme) */
:root {
    --primary-color: #26fa09; /* #72BB52; /* Green */
    --secondary-color: #808080; /* Light Gray */
    --background-color: #FFFFFF; /* White */
    --text-color: #000000; /* Black */
    --card-background: #FFFFFF; /* White */
    --header-background: #000000; /* Black */
    --drawer-background: #eeeeee; /* Light Gray */
    --border-radius: 8px;
}

/* 3) Dark Mode (Mobile) via Media Query (from Block 1) */
@media (max-width: 768px) {
    :root {
        --background-color: #333333; /* Dark Background */
        --text-color: #FFFFFF;       /* Light Text */
        --card-background: #1E1E1E;  /* Darker Card Background */
        --header-background: #333333;
        --drawer-background: #333333;
    }
}

/* 4) Global Base Styles */
body {
    font-family: 'Poppins', sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
}

a {
    color: var(--text-color);
}

/* 5) Header Style */
header {
    background-color: var(--header-background);
    color: var(--primary-color);
    padding: 1rem;
    text-align: center;
    font-family: 'Orbitron', sans-serif;
    font-size: 1.5rem;
    z-index: 10;
    width: 100%;
    /* fix to top of screen */
    position: fixed;
}

/* 6) Containers and Cards */
.container {
    padding: 1rem;
}

/* Main .card styling */
.card {
    background-color: var(--card-background);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 1rem;
    margin-bottom: 1rem;
}

/* Headings inside cards */
.card h2 {
    display: flex;
    justify-content: center; /* horizontal center */
    align-items: center;     /* vertical center */
    text-align: center;
    margin: 0;
    font-size: 24px;
    color: var(--text-color);
}

/* Another heading style, if needed */
.card h3 {
    color: var(--text-color);
    font-family: 'Orbitron', sans-serif;
    text-align: center;
    margin-bottom: 1rem;
}

.coach-chat-widget {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    font-family: 'Poppins', sans-serif;
}

.coach-chat-launcher {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: #000;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.18);
}

.coach-chat-launcher img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.coach-chat-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(2px);
    z-index: 9998;
}

.coach-chat-panel {
    position: fixed;
    bottom: 96px;
    right: 24px;
    width: 320px;
    min-width: 280px;
    max-width: 640px;
    max-height: 70vh;
    background: var(--card-background);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
    display: flex;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9999;
    position: fixed;
}

.coach-chat-panel-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.coach-chat-panel::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    pointer-events: none;
}

.coach-chat-resize-handle {
    position: absolute;
    top: 0;
    left: 0;
    width: 12px;
    height: 100%;
    cursor: ew-resize;
    z-index: 1;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    background: rgba(0, 0, 0, 0.02);
}

.coach-chat-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.coach-chat-panel-coach {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.coach-chat-panel-coach img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.coach-chat-panel-title {
    font-weight: 600;
    color: var(--text-color);
}

.coach-chat-panel-subtitle {
    font-size: 0.85rem;
    color: #6b7280;
}

.coach-chat-close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #999;
}

.coach-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    gap: 0.75rem;
    display: flex;
    flex-direction: column;
    background: #f7f7f7;
}

.coach-chat-bubble {
    display: inline-flex;
    gap: 0.5rem;
    align-items: flex-start;
    background: #fff;
    border-radius: 16px;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    max-width: calc(100% - 2rem);
}

.coach-chat-bubble img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

.coach-chat-bubble p {
    margin: 0;
    color: #111;
    font-size: 0.95rem;
}

.coach-chat-bubble-user {
    align-self: flex-end;
    background: var(--primary-color);
}

.coach-chat-bubble-user p {
    color: #000;
}

.coach-chat-bubble-system {
    align-self: center;
    background: transparent;
    box-shadow: none;
    color: #6b7280;
    font-size: 0.9rem;
}

.coach-chat-form {
    display: flex;
    padding: 0.75rem;
    gap: 0.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.coach-chat-form input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 0.5rem 1rem;
    font-size: 0.95rem;
}

.coach-chat-form button {
    border: none;
    border-radius: 999px;
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: #000;
    font-weight: 600;
    cursor: pointer;
}

@media (max-width: 640px) {
    .coach-chat-panel {
        width: calc(100% - 2rem);
        right: 1rem;
        left: 1rem;
        bottom: 1rem;
        max-height: 80vh;
        max-width: none;
    }

    .coach-chat-launcher {
        width: 54px;
        height: 54px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
    }

    .coach-chat-launcher span {
        display: none;
    }
}

/* 7) Buttons & Inputs */
.button-center {
    display: flex;
    justify-content: center;
}

/* General button style */
button {
    background-color: var(--primary-color);
    color: black;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
    text-transform: uppercase;
    font-family: 'Orbitron', sans-serif;
}

button:hover {
    background-color: var(--secondary-color);
}

/* Form elements */
input, select, textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    background-color: var(--card-background);
    color: var(--text-color);
    font-family: Arial, sans-serif;
}

input:focus, select:focus, textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

/* For <input type="submit"> specifically */
input[type="submit"] {
    background-color: var(--primary-color);
    color: #FFFFFF;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1rem;
}
input[type="submit"]:hover {
    background-color: var(--secondary-color);
}

/* 8) Checkboxes & Sliders */
input[type="checkbox"] {
    accent-color: var(--primary-color);
    width: 20px; /* optional */
    height: 20px; /* optional */
}

input[type="range"] {
    -webkit-appearance: none; /* Remove default styling */
    width: 100px;  /* Adjust width as needed */
    height: 10px;  /* Thickness of the slider track */
    background: white; 
    border-radius: 5px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    margin-top: -5px;
}
input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    margin-top: -5px;
}
input[type="range"]::-ms-thumb {
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
    margin-top: -5px;
}
input[type="range"]::-webkit-slider-runnable-track {
    height: 10px;
    background: white;
    border-radius: 5px;
}

/* 9) Date Navigation */
.date-navigation {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}
.date-navigation button {
    background-color: var(--primary-color);
    color: black;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    margin: 0 0.5rem;
}
.date-navigation button:hover {
    background-color: var(--secondary-color);
}
.date-navigation input {
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 0.5rem;
    text-align: center;
    max-width: 150px;
}
.date-navigation form {
    display: inline-flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

/* 10) Charts */
.chart {
    width: 100%;
    height: 400px;
}
.workout-chart {
    width: 100%;
    height: 200px;
}

/* 11) Bottom Sheet & Chat Elements */
.bottom-sheet {
    position: fixed;
    bottom: 4rem; /* or 0 if you want it flush at the bottom */
    left: 0;
    width: 100%;
    background-color: var(--card-background);
    border-top-left-radius: var(--border-radius);
    border-top-right-radius: var(--border-radius);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    z-index: 10;
}
.bottom-sheet.open {
    transform: translateY(0);
}
.bottom-sheet.closed {
    transform: translateY(calc(100% - 8rem));
}
.bottom-sheet-header {
    padding: 1rem;
    background-color: var(--drawer-background);
    color: var(--text-color);
    text-align: center;
    font-weight: bold;
    cursor: pointer;
}

/* Chat layout */
.chat {
    display: flex;
    flex-direction: column;
    max-height: 50vh;
    overflow-y: auto;
    padding: 0.5rem;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    display: none; /* hide by default, or remove if you want always visible */
}
.chat-messages.open {
    display: block;
}
.chat-message {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.5rem;
}
.chat-message img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 0.5rem;
}
.chat-input {
    display: flex;
    gap: 0.5rem;
    padding: 0.5rem 0;
    background-color: var(--card-background);
    position: relative;
    z-index: 2;
}
.chat-input input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
}
.chat-input button {
    background-color: var(--primary-color);
    color: black;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
}
.chat-input button:hover {background-color: var(--secondary-color);}
.hidden_div_container {width:500px;}
.large-icon {font-size: 2rem;}
.left-list {display: inline-block; text-align: left;}
.left-list li label {display: inline-flex; align-items: center; gap: 0.5rem;}
.menu-overlay {position: absolute; top: 60px; /* Adjust based on header height */ left: 0; width: 100%; height: calc(100% - 60px); background-color: var(--card-background); box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); transform: translateY(-100%); transition: transform 0.3s ease-in-out; z-index: 2; overflow-y: auto;}
.menu-overlay.open {transform: translateY(0);}
.overlay-content {font-family: Arial, sans-serif; font-size: 16px; color: var(--text-color); padding: 1rem; background-color: var(--card-background); border-radius: var(--border-radius); box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);}
.overlay-content p {margin: 0.5rem 0; font-size: 1.2rem; font-weight: bold; color: var(--primary-color);}
.overlay-content select {font-size: 1rem; width: 100%; padding: 0.5rem; border: 1px solid var(--secondary-color); border-radius: var(--border-radius);background-color: var(--card-background);color: var(--text-color);}
.overlay-content table {width: 100%; border-collapse: collapse; margin-top: 1rem;}
.overlay-content th, .overlay-content td {border: none; padding: 0.5rem; text-align: center; font-size: 1rem;}
.overlay-content th {background-color: var(--primary-color); color: white; font-weight: bold;}
.overlay-content input[type="number"] {width: 100%; padding: 0.5rem; font-size: 1rem; border: 1px solid var(--secondary-color); border-radius: var(--border-radius);}
.overlay-content input[type="checkbox"] {transform: scale(1.5); margin: 0.5rem;}
.overlay-content button {background-color: var(--primary-color); color: black; padding: 0.5rem 1rem; font-size: 1rem; border: none; border-radius: var(--border-radius); cursor: pointer; margin-top: 1rem;}
.overlay-content button:hover {background-color: var(--secondary-color);}
/* 13) Tabs */
.tabs {
    position: fixed;
    bottom: 0;
    width: 100%;
    background-color: var(--drawer-background);
    display: flex;
    justify-content: space-around;
    padding: 0.5rem;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 1;
}
.tabs button {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 0.8rem;
    cursor: pointer;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
}
.tabs button img {
    margin-bottom: 0.3rem;
    width: 24px;
    height: 24px;
}
.tabs button:hover {
    color: var(--primary-color);
}

/* 14) Garmin Activity List & Radio (from Block 3) */
.activity-list {
    display: block;
    width: 80%;
    list-style: none;
    padding: 0;
    margin: 1rem auto;
    text-align: left;
}
.activity-list li {
    margin-bottom: 1rem; /* Increase for more space */
}
.activity-list li label {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.5rem;
    align-items: center;
}

.activity-item {
    margin-bottom: 0.5rem;
}
.activity-item label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.activity-item input[type="radio"] {
    accent-color: var(--primary-color);
}

/* Two-column layout for desktop, stacked on mobile */
.desktop-two-col {
    display: block; /* default for mobile (stacked) */
  }
  
  /* On wider screens, display side-by-side */
  @media (min-width: 768px) {
    .desktop-two-col {
      display: flex;
      gap: 1rem; /* space between columns */
    }
  
    .col-left, .col-right {
      /* Each column can flex to fill space or use fixed widths */
      flex: 1;
    }
  }
  

/* 15) Misc. */
.fa-gear {
    float: right;
    cursor: pointer;
}
/* Hide the gear icon on desktop */
@media (min-width: 768px) {
    .gear-holder {
        visibility: hidden;
    }
}

#coach_image {
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin-left: 10px;
    vertical-align: bottom;
}
#explanation_k1 {width:50%; display:none;}
#explanation_k2 {width:50%; display:none;}
#explanation_p0 {width:50%; display:none;}
#explanation_fc {width:50%; display:none;}
#explanation_k1_trigger {cursor:pointer; vertical-align: top;}
#explanation_k2_trigger {cursor:pointer; vertical-align: top;}
#explanation_p0_trigger {cursor:pointer; vertical-align: top;}
#explanation_fc_trigger {cursor:pointer; vertical-align: top;}
#nutrition-pie-chart {margin: 20px auto; /* Center the chart */padding: 10px; /* Spacing around the chart */max-width: 90%; /* Keep it responsive */}
#nutrition-stats p {margin: 5px 0; font-size: 1rem;}
#nutrition-stats a {color: var(--primary-color); text-decoration: underline; margin-top: 10px; display: block;}
#toggle_buttons {color: white; font-family: 'Poppins', sans-serif; font-size: 20px;}

/* 
   16) Title Box & Buttons
   (Moved from your inline <style> in the Workout Summary page)
*/
.title-box {
    width: 97%; /* Adjust width as needed */
    display: flex;              /* Use flex to place items side by side */
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #ccc;               /* Or use var(--secondary-color) if you prefer */
    border-radius: 5px;                   /* Could also use var(--border-radius) */
    background-color: #f7f7f7;            /* For consistency, you could use var(--card-background) */
}

.title-left {
    color: black;               /* Or use var(--text-color) */
}

.title-left h2 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.summary-stats span {
    margin-right: 1rem;
}

.title-right {
    display: flex;
    flex-direction: column;    /* Stack buttons vertically */
    align-items: flex-end;     /* Align buttons to the right */
}

/* Both buttons in .title-right share these properties */
.title-right button,
.title-right a.import-btn {
    width: 89px;                  /* Set button width (can adjust as needed) */
    background-color: var(--primary-color);
    margin: 4px 0;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    border: none;
    border-radius: 4px;           /* Could also use var(--border-radius) for consistency */
    cursor: pointer;
    display: flex;                /* center text within */
    justify-content: center;
    align-items: center;
    text-align: center;
    text-decoration: none;        /* remove link underline */
    font-family: 'Orbitron', sans-serif; /* Matches your theme */
    text-transform: none;         /* override the global uppercase if needed */
}

/* Adjust the "Do Workout" button style if you like */
.title-right .do-workout-btn {
    width: 120px;       /* Slightly wider */
    text-transform: none !important; /* keep text normal (override global uppercase) */
}

/* Example styling for the import button. Adjust if you want a different look. */
.title-right .import-btn {
    /* Keeping the same as the main style block, 
       but you can override width/color here if you want. */
    text-transform: none !important;
}

/* For screens wider than 768px (desktop) */
@media (min-width: 768px) {
    /* Hide the bottom menu on desktop */
    .tabs {
        display: none;
    }
    /* Show the header links on desktop */
    .desktop-header-links {
        display: flex;
        align-items: center;
        gap: clamp(24px, 6vw, 100px);
        justify-content: center;
        margin-top: 10px;
        padding-left: 30px;
    }
    .desktop-header-links a {
        font-size: 20px;
        color: #D0D0D0;
        text-decoration: none;
        font-family: 'Poppins', sans-serif;
        text-transform: none;
    }
    .desktop-header-links a:hover {
        color: white;
    }
    .desktop-header-links a.active{
        color: white
    }
}

/* For screens narrower than 768px (mobile) */
@media (max-width: 767px) {
    /* Hide desktop header links on mobile */
    .desktop-header-links {
        display: none;
    }
}

/* Default header styling (mobile) */
header .header-top {
    text-align: center;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
}

/* Desktop-specific header styling */
@media (min-width: 768px) {
    header .header-top {
        text-align: left;
        font-size: 2.5rem; /* adjust size as needed */
    }
}

/* Nutrition functionality styles */
.food-description-section {
    margin-bottom: 1rem;
}

.help-text {
    margin-bottom: 0.5rem;
}

.help-text small {
    color: var(--secondary-color);
    font-style: italic;
}

.nutrition-results {
    margin-top: 1rem;
    padding: 1rem;
    background-color: var(--card-background);
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
}

.nutrition-results label {
    display: block;
    margin-bottom: 0.5rem;
}

.nutrition-results input {
    margin-bottom: 1rem;
}

.calculate-nutrition {
    background-color: var(--primary-color);
    color: black;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

.calculate-nutrition:hover {
    background-color: var(--secondary-color);
}

.calculate-nutrition:disabled {
    background-color: var(--secondary-color);
    cursor: not-allowed;
}

.meal-entry {
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    background-color: var(--card-background);
}

.template-section {
    margin-bottom: 2rem;
    padding: 1rem;
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    background-color: var(--card-background);
}

.template-section h2 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.template-section h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    text-align: center;
}

/* Template header and expand/collapse styles */
.template-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background-color: var(--card-background);
    border-bottom: 1px solid var(--secondary-color);
    cursor: pointer;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.template-header h2 {
    color: #000000 !important; /* Black color for headings */
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.template-summary {
    color: var(--secondary-color);
    font-size: 0.9rem;
    font-style: italic;
    margin: 0 1rem;
    flex-grow: 1;
    text-align: center;
}

.expand-collapse-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.expand-collapse-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}

.template-content {
    padding: 1rem;
    border-radius: 0 0 var(--border-radius) var(--border-radius);
}

/* Ensure template sections have proper spacing */
.template-section {
    margin-bottom: 2rem;
    border: 1px solid var(--secondary-color);
    border-radius: var(--border-radius);
    background-color: var(--card-background);
    overflow: hidden;
}

/* Updated header layout with larger tallies and pie charts */
.template-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background-color: var(--card-background);
    border-bottom: 1px solid var(--secondary-color);
    cursor: pointer;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.header-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-grow: 1;
}

.header-left h2 {
    color: #000000 !important; /* Black color for headings */
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
    font-weight: bold;
}

.template-summary {
    color: var(--text-color);
    font-size: 1.1rem;
    font-weight: 500;
    margin: 0;
    text-align: left;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Pie chart container */
.header-right canvas {
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: #f5f5f5;
    border: 2px solid #e0e0e0;
}

/* Fallback styling for pie charts */
.header-right canvas {
    min-width: 60px;
    min-height: 60px;
    max-width: 60px;
    max-height: 60px;
}

/* Empty chart styling */
.header-right canvas:empty {
    background-color: #f0f0f0;
    border: 2px dashed #ccc;
}

/* External tooltip styling */
#chartjs-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-family: Arial, sans-serif;
    pointer-events: none;
    z-index: 1000;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    max-width: 200px;
    word-wrap: break-word;
}

#chartjs-tooltip .tooltip-title {
    font-weight: bold;
    margin-bottom: 4px;
    color: #fff;
}

#chartjs-tooltip .tooltip-content {
    color: #f0f0f0;
}

.expand-collapse-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.2s;
    min-width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.expand-collapse-btn:hover {
    background-color: var(--secondary-color);
    color: white;
}
.logout-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

.logout-link {
    border: 0;
    background: transparent;
    background-color: transparent;
    color: inherit;
    font: inherit;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
    border-radius: 0;
    box-shadow: none;
}

.logout-link:hover,
.logout-link:focus,
.logout-link:active {
    background: transparent;
    background-color: transparent;
    color: inherit;
    box-shadow: none;
    outline: none;
}

@media (min-width: 768px) {
    .desktop-header-links .logout-link {
        font-size: 20px;
        color: #D0D0D0;
        text-decoration: none;
        font-family: 'Poppins', sans-serif;
        text-transform: none;
    }

    .desktop-header-links .logout-link:hover,
    .desktop-header-links .logout-link:focus,
    .desktop-header-links .logout-link:active {
        background: transparent;
        background-color: transparent;
        color: white;
        box-shadow: none;
    }
}
