/* Base styles and variables */
:root {
    /* Primary colors - UPDATED to match Athlete Navigator branding */
    --primary-color: #e63946; /* Athlete Navigator red */
    --primary-hover: #c8303c; /* Darker red for hover states */
    --primary-light: #f8d7da; /* Light red background */
    --primary-dark: #212529; /* Dark color for headers */
    /* Baseball themed accent colors - UPDATED */
    --baseball-red: #e63946; /* Baseball red (same as primary) */
    --baseball-dark: #212529; /* Dark gray/black */
    --baseball-light: #f1faee; /* Light background */
    /* Standard colors - KEPT AS IS */
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --white: #ffffff;
    /* Grays - KEPT AS IS */
    --gray-100: #f8f9fa;
    --gray-200: #e9ecef;
    --gray-300: #dee2e6;
    --gray-400: #ced4da;
    --gray-500: #adb5bd;
    --gray-600: #6c757d;
    --gray-700: #495057;
    --gray-800: #343a40;
    --gray-900: #212529;
    /* Fonts and typography - KEPT AS IS */
    --font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --font-size-base: 1rem;
    --font-size-lg: 1.25rem;
    --font-size-sm: 0.875rem;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-bold: 700;
    --line-height: 1.5;
    /* Spacing - KEPT AS IS */
    --spacing-1: 0.25rem;
    --spacing-2: 0.5rem;
    --spacing-3: 1rem;
    --spacing-4: 1.5rem;
    --spacing-5: 3rem;
    /* UI elements - KEPT AS IS */
    --border-radius: 0.375rem;
    --border-radius-lg: 0.5rem;
    --border-radius-sm: 0.25rem;
    --transition-speed: 0.3s;
    --box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    --box-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --box-shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--gray-800);
    background-color: var(--gray-100);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

    a:hover {
        color: var(--primary-hover);
        text-decoration: underline;
    }

button {
    cursor: pointer;
}

/* Container */
.container {
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
    margin-right: auto;
    margin-left: auto;
}

@media (min-width: 576px) {
    .container {
        max-width: 540px;
    }
}

/* Pagination for messages */
.chat-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem;
    margin: 0 20px;
    background-color: var(--gray-100);
    border-radius: var(--border-radius);
}

.pagination-info {
    margin: 0 1rem;
    color: var(--gray-700);
    font-size: 0.9rem;
}

/* Fix for button height, alignment, and corner issues */

/* Main input container - consistent height and alignment */
.chat-input-container {
    position: sticky;
    bottom: 0;
    background-color: var(--white);
    padding: 15px;
    border-top: 1px solid var(--gray-200);
    z-index: 10;
}

/* Input group container with uniform height */
.input-group {
    display: flex;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    height: 44px; /* Set a fixed height for all elements */
    align-items: stretch; /* Make all items stretch to the same height */
}

    /* All buttons in the input group */
    .input-group .btn {
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 15px;
        height: 100%;
        border: 1px solid var(--gray-300);
        margin: 0;
        flex-shrink: 0; /* Prevent buttons from shrinking */
    }

    /* Voice button (first button) */
    .input-group button:first-child {
        border-top-left-radius: 8px !important;
        border-bottom-left-radius: 8px !important;
        border-top-right-radius: 0 !important;
        border-bottom-right-radius: 0 !important;
    }

    /* Input field */
    .input-group .form-control {
        height: 100%;
        border: 1px solid var(--gray-300);
        border-right: none;
        border-left: none;
        padding: 0 16px;
        border-radius: 0 !important;
        flex: 1;
        font-size: 16px; /* Consistent font size */
    }

    /* Send button - ensure no rounded corners */
    .input-group button:nth-of-type(2) {
        border-radius: 0 !important;
        border-left: none;
        border-right: none;
    }

    /* File button - ensure right side rounded corners and left side flat */
    .input-group > :last-child,
    .input-group label.btn,
    .input-group button:last-child {
        border-top-right-radius: 8px !important;
        border-bottom-right-radius: 8px !important;
        border-top-left-radius: 0 !important;
        border-bottom-left-radius: 0 !important;
    }

/* Fix for the file input */
#fileInput {
    display: none;
}

/* Microphone icon alignment */
.input-group .btn i {
    font-size: 16px; /* Consistent icon size */
}

/* Ensure buttons maintain proper positioning with flexbox */
.input-group {
    display: flex;
    width: 100%;
}

    /* Fix any outline issues */
    .input-group .btn:focus,
    .input-group .form-control:focus {
        outline: none;
        z-index: 2; /* Bring focused elements forward */
    }

/* Consistent button styling */
.btn-outline-secondary {
    background-color: white;
    color: var(--gray-700);
}

    .btn-outline-secondary:hover {
        background-color: var(--gray-100);
    }

/* Fix for the paper plane button */
.btn-primary {
    border-left: none;
    border-right: none;
}

/* Ensure vertical centering of content */
.input-group > * {
    display: flex;
    align-items: center;
}
    }

    /* Paperclip button - specifically target this if it has a unique class */
    .btn-outline-secondary:last-child,
    .input-group .btn:last-child {
        border-top-right-radius: 8px !important;
        border-bottom-right-radius: 8px !important;
    }

    /* Hide file input but keep label visible */
    .input-group input[type="file"] {
        display: none;
    }

    /* Extra fix to ensure right side buttons have proper radius */
    .chat-input-container .input-group > :last-child,
    .input-group > :last-child {
        border-top-right-radius: 8px !important;
        border-bottom-right-radius: 8px !important;
    }

