/* =============================
   Font Loading & CoachXtra Logo Styling
   ============================= */

/* Font face declaration for mazzardh-bold - add the font files when available */
@font-face {
    font-family: "mazzardh-bold";
    src: url("fonts/mazzardh-bold.woff2") format("woff2"),
         url("fonts/mazzardh-bold.woff") format("woff");
    font-weight: bold;
    font-style: normal;
    font-display: swap; /* Ensures fallback fonts are shown while loading */
}

.coachxtra-logo {
    color: #3195FF !important;
    font-family: "mazzardh-bold", Verdana, Arial, sans-serif !important;
    font-weight: bold !important;
    line-height: 1.2 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
}

/* Drawer header alignment fixes */
.mud-drawer-header {
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

/* =============================
   ChatGPT-like styling overrides
   ============================= */

.chatgpt-sidebar {
    background-color: #f9fafb !important;
    border-right: 1px solid #e5e7eb !important;
    box-shadow: none !important;
    height: 100vh !important;
    overflow: hidden !important;
    
}

.chatgpt-sidebar .mud-drawer-content {
    background-color: #f9fafb !important;
    height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding: 0 !important;
}

.mud-appbar {
    background-color: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    box-shadow: none !important;
}

.mud-main-content {
    background-color: #ffffff !important;
}

/* Override MudBlazor default colors */
.mud-icon-button .mud-icon-root {
    color: #374151 !important;
}

.mud-typography {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
}

/* Card and surface improvements */
.mud-paper {
    background: #ffffff !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06) !important;
}

/* Input field improvements */
.mud-input {
    background: #ffffff !important;
    border: 1px solid #d1d5db !important;
    border-radius: 6px !important;
    color: #111827 !important;
}

.mud-input:hover {
    border-color: #9ca3af !important;
}

.mud-input.mud-input-focused {
    border-color: #374151 !important;
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1) !important;
}

/* Ensure drawer height and flexbox layout - HIDE ALL SCROLLBARS */
.mud-drawer {
    height: 100vh !important;
    overflow: hidden !important;
}

.mud-drawer .mud-drawer-content {
    height: 100% !important;
    overflow: hidden !important;
}

/* Hide scrollbars completely */
.mud-drawer *,
.chatgpt-sidebar *,
.mud-drawer-content * {
    scrollbar-width: none !important; /* Firefox */
    -ms-overflow-style: none !important; /* Internet Explorer 10+ */
}

.mud-drawer *::-webkit-scrollbar,
.chatgpt-sidebar *::-webkit-scrollbar,
.mud-drawer-content *::-webkit-scrollbar {
    display: none !important; /* Safari and Chrome */
    width: 0 !important;
    height: 0 !important;
}

/* EXCEPTION: Always show scrollbar for chat-list-container */
.chat-list-container {
    scrollbar-width: thin !important; /* Firefox - override the none above */
    -ms-overflow-style: auto !important; /* Internet Explorer 10+ - override */
}

.chat-list-container::-webkit-scrollbar {
    display: block !important; /* Safari and Chrome - override the none above */
    width: 8px !important; /* override the 0 above */
}

/* Remove any default MudBlazor padding that might cause overflow */
.mud-drawer .mud-drawer-header {
    padding-left: 14px !important;
    padding-right: 0 !important;
}


/* =============================
   Home Page Styling
   ============================= */

.home-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 128px);
    padding: 2rem;
    background: #f8f9fa;
}

.home-content {
    text-align: center;
    max-width: 900px;
    width: 100%;
}

