:root {
	/* Primary Theme: Blue Heeler */
	--color-primary: #4682b4;           /* Steel Blue (Primary) */
	--color-primary-light: #cfdcff;     /* Very Light Blue (Primary Light) */
	--color-primary-dark: #191970;      /* Midnight Blue (Primary Dark) */
	--color-accent: #d2691e;            /* Red Rust (Accent) */
	--color-accent-light: #d2b48c;      /* Tan (Accent Light) */
	--color-accent-dark: #b45c5c;       /* Muted Rust (Accent Dark) */
	--color-secondary: #708090;         /* Slate Gray (Secondary) */
	--color-secondary-light: #e3f0ff;   /* Light Slate/Blue (Secondary Light) */
	--color-secondary-dark: #2c5cda;    /* Blue (Secondary Dark) */
	--color-tertiary: #47beff;          /* Light Blue (Tertiary) */
	--color-tertiary-dark: #2d3a3e;     /* Deep Slate/Blue-Gray (Tertiary Dark) */
	--color-tertiary-light: #e0e6e9;    /* Pale Gray-Blue (Tertiary Light) */
	--color-warm: #e6b07a;              /* Warm Tan/Peach (Warm) */
	--color-warm-light: #ffe3e3;        /* Light Peach (Warm Light) */
	--color-warm-dark: #b45c5c;         /* Rusty Brown (Warm Dark, same as Accent Dark) */
	--color-neutral: #f5f5f5;           /* Off White (Neutral) */
	--color-neutral-light: #f0f0f0;     /* Light Gray (Neutral Light) */
	--color-neutral-medium: #666666;    /* Medium Gray (Neutral Medium) */
	--color-neutral-dark: #222831;      /* Charcoal (Neutral Dark) */
	--color-black: #181818;             /* Black */
	--color-danger: #dc2626;            /* Danger/Error (Red) */
	--icon-meal: #7bb6fa;               /* Icon: Meal (Blue) */
	--icon-workout: #b47bfa;            /* Icon: Workout (Purple) */
	--icon-weather: #47beff;            /* Icon: Weather (Light Blue, same as Tertiary) */
	--icon-calendar: #fa7bb6;           /* Icon: Calendar (Pink) */
	--color-empty-state: #b0b0b0;       /* Empty State (Medium Gray) */
	
	/* Workout-specific variables */
	--workout-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	--workout-shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
	--workout-shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
	--workout-shadow-heavy: 0 12px 32px rgba(59, 130, 246, 0.2);
	--workout-border-radius: 12px;
	--workout-border-radius-small: 8px;
	
	/* Exercise Purpose Colors */
	--purpose-warmup: #4CAF50;
	--purpose-warmup-bg: rgba(76, 175, 80, 0.2);
	--purpose-warmup-text: #2E7D32;
	--purpose-technique: #2196F3;
	--purpose-technique-bg: rgba(33, 150, 243, 0.2);
	--purpose-technique-text: #1565C0;
	--purpose-corelift: #FF9800;
	--purpose-corelift-bg: rgba(255, 152, 0, 0.2);
	--purpose-corelift-text: #E65100;
	--purpose-strength: #9C27B0;
	--purpose-strength-bg: rgba(156, 39, 176, 0.2);
	--purpose-strength-text: #7B1FA2;
	--purpose-accessory: #607D8B;
	--purpose-accessory-bg: rgba(96, 125, 139, 0.2);
	--purpose-accessory-text: #455A64;
}