/* Fix for specific button layouts if needed */
.btn.btn-outline-secondary:last-of-type {
    border-top-right-radius: 8px !important;
    border-bottom-right-radius: 8px !important;
}

/* Ensure buttons have proper height and alignment */
.input-group .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 100%;
}

/* Fix for Safari and other browsers */
@media not all and (min-resolution:.001dpcm) {
    @supports (-webkit-appearance:none) {
        .input-group {
            -webkit-mask-image: -webkit-radial-gradient(white, black);
        }
    }
}

/* Query suggestions */
.suggestions-container {
    margin-top: 2rem;
    width: 100%;
    max-width: 600px;
}

    .suggestions-container h3 {
        color: var(--gray-700);
        margin-bottom: 1rem;
        font-size: 1.1rem;
    }

.suggestions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 10px;
}

.suggestion-btn {
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    padding: 12px 16px;
    text-align: left;
    transition: all 0.2s ease;
    color: var(--gray-700);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

    .suggestion-btn:hover {
        background-color: var(--primary-light);
        border-color: var(--primary-color);
        color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: var(--box-shadow);
    }

    .suggestion-btn i {
        color: var(--primary-color);
    }

/* Player lookup container */
.player-lookup-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.player-search-form {
    margin-bottom: 1.5rem;
}

.filter-section {
    background-color: var(--gray-100);
    padding: 1.25rem;
    border-radius: var(--border-radius);
    margin: 1rem 0;
    border: 1px solid var(--gray-300);
}

    .filter-section h3 {
        font-size: 1.1rem;
        margin-top: 0;
        margin-bottom: 1.25rem;
        color: var(--gray-700);
        display: flex;
        align-items: center;
        gap: 8px;
    }

/* Responsive grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -0.75rem;
    margin-left: -0.75rem;
}

.col {
    flex: 1 0 0%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

/* Empty search results */
.empty-results {
    text-align: center;
    padding: 2rem;
    color: var(--gray-600);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

    .empty-results i {
        font-size: 2rem;
        color: var(--gray-500);
    }

/* Player cards */
.player-results {
    margin-top: 1.5rem;
}

    .player-results h3 {
        margin-bottom: 1rem;
        color: var(--gray-800);
        display: flex;
        align-items: center;
        gap: 8px;
    }

.player-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius);
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.2s ease;
}

    .player-card:hover {
        box-shadow: var(--box-shadow-md);
        transform: translateY(-2px);
        border-color: var(--primary-color);
    }

.player-info {
    flex: 1;
}

    .player-info h4 {
        margin-top: 0;
        margin-bottom: 0.5rem;
        color: var(--primary-color);
    }

    .player-info p {
        margin: 0.25rem 0;
        color: var(--gray-700);
        display: flex;
        align-items: center;
        gap: 6px;
    }

.player-actions {
    flex-shrink: 0;
    margin-left: 1rem;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .row {
        flex-direction: column;
    }

    .col {
        margin-bottom: 1rem;
    }

    .player-card {
        flex-direction: column;
        align-items: flex-start;
    }

    .player-actions {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
    }

        .player-actions .btn {
            width: 100%;
        }

    .suggestions-grid {
        grid-template-columns: 1fr;
    }

    .chat-container {
        min-height: 400px; /* Slightly smaller minimum height for mobile */
    }

    .messages-container {
        min-height: 300px;
    }
}

/* Mobile sidebar handling */
@media (max-width: 768px) {
    .sidebar {
        position: absolute;
        left: 0;
        top: 0;
        height: 100%;
        z-index: 100;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
    }

    .sidebar-collapsed {
        left: -280px; /* Move completely off-screen when collapsed */
        box-shadow: none;
    }
    .chat-container {
        min-height: 400px; /* Slightly smaller minimum height for mobile */
    }

    .messages-container {
        min-height: 300px;
    }
}

/* Mobile sidebar toggle button */
.mobile-sidebar-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 20px; /* Positioned on the left to match sidebar */
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--baseball-red);
    color: var(--white);
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 20;
    border: none;
    transition: all 0.2s ease;
}

    .mobile-sidebar-toggle:hover {
        background-color: var(--baseball-red);
        transform: scale(1.05);
    }