.home-title {
    font-size: 2.5rem;
    font-weight: 400;
    color: #1a1a1a;
    margin-bottom: 3rem;
    line-height: 1.2;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.search-container {
    display: flex;
    justify-content: center;
    margin-bottom: 2rem;
    width: 100%;
}

/* Home page chat input - make it wide like ChatGPT */
.home-chat-input { 
    width: 100%; 
    max-width: 100%; 
}

.home-chat-input .chat-input-content {
    width: 100%;
    max-width: 100%;
}

.home-chat-input .chat-input-wrapper { 
    max-width: 100%; 
    width: 100%; 
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 750px;
    background: white;
    border-radius: 30px;
    padding: 12px 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.2s ease;
    min-height: 48px;
}

.search-input-wrapper:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.search-input-wrapper:focus-within {
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

.search-add-icon {
    margin-right: 12px;
    color: #5f6368 !important;
    background: transparent !important;
    flex-shrink: 0;
}

.search-add-icon:hover {
    background: rgba(95, 99, 104, 0.08) !important;
}

.search-input-native {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 18px;
    color: #1a1a1a;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
    margin: 0 8px;
    padding: 0;
    height: 24px;
}

.search-input-native::placeholder {
    color: #9aa0a6;
    font-size: 18px;
}

.search-icons {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    flex-shrink: 0;
}

.search-icon {
    color: #5f6368 !important;
    background: transparent !important;
    padding: 8px !important;
}

.search-icon:hover {
    background: rgba(95, 99, 104, 0.08) !important;
}

/* Mobile responsive styles for home page */
@media (max-width: 768px) {
    .home-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }
    
    .home-container {
        padding: 1rem;
        min-height: calc(100vh - 100px);
    }
    
    .search-input-wrapper {
        max-width: 90%;
        padding: 10px 12px;
        min-height: 44px;
    }
    
    .search-input-native {
        font-size: 16px;
        height: 20px;
    }
    
    .search-input-native::placeholder {
        font-size: 16px;
    }
}

/* =============================
   Global theme (light theme only)
   ============================= */
:root {
    --bp-bg: #ffffff;
    --bp-bg-alt: #f9fafb;
    --bp-surface: #ffffff;
    --bp-surface-alt: #f3f4f6;
    --bp-border: #e5e7eb;
    --bp-border-strong: #d1d5db;
    --bp-primary: #374151;
    --bp-primary-rgb: 55,65,81;
    --bp-primary-hover: #1f2937;
    --bp-accent: #6b7280;
    --bp-danger: #dc2626;
    --bp-warning: #f59e0b;
    --bp-success: #059669;
    --bp-text: #111827;
    --bp-text-muted: #6b7280;
    --bp-radius-sm: .375rem;
    --bp-radius: .5rem;
    --bp-radius-lg: .75rem;
    --bp-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --bp-focus: 0 0 0 3px rgba(var(--bp-primary-rgb), .1);
    --bp-font-stack: 'system-ui', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
    --bp-font-mono: 'JetBrains Mono', 'Cascadia Code', monospace;
    --bp-transition: .15s ease;
    --bp-container-max: 1200px;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.bp-body {
    margin: 0;
    font-family: var(--bp-font-stack);
    background: var(--bp-bg);
    color: var(--bp-text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Base transitions for smooth interactions */
*, *::before, *::after {
    transition: background-color var(--bp-transition), color var(--bp-transition), border-color var(--bp-transition);
}

/* Manage pages styling */
.manage-container {
    background: var(--bp-surface) !important;
    color: var(--bp-text) !important;
    border-color: var(--bp-border) !important;
}

/* Navigation styling */
.nav-pills {
    background: var(--bp-surface) !important;
    border-color: var(--bp-border) !important;
}

.nav-pills .nav-link {
    color: var(--bp-text) !important;
    background: transparent !important;
}

.nav-pills .nav-link.active {
    background: var(--bp-primary) !important;
    color: white !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: .5px;
    margin: 1.25rem 0 .75rem;
}

h1 { font-size: clamp(2.1rem, 4vw, 3rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }

p { line-height: 1.55; }

a { color: var(--bp-accent); text-decoration: none; transition: var(--bp-transition); }
a:hover { color: var(--bp-primary-hover); }
a:focus { outline: none; box-shadow: var(--bp-focus); border-radius: var(--bp-radius-sm); }

/* Layout utilities */
.bp-container {
    width: 100%;
    margin: 0 auto;
    padding: 0 1.25rem;
    max-width: var(--bp-container-max);
}
.bp-main { padding-top:1.5rem; min-height: calc(100vh - 64px - 140px); }
.bp-flex { display: flex; }
.bp-col { display: flex; flex-direction: column; }
.bp-center { display: flex; align-items: center; justify-content: center; }
.bp-gap-sm { gap: .5rem; }
.bp-gap { gap: 1rem; }
.bp-gap-lg { gap: 2rem; }

/* Cards / surfaces */
.bp-card {
    background: linear-gradient(145deg, var(--bp-surface), var(--bp-surface-alt));
    border: 1px solid var(--bp-border);
    border-radius: var(--bp-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--bp-shadow);
    position: relative;
    overflow: hidden;
}
.bp-card:hover { border-color: var(--bp-border-strong); }

/* Forms */
input[type=text], input[type=password], input[type=email], input[type=number], select {
    background: var(--bp-surface) !important;
    border: 1px solid var(--bp-border) !important;
    color: var(--bp-text) !important;
    padding: .65rem .75rem;
    font-size: .95rem;
    border-radius: var(--bp-radius-sm);
    transition: var(--bp-transition);
    width: 100%;
}
input:focus, select:focus {
    outline: none !important;
    border-color: var(--bp-primary) !important;
    box-shadow: var(--bp-focus) !important;
}
input.invalid, textarea.invalid, select.invalid { 
    border-color: var(--bp-danger) !important; 
}
input.valid.modified:not([type=checkbox]) { 
    border-color: var(--bp-success) !important; 
}
.validation-message { 
    color: var(--bp-danger) !important; 
    font-size: .8rem; 
    margin-top: .35rem; 
}

/* Fix Bootstrap form styling in Account pages */
.form-control {
    background: var(--bp-surface) !important;
    border: 1px solid var(--bp-border) !important;
    color: var(--bp-text) !important;
}

.form-control:focus {
    background: var(--bp-surface) !important;
    border-color: var(--bp-primary) !important;
    color: var(--bp-text) !important;
    box-shadow: var(--bp-focus) !important;
}

.form-label {
    color: var(--bp-text) !important;
    font-weight: 500;
}

/* Account page styling */
.text-danger {
    color: var(--bp-danger) !important;
}

.btn {
    transition: var(--bp-transition);
}

.btn-primary {
    background: var(--bp-primary) !important;
    border-color: var(--bp-primary) !important;
    color: white !important;
    border-radius: var(--bp-radius-sm) !important;
}

.btn-primary:hover {
    background: var(--bp-primary-hover) !important;
    border-color: var(--bp-primary-hover) !important;
}

.btn-primary:focus {
    box-shadow: var(--bp-focus) !important;
}

/* Ensure Account pages have proper theming */
h1, h2, h3, h4, h5, h6 {
    color: var(--bp-text) !important;
}

p, div, span {
    color: var(--bp-text);
}

a {
    color: var(--bp-accent) !important;
}

a:hover {
    color: var(--bp-primary-hover) !important;
}

/* Bootstrap Navigation Styling for Account/Manage pages */
.nav {
    background: transparent !important;
}

.nav-pills {
    background: var(--bp-surface) !important;
    border: 1px solid var(--bp-border) !important;
    border-radius: var(--bp-radius) !important;
    padding: 1rem !important;
}

.nav-pills .nav-item {
    margin-bottom: 0.5rem !important;
}

.nav-pills .nav-item:last-child {
    margin-bottom: 0 !important;
}

.nav-pills .nav-link {
    background: transparent !important;
    color: var(--bp-text) !important;
    border: 1px solid transparent !important;
    border-radius: var(--bp-radius-sm) !important;
    padding: 0.75rem 1rem !important;
    transition: var(--bp-transition) !important;
    text-decoration: none !important;
    display: block !important;
}

.nav-pills .nav-link:hover {
    background: var(--bp-surface-alt) !important;
    color: var(--bp-text) !important;
    border-color: var(--bp-border) !important;
}

.nav-pills .nav-link.active {
    background: var(--bp-primary) !important;
    color: white !important;
    border-color: var(--bp-primary) !important;
}

.nav-pills .nav-link.active:hover {
    background: var(--bp-primary-hover) !important;
    border-color: var(--bp-primary-hover) !important;
}

/* Row and column styling for Manage pages */
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.col-md-3, .col-md-6, .col-md-9 {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
}

/* Manage page specific styling */
.manage-container {
    background: var(--bp-surface) !important;
    border: 1px solid var(--bp-border) !important;
    border-radius: var(--bp-radius) !important;
    padding: 2rem !important;
    margin-top: 1rem !important;
    box-shadow: var(--bp-shadow) !important;
}

.manage-title {
    color: var(--bp-text) !important;
    border-bottom: 2px solid var(--bp-border) !important;
    padding-bottom: 1rem !important;
    margin-bottom: 2rem !important;
    font-weight: 600 !important;
}

.manage-subtitle {
    color: var(--bp-text) !important;
    margin-bottom: 1rem !important;
    font-weight: 500 !important;
}

/* Hr styling */
hr {
    border-color: var(--bp-border) !important;
    opacity: 1 !important;
}

/* Form floating labels for Account/Manage pages */
.form-floating {
    position: relative !important;
}

.form-floating > .form-control {
    background: var(--bp-surface) !important;
    border: 1px solid var(--bp-border) !important;
    color: var(--bp-text) !important;
    padding: 1rem 0.75rem 0.25rem 0.75rem !important;
}

.form-floating > .form-control:focus {
    background: var(--bp-surface) !important;
    border-color: var(--bp-primary) !important;
    color: var(--bp-text) !important;
    box-shadow: var(--bp-focus) !important;
}

.form-floating > .form-control:disabled {
    background: var(--bp-bg-alt) !important;
    border-color: var(--bp-border) !important;
    color: var(--bp-text-muted) !important;
    opacity: 0.7 !important;
}

.form-floating > label {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    padding: 1rem 0.75rem !important;
    pointer-events: none !important;
    border: 1px solid transparent !important;
    transform-origin: 0 0 !important;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out !important;
    color: var(--bp-text-muted) !important;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65 !important;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem) !important;
    color: var(--bp-primary) !important;
}

/* StatusMessage styling */
.alert {
    background: var(--bp-surface-alt) !important;
    border: 1px solid var(--bp-border) !important;
    color: var(--bp-text) !important;
    border-radius: var(--bp-radius-sm) !important;
    padding: 1rem !important;
    margin-bottom: 1rem !important;
}

.alert-success {
    background: rgba(47, 191, 113, 0.1) !important;
    border-color: var(--bp-success) !important;
    color: var(--bp-success) !important;
}

.alert-danger {
    background: rgba(230, 62, 62, 0.1) !important;
    border-color: var(--bp-danger) !important;
    color: var(--bp-danger) !important;
}

.alert-info {
    background: rgba(var(--bp-primary-rgb), 0.1) !important;
    border-color: var(--bp-primary) !important;
    color: var(--bp-primary) !important;
}

/* Checkboxes */
input[type=checkbox].form-check-input.darker-border-checkbox { border-color: var(--bp-border-strong); }

/* Buttons */
.bp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    font-weight: 500;
    font-size: .95rem;
    padding: .65rem 1.05rem;
    border-radius: var(--bp-radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    background: var(--bp-primary);
    color: #fff;
    transition: var(--bp-transition);
    text-decoration: none;
}
.bp-btn:hover { background: var(--bp-primary-hover); }
.bp-btn:focus { outline: none; box-shadow: var(--bp-focus); }
.bp-btn.secondary { background: var(--bp-surface-alt); border-color: var(--bp-border); }
.bp-btn.secondary:hover { border-color: var(--bp-border-strong); }
.bp-btn.danger { background: var(--bp-danger); }
.bp-btn.danger:hover { filter: brightness(1.1); }
.bp-btn.outline { background: transparent; border-color: var(--bp-primary); color: var(--bp-primary); }
.bp-btn.outline:hover { background: rgba(var(--bp-primary-rgb), .1); }

/* Navigation header */
header.bp-site-header {
    backdrop-filter: blur(10px);
    background: rgba(15,27,45,.7);
    border-bottom: 1px solid var(--bp-border);
    position: sticky;
    top: 0;
    z-index: 500;
}
header.bp-site-header .bp-container { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.bp-brand { font-size: 1.15rem; font-weight: 600; color: #fff; letter-spacing: .8px; }
.bp-nav { display: flex; gap: 1.25rem; }
.bp-nav a { font-size: .85rem; font-weight: 500; color: var(--bp-text-muted); }
.bp-nav a:hover { color: var(--bp-accent); }
.bp-nav a.active { color: var(--bp-accent); position: relative; }
.bp-nav a.active::after { content: ""; position: absolute; left: 0; bottom: -6px; height: 2px; width: 100%; background: var(--bp-accent); border-radius: 2px; }

/* =============================
   Chat Input & Upload thumbnails (updated to light style)
   ============================= */
.hidden-file-input { display:none !important; position:absolute !important; width:0 !important; height:0 !important; opacity:0 !important; pointer-events:none !important; }
.chat-input-content { display:flex; flex-direction:column; gap:8px; width:100%; }
.chat-input-wrapper { position:relative; display:flex; align-items:center; width:100%; max-width:none; background:#ffffff; border-radius:30px; padding:12px 16px; box-shadow:0 2px 8px rgba(0,0,0,0.08); transition:all .2s ease; min-height:48px; gap:12px; border:1px solid #e5e7eb; }
.chat-input-wrapper:hover { box-shadow:0 4px 12px rgba(0,0,0,0.12); }
.chat-input-wrapper:focus-within { box-shadow:0 2px 8px rgba(66,133,244,0.2); }
.upload-thumbs { display:flex; flex-wrap:wrap; gap:6px; align-items:center; padding:2px 4px; }
.upload-thumb { position:relative; width:46px !important; height:46px !important; border-radius:11px; overflow:hidden; background:#f3f4f6; flex:0 0 46px; border:1px solid #e5e7eb; }
.upload-thumb img { width:100% !important; height:100% !important; object-fit:cover !important; display:block; }
.upload-thumb .file-icon { width:100%; height:100%; display:flex; align-items:center; justify-content:center; color:#555; font-size:22px; }
.upload-thumb .remove-btn { position:absolute; top:4px; right:4px; width:18px; height:18px; border:none; border-radius:50%; background:rgba(0,0,0,.6); color:#fff; font-size:11px; font-weight:600; cursor:pointer; line-height:1; display:flex; align-items:center; justify-content:center; }
.upload-thumb .remove-btn:hover { background:rgba(0,0,0,.75); }
.upload-thumb .progress-ring { position:absolute; inset:0; display:flex; align-items:center; justify-content:center; background:rgba(255,255,255,.55); }
.chat-input-field { flex:1; background:transparent; color:#1a1a1a; border:none; font-size:18px; padding:4px 8px; min-height:24px; max-height:144px; outline:none; font-family:system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif; resize:none; overflow:hidden; line-height:1.4; word-wrap:break-word; white-space:pre-wrap; }
.chat-input-field::placeholder { color:#9aa0a6; font-size:18px; }
.chat-input-field:disabled { opacity:.5; }
.chat-action-icon, .send-button { width:40px; height:40px; border-radius:50%; background:transparent; color:#5f6368; display:flex; align-items:center; justify-content:center; transition:background .15s; }

/* Chat disclaimer text below input */
.chat-disclaimer { 
    text-align: center; 
    font-size: 11px; 
    color: #6b7280; 
    opacity: 0.8; 
    margin-top: 8px; 
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