[data-theme="lynx"] {
	/* Highland Lynx: Black, White, Gray */
	--color-primary: #222831;           /* Charcoal (Primary) */
	--color-primary-light: #e0e0e0;     /* Light Gray (Primary Light) */
	--color-primary-dark: #181818;      /* Near Black (Primary Dark) */
	--color-accent: #b0b0b0;            /* Medium Gray (Accent) */
	--color-accent-light: #f5f5f5;      /* Off White (Accent Light) */
	--color-accent-dark: #444444;       /* Dark Gray (Accent Dark) */
	--color-secondary: #888888;         /* Gray (Secondary) */
	--color-secondary-light: #cccccc;   /* Lighter Gray (Secondary Light) */
	--color-secondary-dark: #333333;    /* Darker Gray (Secondary Dark) */
	--color-tertiary: #ffffff;          /* White (Tertiary) */
	--color-tertiary-dark: #222831;     /* Charcoal (Tertiary Dark, same as Primary) */
	--color-tertiary-light: #e0e0e0;    /* Light Gray (Tertiary Light, same as Primary Light) */
	--color-warm: #b0b0b0;              /* Medium Gray (Warm, same as Accent) */
	--color-warm-light: #e0e0e0;        /* Light Gray (Warm Light, same as Primary Light) */
	--color-warm-dark: #444444;         /* Dark Gray (Warm Dark, same as Accent Dark) */
	--color-neutral: #f5f5f5;           /* Off White (Neutral, same as Accent Light) */
	--color-neutral-light: #f0f0f0;     /* Light Gray (Neutral Light) */
	--color-neutral-medium: #666666;    /* Medium Gray (Neutral Medium) */
	--color-neutral-dark: #181818;      /* Near Black (Neutral Dark, same as Primary Dark) */
	--color-white: #ffffff;             /* White */
	--color-black: #181818;             /* Black (same as Primary Dark, Neutral Dark) */
	--color-danger: #dc2626;            /* Danger/Error (Red) */
	--icon-meal: #888888;               /* Icon: Meal (Gray) */
	--icon-workout: #b0b0b0;            /* Icon: Workout (Medium Gray, same as Accent) */
	--icon-weather: #cccccc;            /* Icon: Weather (Light Gray) */
	--icon-calendar: #b0b0b0;           /* Icon: Calendar (Medium Gray, same as Accent) */
	--color-empty-state: #666666;       /* Empty State (Dark Gray) */
	
	/* Workout-specific variables (same across themes) */
	--workout-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	--workout-shadow-light: 0 2px 8px rgba(0, 0, 0, 0.1);
	--workout-shadow-medium: 0 4px 16px rgba(0, 0, 0, 0.15);
	--workout-shadow-heavy: 0 12px 32px rgba(59, 130, 246, 0.2);
	--workout-border-radius: 12px;
	--workout-border-radius-small: 8px;
	
	/* Exercise Purpose Colors (same across themes for consistency) */
	--purpose-warmup: #4CAF50;
	--purpose-warmup-bg: rgba(76, 175, 80, 0.2);
	--purpose-warmup-text: #2E7D32;
	--purpose-technique: #2196F3;
	--purpose-technique-bg: rgba(33, 150, 243, 0.2);
	--purpose-technique-text: #1565C0;
	--purpose-corelift: #FF9800;
	--purpose-corelift-bg: rgba(255, 152, 0, 0.2);
	--purpose-corelift-text: #E65100;
	--purpose-strength: #9C27B0;
	--purpose-strength-bg: rgba(156, 39, 176, 0.2);
	--purpose-strength-text: #7B1FA2;
	--purpose-accessory: #607D8B;
	--purpose-accessory-bg: rgba(96, 125, 139, 0.2);
	--purpose-accessory-text: #455A64;
}

/* ==========================================
   SHARED EXERCISE PURPOSE STYLES
   ========================================== */

/* Purpose badge/label base styles */
.purpose-badge,
.purpose-label {
	font-size: 0.7rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	padding: 2px 8px;
	border-radius: 4px;
	width: fit-content;
}

/* Purpose colors - background and text */
.purpose-warmup {
	--purpose-border: var(--purpose-warmup);
}
.purpose-badge.purpose-warmup,
.purpose-label.purpose-warmup {
	background: var(--purpose-warmup-bg);
	color: var(--purpose-warmup-text);
}

.purpose-technique {
	--purpose-border: var(--purpose-technique);
}
.purpose-badge.purpose-technique,
.purpose-label.purpose-technique {
	background: var(--purpose-technique-bg);
	color: var(--purpose-technique-text);
}

.purpose-corelift {
	--purpose-border: var(--purpose-corelift);
}
.purpose-badge.purpose-corelift,
.purpose-label.purpose-corelift {
	background: var(--purpose-corelift-bg);
	color: var(--purpose-corelift-text);
}

.purpose-strength {
	--purpose-border: var(--purpose-strength);
}
.purpose-badge.purpose-strength,
.purpose-label.purpose-strength {
	background: var(--purpose-strength-bg);
	color: var(--purpose-strength-text);
}

.purpose-accessory {
	--purpose-border: var(--purpose-accessory);
}
.purpose-badge.purpose-accessory,
.purpose-label.purpose-accessory {
	background: var(--purpose-accessory-bg);
	color: var(--purpose-accessory-text);
}

html, body {
	font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
	height: 100%;
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	overflow-x: hidden;
}

/* Apply box-sizing to all elements */
*, *::before, *::after {
	box-sizing: border-box;
}

#blazor-error-ui {
	background: lightyellow;
	bottom: 0;
	box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
	display: none;
	left: 0;
	padding: 0.6rem 1.25rem 0.7rem 1.25rem;
	position: fixed;
	width: 100%;
	z-index: 1000;
}