@media (max-width: 768px) {
    .mobile-sidebar-toggle {
        display: flex;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@media (min-width: 768px) {
    .container {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .container {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Main container to ensure proper layout */
.main-container {
    padding-top: 20px;
    padding-bottom: 20px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.d-flex {
    display: flex;
}

.d-none {
    display: none;
}

@media (min-width: 768px) {
    .d-md-inline {
        display: inline;
    }

    .d-md-block {
        display: block;
    }

    .d-md-flex {
        display: flex;
    }
}

.flex-column {
    flex-direction: column;
}

.justify-content-center {
    justify-content: center;
}

.justify-content-between {
    justify-content: space-between;
}

.align-items-center {
    align-items: center;
}

.p-0 {
    padding: 0;
}

.p-1 {
    padding: var(--spacing-1);
}

.p-2 {
    padding: var(--spacing-2);
}

.p-3 {
    padding: var(--spacing-3);
}

.p-4 {
    padding: var(--spacing-4);
}

.p-5 {
    padding: var(--spacing-5);
}

.px-3 {
    padding-left: var(--spacing-3);
    padding-right: var(--spacing-3);
}

.py-3 {
    padding-top: var(--spacing-3);
    padding-bottom: var(--spacing-3);
}

.m-0 {
    margin: 0;
}

.m-1 {
    margin: var(--spacing-1);
}

.m-2 {
    margin: var(--spacing-2);
}

.m-3 {
    margin: var(--spacing-3);
}

.m-4 {
    margin: var(--spacing-4);
}

.m-5 {
    margin: var(--spacing-5);
}

.mt-3 {
    margin-top: var(--spacing-3);
}

.mb-3 {
    margin-bottom: var(--spacing-3);
}

.mb-4 {
    margin-bottom: var(--spacing-4);
}

.my-3 {
    margin-top: var(--spacing-3);
    margin-bottom: var(--spacing-3);
}

.ml-2 {
    margin-left: var(--spacing-2);
}

.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

/* Header */
/* Update header background to match Athlete Navigator black */
.header {
    background-color: var(--baseball-dark);
    color: var(--white);
    padding: 1rem 0;
    box-shadow: var(--box-shadow);
    position: relative;
    z-index: 10;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 1.6rem;
    font-weight: var(--font-weight-bold);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.3rem;
    }

    .header-actions {
        gap: 5px;
    }
}

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-medium);
    color: var(--gray-700);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--gray-700);
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

    .form-control:focus {
        color: var(--gray-700);
        background-color: var(--white);
        border-color: var(--primary-color);
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(58, 87, 232, 0.25);
    }

    .form-control::placeholder {
        color: var(--gray-500);
        opacity: 1;
    }

/* Main Content */
.main-content {
    flex: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0;
    position: relative;
}

/* Chat UI Styles */
.chat-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
}


/* Chat header */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--gray-300);
    background-color: var(--gray-100);
}

.chat-title {
    font-weight: var(--font-weight-medium);
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.chat-actions {
    display: flex;
    gap: 8px;
}

/* Messages container */
.messages-container {
    height: 100% !important; /* Fixed height ensures consistent appearance */
    min-height: 100% !important; /* Reinforces fixed height */
    max-height: 100% !important; /* Caps maximum height */
    overflow-y: auto; /* Enables scrolling for content that exceeds fixed height */
    display: flex; /* Maintains flex layout for child elements */
    flex-direction: column; /* Stacks messages vertically */
    padding: 20px; /* Comfortable internal spacing */
    margin-bottom: 20px; /* Space between messages and input area */
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    position: relative; /* Creates stacking context for absolute elements */
}

.messages-container::-webkit-scrollbar {
    width: 6px;
}

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

.messages-container::-webkit-scrollbar-thumb {
    background-color: var(--gray-400);
    border-radius: 3px;
}

.messages-container::-webkit-scrollbar-thumb:hover {
    background-color: var(--gray-500);
}

/* Empty messages state */
.empty-messages {
    height: 100%; /* Fill container height */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    color: var(--gray-400);
}

.empty-messages p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

/* Message bubbles */
.message {
    margin-bottom: 1.25rem;
    padding: 12px 16px;
    border-radius: 12px;
    max-width: 85%;
    box-shadow: var(--box-shadow);
    position: relative;
}

/* Update messages to use the Baseball red */
.message-user {
    background-color: var(--baseball-red);
    color: var(--white);
    margin-left: auto;
    border-bottom-right-radius: 4px;
}

.message-bot {
    background-color: var(--gray-100);
    color: var(--gray-800);
    margin-right: auto;
    border-bottom-left-radius: 4px;
}

.message-timestamp {
    font-size: 0.7rem;
    opacity: 0.7;
    display: block;
    text-align: right;
    margin-top: 0.5rem;
}

/* Message content styling for baseball stats */
.message-content {
    line-height: 1.5;
}

    .message-content h1,
    .message-content h2,
    .message-content h3,
    .message-content h4,
    .message-content h5,
    .message-content h6 {
        margin-top: 16px;
        margin-bottom: 12px;
    }

    .message-content h1 {
        font-size: 1.5rem;
    }

    .message-content h2 {
        font-size: 1.3rem;
    }

    .message-content h3 {
        font-size: 1.1rem;
    }

    .message-content p {
        margin-bottom: 12px;
    }

    .message-content strong {
        font-weight: var(--font-weight-bold);
    }

    .message-content table {
        border-collapse: collapse;
        width: 100%;
        margin: 16px 0;
        font-size: 0.9rem;
        border-radius: 4px;
        overflow: hidden;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .message-content th {
        background-color: var(--primary-light);
        color: var(--primary-dark);
        font-weight: var(--font-weight-bold);
        text-align: left;
        padding: 10px 12px;
        border: 1px solid #e5e7eb;
    }

    .message-content td {
        padding: 8px 12px;
        border: 1px solid #e5e7eb;
    }

    .message-content tr:nth-child(even) {
        background-color: #f9fafb;
    }

    .message-content tr:hover {
        background-color: #f3f4f6;
    }


.form-control.with-icon {
    padding-left: 2.5rem;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    pointer-events: none;
}

/* File Upload Messages */
.file-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: var(--font-weight-medium);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 5px;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
}

    .file-link:hover {
        text-decoration: underline;
        background-color: rgba(255, 255, 255, 0.2);
    }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: var(--font-weight-medium);
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    border-radius: var(--border-radius);
    transition: all 0.2s ease-in-out;
    gap: 6px;
}

    .btn:focus {
        outline: 0;
        box-shadow: 0 0 0 0.2rem rgba(230, 57, 70, 0.25);
    }

    .btn:disabled {
        opacity: 0.65;
        cursor: not-allowed;
    }