#blazor-error-ui .dismiss {
	cursor: pointer;
	position: absolute;
	right: 0.75rem;
	top: 0.5rem;
}

.blazor-error-boundary {
	background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI26My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA9eWd1ODUuZmZmZjpmbG9hdCgiY2xpcDAiKTs8Yz49ICQgIDwvYz48L2c+PC9zdmc+) no-repeat 1rem/1.8rem, #b32121;
	padding: 1rem 1rem 1rem 3.7rem;
	color: white;
}

.blazor-error-boundary::after {
	content: "An error has occurred."
}

/* ===========================================================================
   FLUENT APPBAR MOBILE RESPONSIVE STYLES
   =========================================================================== */

/* Responsive AppBar container */
.app-bar-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 16px;
}

/* Desktop AppBar - show normally */
.app-bar-desktop {
    display: block;
}

/* Mobile AppBar - hidden on desktop */
.app-bar-mobile {
    display: none;
}

/* Mobile header with menu button */
.mobile-app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 16px;
    background-color: #f5f5f5;
    border-radius: 8px;
}

.mobile-app-header h3 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.mobile-menu-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    padding: 8px;
    border: none;
    background: transparent;
    border-radius: 8px;
    cursor: pointer;
    color: #333;
}

.mobile-menu-toggle:hover {
    background-color: #e0e0e0;
}

.mobile-menu-toggle:active {
    background-color: #d0d0d0;
}

/* Mobile menu dropdown */
.mobile-menu-dropdown {
    background-color: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-top: 8px;
    overflow: hidden;
}

.mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border: none;
    background: white;
    width: 100%;
    text-align: left;
    font-size: 1rem;
    color: #333;
}

.mobile-menu-item:hover {
    background-color: #f5f5f5;
}

.mobile-menu-item.active {
    background-color: #e3f2fd;
    color: #1976d2;
    font-weight: 600;
}

/* Mobile breakpoint */
@media (max-width: 600px) {
    .app-bar-container {
        padding: 8px;
    }
    
    .app-bar-desktop {
        display: none;
    }
    
    .app-bar-mobile {
        display: block;
        position: relative;
    }
}

/* Tablet breakpoint */
@media (min-width: 601px) and (max-width: 768px) {
    .app-bar-container {
        padding: 12px;
    }
}

/* ===========================================================================
   NESTED DIALOG FIX - Ensure inputs are clickable in stacked dialogs
   =========================================================================== */

/* FluentDialog uses an overlay that can block inputs in sibling dialogs.
   When multiple dialogs are open, the later dialog needs higher z-index. */

/* Base dialog z-index */
fluent-dialog {
    --dialog-z-index: 1000;
}

/* Edit workout dialog - base level */
fluent-dialog.edit-workout-dialog {
    --dialog-z-index: 1000;
}

/* Add exercise dialog - higher level (opens on top of edit-workout) */
fluent-dialog.add-exercise-dialog {
    --dialog-z-index: 1100;
}

/* Target the overlay pseudo-element that FluentDialog creates */
fluent-dialog.add-exercise-dialog::part(overlay) {
    z-index: 1099 !important;
}

fluent-dialog.add-exercise-dialog::part(control) {
    z-index: 1100 !important;
}

fluent-dialog.add-exercise-dialog::part(dialog) {
    z-index: 1100 !important;
}

/* Generate workout dialog - same level as add-exercise */
fluent-dialog.generate-workout-dialog {
    --dialog-z-index: 1100;
}

fluent-dialog.generate-workout-dialog::part(overlay) {
    z-index: 1099 !important;
}

fluent-dialog.generate-workout-dialog::part(control) {
    z-index: 1100 !important;
}

/* ===========================================================================
   EXTERNAL LOGIN BUTTONS - Google Sign-In Button Styling
   =========================================================================== */

.external-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

/* Google Sign-In Button - Following Google's branding guidelines */
.google-sign-in-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 10px 24px;
    min-width: 240px;
    height: 44px;
    background-color: #ffffff;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #3c4043;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    text-decoration: none;
}

.google-sign-in-button:hover {
    background-color: #f7f8f8;
    box-shadow: 0 1px 2px 0 rgba(60, 64, 67, 0.3), 0 1px 3px 1px rgba(60, 64, 67, 0.15);
}

.google-sign-in-button:active {
    background-color: #f1f3f4;
}

.google-sign-in-button:focus {
    outline: 2px solid rgba(66, 133, 244, 0.8);
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.3);
}

.google-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.google-button-text {
    flex-grow: 0;
    white-space: nowrap;
}