/* Update primary button to match Athlete Navigator red */
.btn-primary {
    color: var(--white);
    background-color: var(--baseball-red);
    border: 1px solid var(--baseball-red);
}

    .btn-primary:hover {
        color: var(--white);
        background-color: var(--primary-hover);
        border-color: var(--primary-hover);
    }

    .btn-primary:focus {
        box-shadow: 0 0 0 0.2rem rgba(230, 57, 70, 0.25);
    }

.btn-outline-primary {
    color: var(--primary-color);
    background-color: transparent;
    border: 1px solid var(--primary-color);
}

    .btn-outline-primary:hover {
        color: var(--white);
        background-color: var(--primary-color);
        border-color: var(--primary-color);
    }

/* White outline buttons for header */
.header .btn-outline-primary {
    color: var(--white);
    background-color: transparent;
    border: 1px solid var(--white);
}

    .header .btn-outline-primary:hover {
        color: var(--primary-color);
        background-color: var(--white);
        border-color: var(--white);
    }

.btn-danger {
    color: var(--white);
    background-color: var(--danger-color);
    border: 1px solid var(--danger-color);
}

    .btn-danger:hover {
        color: var(--white);
        background-color: #bd2130;
        border-color: #b21f2d;
    }

.btn-outline-danger {
    color: var(--danger-color);
    background-color: transparent;
    border: 1px solid var(--danger-color);
}

    .btn-outline-danger:hover {
        color: var(--white);
        background-color: var(--danger-color);
        border-color: var(--danger-color);
    }

.btn-secondary {
    color: var(--white);
    background-color: var(--secondary-color);
    border: 1px solid var(--secondary-color);
}

    .btn-secondary:hover {
        color: var(--white);
        background-color: #5a6268;
        border-color: #545b62;
    }

.btn-outline-secondary {
    color: var(--secondary-color);
    background-color: transparent;
    border: 1px solid var(--secondary-color);
}

    .btn-outline-secondary:hover {
        color: var(--white);
        background-color: var(--secondary-color);
        border-color: var(--secondary-color);
    }

/* Transparent secondary buttons for header */
.header .btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: transparent;
}

    .header .btn-secondary:hover {
        background-color: rgba(255, 255, 255, 0.3);
    }

.btn-block {
    display: flex;
    width: 100%;
}

.btn-link {
    font-weight: var(--font-weight-normal);
    color: var(--primary-color);
    background-color: transparent;
    border: none;
    padding: 0.25rem 0.5rem;
    text-decoration: none;
}

    .btn-link:hover {
        text-decoration: underline;
        color: var(--primary-hover);
    }

/* Small buttons */
.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-sm);
    line-height: 1.5;
    border-radius: var(--border-radius-sm);
}

/* Icon button */
.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Ensure consistent border radius for all buttons */
.btn-secondary,
.btn-outline-primary,
.btn-primary {
    border-radius: var(--border-radius);
}

/* Cards */
.card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-color: var(--white);
    background-clip: border-box;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.card-header {
    padding: 1rem 1.25rem;
    margin-bottom: 0;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-300);
}

.card-title {
    margin-bottom: 0;
    color: var(--gray-800);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-body {
    flex: 1 1 auto;
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.25rem;
    background-color: var(--gray-100);
    border-top: 1px solid var(--gray-300);
}

/* Auth Forms */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 130px);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    box-shadow: var(--box-shadow-lg);
    border: none;
}

.auth-title {
    text-align: center;
    margin-bottom: 0.5rem;
    color: var(--gray-800);
    font-weight: var(--font-weight-bold);
}

.auth-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
}

/* Alert Messages */
.alert {
    position: relative;
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}

.alert-danger {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

/* App Layout with Sidebar */
.app-layout {
    display: flex;
    height: calc(100vh - 100px);
    min-height: 600px; /* Minimum height to prevent collapse */
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--box-shadow-md);
    background-color: var(--white);
}

/* Sidebar Styles */
.sidebar {
    position: relative;
    width: 280px;
    height: 100%;
    background-color: var(--gray-100);
    border-right: 1px solid var(--gray-300);
    transition: width 0.3s ease;
    overflow: hidden;
    z-index: 5;
    display: flex;
    flex-direction: column;
}

.sidebar-collapsed {
    width: 60px;
}

/* Improved sidebar header with better styling */
.sidebar-header {
    padding: 15px;
    background-color: var(--gray-100);
    border-bottom: 1px solid var(--gray-300);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-header .btn-primary {
    flex: 1;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
}

/* Cleaner toggle button with better positioning */
.sidebar-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--white);
    border: 1px solid var(--gray-400);
    border-radius: 4px;
    color: var(--gray-600);
    transition: all 0.2s ease;
    margin-left: 10px;
}

.sidebar-toggle:hover {
    background-color: var(--gray-200);
    color: var(--gray-800);
}

/* Improved content area for the chat list */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Empty state for no sessions */
.no-sessions {
    text-align: center;
    color: var(--gray-600);
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.no-sessions i {
    font-size: 2rem;
    opacity: 0.5;
}

.sidebar-collapsed .no-sessions {
    padding: 20px 0;
}

.sidebar-collapsed .no-sessions i {
    font-size: 1.5rem;
}

.sidebar-collapsed .no-sessions p {
    display: none;
}

/* Better style for chat sessions list */
.session-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Enhanced chat session items - NORMAL STATE */
.session-item {
    border-radius: 12px;
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    border: 1px solid var(--gray-300);
    display: flex;
    align-items: center;
    overflow: hidden;
}

.session-item:hover {
    background-color: var(--gray-200);
    transform: translateY(-1px);
    box-shadow: var(--box-shadow);
}

/* Update active sidebar item - NORMAL STATE */
.session-item.active {
    border-radius: 12px;
    background-color: var(--primary-light);
    border-color: var(--baseball-red);
    position: relative;
}

.session-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background-color: var(--baseball-red);
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
}

.session-title {
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--gray-700);
    font-weight: var(--font-weight-medium);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.session-title i {
    font-size: 14px;
    color: var(--baseball-red);
    flex-shrink: 0;
}

/* COLLAPSED STATE STYLING - Consolidated to avoid conflicts */
.sidebar-collapsed .session-item {
    /* Basic layout */
    padding: 0;
    height: 40px;
    width: 40px;
    margin: 8px auto;
    
    /* Centering content */
    display: flex;
    justify-content: center;
    align-items: center;
    
    /* Visual styling */
    border-radius: 8px;
    border: 1px solid var(--gray-300);
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* Override the normal active state before pseudo-element when collapsed */
.sidebar-collapsed .session-item.active::before {
    /* Remove the red bar on the left by setting its content to none */
    content: none;
}

/* Add chat icon for collapsed view */
.sidebar-collapsed .session-item::after {
    content: '\f075'; /* Font Awesome chat bubble icon */
    font-family: 'Font Awesome 5 Free';
    font-weight: 400;
    font-size: 18px;
    color: var(--gray-600);
    /* Ensure proper centering */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Style the active item icon in collapsed state */
.sidebar-collapsed .session-item.active {
    background-color: var(--primary-light);
    border: 1px solid var(--gray-300);
}

.sidebar-collapsed .session-item.active::after {
    color: var(--baseball-red);
    font-weight: 900;
}

/* Hide the text and delete button in condensed view */
.sidebar-collapsed .session-title,
.sidebar-collapsed .session-delete {
    display: none;
}

/* Add subtle hover effect */
.sidebar-collapsed .session-item:hover {
    background-color: var(--gray-200);
    transform: translateY(-1px);
}

/* Better delete button styling */
.session-delete {
    background: none;
    border: none;
    color: var(--gray-600);
    opacity: 0.7;
    padding: 5px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

    .session-delete:hover {
        background-color: #fff1f1;
        color: var(--danger-color);
        opacity: 1;
    }


/* Override message-bot positioning for typing indicator */
.message.message-bot.typing-message {
    max-width: 100% !important; /* Override max-width constraint */
    margin-left: auto !important; /* Override left alignment */
    margin-right: auto !important; /* Ensure horizontal centering */
    background-color: transparent !important; /* Make message background transparent */
    box-shadow: none !important; /* Remove box shadow */
    border-bottom-left-radius: var(--border-radius) !important; /* Restore border radius */
    padding: 0 !important; /* Remove padding that might affect centering */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* Container for the typing indicator */
.typing-message {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* The typing indicator itself */
.typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100px; /* Slightly wider for better visibility */
    height: 100px; /* Slightly taller for better visibility */
    position: relative;
    margin: 0 auto;
}

    /* Text status above the indicator */
    .typing-indicator .status-text {
        position: absolute;
        top: -30px;
        width: 250px; /* Wider to accommodate longer texts */
        text-align: center;
        left: 50%;
        transform: translateX(-50%);
        white-space: nowrap;
        font-size: 14px;
        font-weight: 500;
        color: var(--primary-color);
        background-color: rgba(255, 255, 255, 0.9); /* Semi-transparent background for better readability */
        padding: 3px 8px;
        border-radius: 12px;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    /* The diamond shape outline */
    .typing-indicator::before {
        content: '';
        position: absolute;
        width: 70px;
        height: 70px;
        border: 2px solid #aaa;
        transform: rotate(45deg);
        background-color: #f8f8f8;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    }

    /* Bases positioning */
    .typing-indicator .home-plate {
        position: absolute;
        bottom: 10px;
        left: 50%;
        width: 14px;
        height: 14px;
        background-color: #fff;
        border: 2px solid #666;
        transform: translateX(-50%) rotate(45deg);
        z-index: 2;
    }

    .typing-indicator .first-base {
        position: absolute;
        top: 50%;
        right: 10px;
        width: 12px;
        height: 12px;
        background-color: #fff;
        border: 2px solid #666;
        transform: translateY(-50%) rotate(45deg);
        z-index: 2;
        animation: baseHighlight 1.5s infinite ease-in-out;
        animation-delay: 0.5s;
    }

    .typing-indicator .second-base {
        position: absolute;
        top: 10px;
        left: 50%;
        width: 12px;
        height: 12px;
        background-color: #fff;
        border: 2px solid #666;
        transform: translateX(-50%) rotate(45deg);
        z-index: 2;
        animation: baseHighlight 1.5s infinite ease-in-out;
        animation-delay: 1s;
    }

    .typing-indicator .third-base {
        position: absolute;
        top: 50%;
        left: 10px;
        width: 12px;
        height: 12px;
        background-color: #fff;
        border: 2px solid #666;
        transform: translateY(-50%) rotate(45deg);
        z-index: 2;
        animation: baseHighlight 1.5s infinite ease-in-out;
        animation-delay: 1.5s;
    }

    /* Baseball */
    .typing-indicator .baseball {
        position: absolute;
        width: 12px;
        height: 12px;
        background-color: #fff;
        border: 1px solid #333;
        border-radius: 50%;
        animation: baseballRun 2s infinite linear;
        z-index: 3;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

        /* Baseball stitch lines */
        .typing-indicator .baseball::before,
        .typing-indicator .baseball::after {
            content: '';
            position: absolute;
            background-color: #e63946;
            width: 8px;
            height: 2px;
            top: 50%;
            left: 50%;
        }

        .typing-indicator .baseball::before {
            transform: translate(-50%, -50%) rotate(45deg);
        }

        .typing-indicator .baseball::after {
            transform: translate(-50%, -50%) rotate(-45deg);
        }

/* Make the animation more prominent */
@keyframes baseHighlight {
    0%, 100% {
        background-color: #fff;
        border-color: #666;
    }

    50% {
        background-color: #e63946; /* Baseball red */
        border-color: #e63946;
        transform: scale(1.3) rotate(45deg);
        box-shadow: 0 0 8px rgba(230, 57, 70, 0.6); /* Add glow effect */
    }
}

/* Baseball movement animation */
@keyframes baseballRun {
    0% {
        bottom: 10px; /* Home plate */
        left: 50%;
        transform: translate(-50%, 0);
    }

    25% {
        bottom: 50%;
        left: 90%;
        transform: translate(-100%, 0);
    }

    50% {
        bottom: 90%;
        left: 50%;
        transform: translate(-50%, 0);
    }

    75% {
        bottom: 50%;
        left: 10%;
        transform: translate(0, 0);
    }

    100% {
        bottom: 10px; /* Back to home plate */
        left: 50%;
        transform: translate(-50%, 0);
    }
}

/* Admin Panel Styles */
.admin-panel {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.admin-form {
    background-color: var(--gray-100);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    border: 1px solid var(--gray-300);
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 1.5rem;
}

.user-list {
    margin-top: 2rem;
}

.table-responsive {
    overflow-x: auto;
}

.table {
    width: 100%;
    margin-bottom: 1rem;
    color: var(--gray-800);
    border-collapse: collapse;
}

    .table th,
    .table td {
        padding: 0.75rem;
        vertical-align: top;
        border-top: 1px solid var(--gray-300);
    }

    .table thead th {
        vertical-align: bottom;
        border-bottom: 2px solid var(--gray-300);
        background-color: var(--gray-100);
        color: var(--gray-700);
        font-weight: var(--font-weight-bold);
    }

    .table tbody tr:nth-of-type(odd) {
        background-color: rgba(0, 0, 0, 0.05);
    }

    .table tbody tr:hover {
        background-color: rgba(0, 0, 0, 0.075);
    }

.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-primary {
    color: #fff;
    background-color: var(--primary-color);
}

.badge-secondary {
    color: #fff;
    background-color: var(--secondary-color);
}

.user-actions {
    display: flex;
    gap: 5px;
}

.btn-info {
    color: #fff;
    background-color: #17a2b8;
    border-color: #17a2b8;
}

    .btn-info:hover {
        color: #fff;
        background-color: #138496;
        border-color: #117a8b;
    }

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}


/* Improved Baseball Diamond Typing Indicator */
.typing-message {
    padding: 12px 16px;
}

.typing-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    position: relative;
    margin: 0 auto;
}

    /* The diamond shape outline */
    .typing-indicator::before {
        content: '';
        position: absolute;
        width: 60px;
        height: 60px;
        border: 2px solid #aaa;
        transform: rotate(45deg);
        background-color: #f8f8f8;
    }

    /* Home plate - now properly at bottom corner */
    .typing-indicator .home-plate {
        position: absolute;
        bottom: 0;
        left: 50%;
        width: 14px;
        height: 14px;
        background-color: #fff;
        border: 2px solid #666;
        transform: translateX(-50%) rotate(45deg);
        z-index: 2;
        border-radius: 0;
    }

    /* Bases (first, second, third) with better positioning */
    .typing-indicator .base {
        position: absolute;
        width: 12px;
        height: 12px;
        background-color: #fff;
        border: 2px solid #666;
        transform: translate(-50%, -50%);
        z-index: 2;
    }

    /* First base - right corner */
    .typing-indicator .first-base {
        top: 50%;
        right: 0;
        left: auto;
        transform: translate(0, -50%) rotate(45deg);
        animation: baseHighlight 1.5s infinite ease-in-out;
        animation-delay: 0.5s;
    }

    /* Second base - top corner, now more visible */
    .typing-indicator .second-base {
        top: 0;
        left: 50%;
        transform: translate(-50%, 0) rotate(45deg);
        animation: baseHighlight 1.5s infinite ease-in-out;
        animation-delay: 1s;
    }

    /* Third base - left corner */
    .typing-indicator .third-base {
        top: 50%;
        left: 0;
        transform: translate(0, -50%) rotate(45deg);
        animation: baseHighlight 1.5s infinite ease-in-out;
        animation-delay: 1.5s;
    }

/* Animation for the bases */
@keyframes baseHighlight {
    0%, 100% {
        background-color: #fff;
        border-color: #666;
    }

    50% {
        background-color: #e63946; /* Baseball red */
        border-color: #e63946;
        transform: scale(1.3) rotate(45deg);
    }
}

/* Add a baseball that moves around the bases */
.typing-indicator .baseball {
    position: absolute;
    width: 10px;
    height: 10px;
    background-color: #fff;
    border: 1px solid #333;
    border-radius: 50%;
    animation: baseballRun 2s infinite linear;
    z-index: 3;
    box-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

    /* Baseball stitch lines */
    .typing-indicator .baseball::before,
    .typing-indicator .baseball::after {
        content: '';
        position: absolute;
        background-color: #e63946;
        width: 6px;
        height: 2px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .typing-indicator .baseball::before {
        transform: translate(-50%, -50%) rotate(45deg);
    }

    .typing-indicator .baseball::after {
        transform: translate(-50%, -50%) rotate(-45deg);
    }

@keyframes baseballRun {
    0% {
        bottom: 0; /* Home plate */
        left: 50%;
        transform: translate(-50%, 0);
    }

    25% {
        bottom: 50%;
        left: 100%;
        transform: translate(-100%, 0);
    }

    50% {
        bottom: 100%;
        left: 50%;
        transform: translate(-50%, 0);
    }

    75% {
        bottom: 50%;
        left: 0%;
        transform: translate(0, 0);
    }

    100% {
        bottom: 0; /* Back to home plate */
        left: 50%;
        transform: translate(-50%, 0);
    }
}

/* D-none utility for hiding elements on mobile */
.d-none {
    display: none !important;
}

@media (min-width: 768px) {
    .d-md-inline {
        display: inline !important;
    }

    .d-md-block {
        display: block !important;
    }

    .d-md-flex {
        display: flex !important;
    }
}
/* File Processor Styles - Add to your styles.css file */

.file-processor-panel {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

    .file-processor-panel .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

/* File List Styling */
.uploaded-files-panel {
    border-right: 1px solid var(--gray-300);
    height: 100%;
}

.file-list {
    max-height: 400px;
    overflow-y: auto;
}

.file-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    background-color: var(--white);
    border: 1px solid var(--gray-300);
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

    .file-item:hover {
        background-color: var(--gray-100);
        transform: translateY(-2px);
        box-shadow: var(--box-shadow);
    }

    .file-item.active {
        background-color: var(--primary-light);
        border-color: var(--primary-color);
    }

.file-info {
    display: flex;
    align-items: center;
    flex: 1;
}

.file-icon {
    width: 40px;
    height: 40px;
    background-color: var(--gray-200);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 12px;
    color: var(--gray-800);
}

.file-item.active .file-icon {
    background-color: var(--primary-color);
    color: var(--white);
}

.file-details {
    flex: 1;
}

.file-name {
    font-weight: var(--font-weight-medium);
    color: var(--gray-800);
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-meta {
    font-size: 0.8rem;
    color: var(--gray-600);
}

.file-actions {
    display: flex;
    align-items: center;
}

/* Processing Panel */
.processing-panel {
    padding: 0 15px;
    height: 100%;
}

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    color: var(--gray-600);
    text-align: center;
}

    .empty-state i {
        font-size: 2.5rem;
        color: var(--gray-400);
        margin-bottom: 15px;
    }

.status-message {
    padding: 12px 15px;
    border-radius: 8px;
    margin: 15px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Progress bar styling */
.progress {
    height: 10px;
    border-radius: 8px;
    background-color: var(--gray-200);
    overflow: hidden;
}

.progress-bar {
    background-color: var(--primary-color);
    height: 100%;
    text-align: center;
    transition: width 0.3s ease;
    color: white;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Processing results */
.processing-results {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--gray-300);
    border-radius: 8px;
    margin-top: 20px;
}

    .processing-results h4 {
        background-color: var(--gray-100);
        padding: 12px 15px;
        margin: 0;
        border-bottom: 1px solid var(--gray-300);
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        gap: 8px;
    }

.result-item {
    border-bottom: 1px solid var(--gray-300);
}

    .result-item:last-child {
        border-bottom: none;
    }

.result-header {
    background-color: var(--gray-100);
    padding: 10px 15px;
    font-weight: var(--font-weight-medium);
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.result-body {
    padding: 15px;
    background-color: var(--white);
}

/* Badge for processed files */
.badge {
    display: inline-block;
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
    margin-left: 5px;
}

.badge-success {
    color: white;
    background-color: var(--success-color);
}

/* Media query for mobile screens */
@media (max-width: 767px) {
    .uploaded-files-panel {
        border-right: none;
        border-bottom: 1px solid var(--gray-300);
        margin-bottom: 20px;
        padding-bottom: 20px;
    }

    .file-processor-panel .card-body .row {
        flex-direction: column;
    }

    .file-list {
        max-height: 250px;
    }

    .processing-results {
        max-height: 300px;
    }
}

/* Connection status indicator styles */
.connection-status {
    display: flex;
    align-items: center;
    margin-left: 15px;
}

.status-indicator {
    display: flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
}

.status-indicator i {
    margin-right: 5px;
}

.status-indicator.connected {
    background-color: #28a745;
    color: white;
}

.status-indicator.disconnected {
    background-color: #6c757d;
    color: white;
}


/* Modal Overlay Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Very high z-index to ensure it's on top */
    padding: 20px;
}

.modal-container {
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    border-radius: var(--border-radius-lg);
    overflow: auto;
    animation: modalFadeIn 0.3s ease;
}

.modal-container .card {
    margin: 0;
    box-shadow: var(--box-shadow-lg);
}

.modal-container .card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
}

.modal-container .card-body {
    padding: 1.5rem;
}

/* Animation for modal appearance */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Form styling */
.reset-form {
    padding: 1rem 0;
}

.reset-form p {
    margin-bottom: 1.5rem;
    color: var(--gray-700);
}

/* Auth Footer for Login Page */
.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    border-top: 1px solid var(--gray-200);
    padding-top: 1rem;
}

.auth-footer .btn-link {
    color: var(--gray-600);
    text-decoration: none;
    font-size: 0.9rem;
}

.auth-footer .btn-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* Success and error alerts */
.alert {
    border-radius: var(--border-radius);
    padding: 12px 16px;
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.alert i {
    margin-top: 3px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Added styles for mobile responsiveness */
@media (max-width: 576px) {
    .modal-container {
        width: 95%;
    }
    
    .reset-form {
        padding: 0.5rem 0;
    }
}

/* Password Reset Modal Styles */
/* Branded for Athlete Navigator */

.password-reset-modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease-out;
  }
  
  @keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  .password-reset-content {
    background: white;
    padding: 0;
    border-radius: var(--border-radius-lg);
    width: 90%;
    max-width: 450px;
    box-shadow: var(--box-shadow-lg);
    position: relative;
    animation: slideIn 0.3s ease-out;
    overflow: hidden; /* Ensure content doesn't overflow rounded corners */
  }
  
  @keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }
  
  .modal-header {
    /* Use the baseball-red from your branding instead of blue */
    background-color: var(--baseball-red);
    color: var(--white);
    padding: 15px 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  
  .modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: var(--font-weight-bold);
    display: flex;
    align-items: center;
  }
  
  .modal-header h3 i {
    margin-right: 10px;
  }
  
  .close-button {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: all 0.2s ease;
  }
  
  .close-button:hover {
    opacity: 0.8;
    transform: scale(1.1);
  }
  
  .modal-body {
    padding: 20px;
  }
  
  .reset-step {
    animation: fadeIn 0.3s;
  }
  
  .reset-step p {
    margin-bottom: 20px;
    color: var(--gray-700);
    line-height: var(--line-height);
  }
  
  /* Make alerts consistent with your site styling */
  .alert {
    padding: 12px 16px;
    border-radius: var(--border-radius);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  
  .alert-danger {
    background-color: var(--primary-light);
    color: var(--danger-color);
    border: 1px solid var(--danger-color);
  }
  
  .alert-success {
    background-color: #d4edda;
    color: var(--success-color);
    border: 1px solid var(--success-color);
  }
  
  /* Use your site's existing form styling */
  .form-group {
    margin-bottom: 1.25rem;
    position: relative;
  }
  
  .form-label {
    display: inline-block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-medium);
    color: var(--gray-700);
  }
  
  .input-icon-wrapper {
    position: relative;
  }
  
  .input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-500);
    pointer-events: none;
  }
  
  .form-control.with-icon {
    padding-left: 2.5rem;
  }
  
  .form-control {
    display: block;
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--gray-700);
    background-color: var(--white);
    background-clip: padding-box;
    border: 1px solid var(--gray-400);
    border-radius: var(--border-radius);
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  }
  
  .form-control:focus {
    color: var(--gray-700);
    background-color: var(--white);
    border-color: var(--baseball-red);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(230, 57, 70, 0.25);
  }
  
  .form-actions {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 10px;
  }
  
  /* Style primary button with baseball red theming */
  .btn-primary {
    color: var(--white);
    background-color: var(--baseball-red);
    border: 1px solid var(--baseball-red);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-medium);
    transition: all 0.2s ease;
  }
  
  .btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
  }
  
  .btn-secondary {
    color: var(--gray-700);
    background-color: var(--white);
    border: 1px solid var(--gray-400);
    padding: 0.5rem 0.75rem;
    border-radius: var(--border-radius);
    font-weight: var(--font-weight-medium);
    transition: all 0.2s ease;
  }
  
  .btn-secondary:hover {
    background-color: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: var(--box-shadow);
  }
  
  .password-requirements {
    margin: 15px 0;
    padding: 10px 15px;
    background-color: var(--gray-100);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    color: var(--gray-700);
  }
  
  .password-requirements ul {
    margin: 10px 0 0 0;
    padding-left: 20px;
  }
  
  .password-requirements li {
    margin-bottom: 5px;
  }
  
  .forgot-password-link {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: var(--baseball-red);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
  }
  
  .forgot-password-link:hover {
    text-decoration: underline;
    color: var(--primary-hover);
  }
  
  /* Responsive Adjustments */
  @media (max-width: 480px) {
    .password-reset-content {
      width: 95%;
      max-height: 90vh;
      overflow-y: auto;
    }
    
    .modal-header h3 {
      font-size: 16px;
    }
    
    .modal-body {
      padding: 15px;
    }
    
    .form-actions {
      flex-direction: column;
    }
    
    .form-actions .btn {
      width: 100%;
      margin-bottom: 10px;
    }
  }
/* FINAL SOLUTION - BYPASS ALL OTHER RULES */

/* 1. First, create a style that targets exactly this button */
.admin-button {
    display: flex;
    align-items: center;
  }
  
  /* 2. Force display on desktop with extreme specificity */
  @media (min-width: 768px) {
    html body .header .header-actions .admin-button span,
    html body .header .header-content .header-actions .admin-button span,
    html body .header .admin-button span {
      display: inline !important;
      margin-left: 5px !important;
    }
    
    /* 3. Ensure hover doesn't change this */
    html body .header .header-actions .admin-button:hover span,
    html body .header .header-content .header-actions .admin-button:hover span,
    html body .header .admin-button:hover span {
      display: inline !important;
    }
  }
  
  /* 4. Space the icon properly */
  .admin-button i {
    margin-right: 5px;
  }
  /* 4. Hide txt on mobile */
  @media (max-width: 767px) {
    .admin-button span {
      display: none !important;
    }
  }
  