/* Remove double circle */
.avatar.info-avatar {
    outline: none !important;
    border: none !important;
    background: transparent !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    float: none !important;
}

.info-message-container .chat-message {
    display: flex !important;
    align-items: flex-start !important;
    gap: 5px !important;
}
.info-message {
    margin-right: 15px !important;
}
.info-message-container .avatar.info-avatar {
    flex-shrink: 0 !important;
}
/* ==========================================================================
   Agent Chat: Align split pane with info message
   ========================================================================== */
#splitPaneHistory {
    margin-left: 1rem !important;
}
#splitPaneHistoryContent {
    padding-left: 1rem !important;
}
/* ==========================================================================
   Agent Chat: Attachment container positioning (with swapped columns)
   ========================================================================== */
#agent-chat-file-attachments {
    grid-column: 2 !important;  /* Under the input field (right column in swapped layout) */
    grid-row: 2 !important;
}
/* ==========================================================================
   Agent Chat: Move side buttons to left, input to right
   ========================================================================== */
.agent-chat-prompt-wrapper {
    grid-template-columns: auto 1fr !important;
}

.agent-chat-top-buttons-container {
    order: -1 !important;
    justify-self: start !important;
}

.agent-chat-input-grid {
    order: 1 !important;
}
/* ==========================================================================
   Agent Chat: Conversation starters above input (not buttons)
   ========================================================================== */
.conversation-starters-container {
    left: 60px !important;  /* Leave space for buttons on left */
    right: 0 !important;
}

.agent-chat-ai-notice {
    margin-left: 60px !important;
}

/* ==========================================================================
   Agent Chat: Conversation Starter Buttons
   Black text with brand border, white text on hover
   ========================================================================== */
.conversation-starter-btn {
    color: #212529 !important;  /* Black text - overrides btn-outline-primary */
    border-color: var(--brand-primary, #0d6efd) !important;
    background: rgba(255, 255, 255, 0.85) !important;
}

.conversation-starter-btn:hover,
.conversation-starter-btn:focus,
.conversation-starter-btn:active {
    background-color: var(--brand-primary, #0d6efd) !important;
    border-color: var(--brand-primary, #0d6efd) !important;
    color: #fff !important;  /* White text on coloured background */
}

/* ==========================================================================
   Sidebar Logo Mode: Text
   Shows "ce" text instead of image logo
   ========================================================================== */
.sidebar-logo-text { display: flex !important; }
.sidebar-logo-image { display: none !important; }
/* ==========================================================================
   Sidebar Logo: Override text from "C" to "ce"
   ========================================================================== */
.sidebar-logo-text {
    font-size: 0 !important;  /* Hide the original "C" text */
}

.sidebar-logo-text::after {
    content: "ce" !important;
    font-size: 14px !important;  /* Restore readable font size */
}
/* ==========================================================================
   Index Page Logo
   ========================================================================== */
.cogniti-pulse {
    max-width: 400px !important;
    width: 100% !important;
}

@media (max-width: 768px) {
    .cogniti-pulse {
        max-width: 200px !important;
    }
}

/* ==========================================================================
   Footer Logo Sizing
   ========================================================================== */
.usyd-logo {
    max-width: 300px !important;
}

@media (max-width: 768px) {
    .usyd-logo {
        max-width: 96px !important;
    }
}

/* ==========================================================================
   Typography
   ========================================================================== */
body {
    font-family: var(--brand-body-font) !important;
}

.welcome-wrapper h1 {
    font-family: var(--brand-heading-font) !important;
}

/* ==========================================================================
   Primary Button Styling
   ========================================================================== */
.btn-primary {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active {
    background-color: color-mix(in srgb, var(--brand-primary) 85%, black) !important;
    border-color: color-mix(in srgb, var(--brand-primary) 85%, black) !important;
}

/* ==========================================================================
   Outline Primary Button Styling
   ========================================================================== */
.btn-outline-primary {
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: white !important;
}

.btn-outline-primary:disabled {
    color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    opacity: 0.5;
}

/* ==========================================================================
   Form Controls - switches, checkboxes, radios
   ========================================================================== */
.form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
}

.form-check-input:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--brand-primary) 25%, transparent);
}

.form-switch .form-check-input:checked {
    background-color: var(--brand-primary);
    border-color: var(--brand-primary);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e");
}

/* ==========================================================================
   Dropdown Menus
   ========================================================================== */
.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--brand-primary);
    color: white;
}

.dropdown-item:focus {
    background-color: color-mix(in srgb, var(--brand-primary) 15%, white);
    color: inherit;
}

/* ==========================================================================
   Navigation Tabs
   ========================================================================== */
.nav-link.active {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}

.nav-tabs .nav-link.active {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) var(--brand-primary) #fff !important;
    color: #fff !important;
}

/* ==========================================================================
   Link Colors
   ========================================================================== */
a:not(.sidebar a):not(.nav-link):not(.btn) {
    color: var(--brand-primary) !important;
}

a:not(.sidebar a):not(.nav-link):not(.btn):hover {
    color: color-mix(in srgb, var(--brand-primary) 85%, black) !important;
}

.visually-hidden-focusable:focus {
    color: white !important;
    background-color: #000 !important;
    padding: 0.5rem 1rem !important;
    text-decoration: none !important;
}

/* ==========================================================================
   Sidebar Styling
   ========================================================================== */
.sidebar {
    background-color: var(--brand-primary) !important;
    width: 60px !important;
}

.sidebar .nav-link:hover {
    background-color: color-mix(in srgb, var(--brand-primary) 80%, black) !important;
}

.sidebar a:not(.dropdown-item),
.sidebar .nav-link {
    color: #fff !important;
}

.sidebar a:not(.dropdown-item):hover,
.sidebar .nav-link:hover {
    color: #fff !important;
}

.sidebar-icon {
    width: 60px !important;
}

.sidebar .dropdown-menu .dropdown-item {
    color: #212529 !important;
    background-color: white;
}

.sidebar .dropdown-menu .dropdown-item:hover,
.sidebar .dropdown-menu .dropdown-item:focus {
    color: #1e2125 !important;
    background-color: #f8f9fa !important;
}

.cogniti-nav-link-home-custom-logo {
    padding: 8px !important;
}

.cogniti-nav-link-home-custom-logo .cogniti-home-custom-logo {
    width: 40px !important;
}

/* ==========================================================================
   Content Area
   ========================================================================== */
.content {
    margin-left: 60px !important;
}

.welcome-wrapper {
    transform: translateX(-30px);
    width: 100%;
}

@media (max-width: 991.98px) {
    .content {
        margin-left: 0 !important;
    }
    .welcome-wrapper {
        transform: none;
    }
}

/* ==========================================================================
   Pagination Styling
   ========================================================================== */
.pagination .page-link {
    color: var(--brand-primary) !important;
    border-color: #dee2e6 !important;
}

.pagination .page-link:hover {
    color: color-mix(in srgb, var(--brand-primary) 85%, black) !important;
    background-color: color-mix(in srgb, var(--brand-primary) 10%, white) !important;
    border-color: #dee2e6 !important;
}

.pagination .page-item.active .page-link {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: white !important;
}

.pagination .page-item.disabled .page-link {
    color: #6c757d !important;
}

/* ==========================================================================
   Tabulator Pagination Styling
   ========================================================================== */
.tabulator-page {
    color: #000 !important;
    border-color: #dee2e6 !important;
    background-color: transparent !important;
}

.tabulator-page:hover:not(.disabled) {
    background-color: color-mix(in srgb, var(--brand-primary) 10%, white) !important;
    border-color: #dee2e6 !important;
}

.tabulator-page.active {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    color: #fff !important;
}
/* ==========================================================================
   Range Slider (form-range)
   ========================================================================== */
.form-range::-webkit-slider-thumb {
    background-color: var(--brand-primary);
}

.form-range::-moz-range-thumb {
    background-color: var(--brand-primary);
}

.form-range:focus::-webkit-slider-thumb {
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--brand-primary) 25%, transparent);
}

.form-range:focus::-moz-range-thumb {
    box-shadow: 0 0 0 0.25rem color-mix(in srgb, var(--brand-primary) 25%, transparent);
}

/* ==========================================================================
   RESPONSIVE STYLES FOR COMPACT SCREENS
   Optimised for Australian K-12 school devices (Chromebooks, iPads, laptops)
   ========================================================================== */

/* ==========================================================================
   WIDTH-BASED: Split-Screen / Medium Widths (600px - 1000px)
   For wide monitors split in half
   ========================================================================== */
@media (min-width: 600px) and (max-width: 1000px) {
    html {
        font-size: 15px;  /* Increased from 14px for better readability */
    }
    
    /* Right sidebar (hub-sidebar) minimum readable sizes */
    .hub-sidebar {
        font-size: 0.9375rem;  /* 15px minimum */
    }
    
    .hub-sidebar .agent-name {
        font-size: 0.875rem;  /* 14px - readable minimum */
    }
    
    .hub-sidebar .stat-label {
        font-size: 0.6875rem;
    }
    
    .hub-sidebar .stat-value {
        font-size: 1.375rem;
    }
    
    .hub-sidebar .sidebar-section h5,
    .hub-sidebar .sidebar-stats h4 {
        font-size: 0.9375rem;
    }
    
    /* Left sidebar minimum sizes */
    .sidebar .nav-link {
        padding: 0.875rem 1rem;
    }
    
    .sidebar-icon {
        font-size: 1.1rem !important;
    }
    
    /* Chat iframe content */
    .bot-message,
    .user-message,
    .info-message {
        font-size: 0.9375rem;
    }
}

/* ==========================================================================
   WIDTH-BASED: Small Laptops (992px - 1279px)
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1279px) {
    html {
        font-size: 15px;  /* Increased from 14px */
    }
    
    .sidebar-icon {
        font-size: 15px;
    }

    .sidebar .nav-link {
        padding: 10px 16px;
    }

    .bottom-icon .user-image {
        width: 32px;
        height: 32px;
        max-width: 32px;
        max-height: 32px;
    }

    .notification-bell-container .notification-badge {
        font-size: 10px;
        padding: 2px 6px;
        min-width: 18px;
        height: 15px;
        line-height: 12px;
    }

    .cogniti-home-logo {
        width: 24px;
    }

    .sidebar .cogniti-nav-link-home-custom-logo .sidebar-logo-text {
        width: 32px;
        height: 32px;
        font-size: 14px;
    }
    
    /* Right sidebar adjustments */
    .hub-sidebar {
        width: 280px;
    }
    
    .hub-sidebar .agent-name {
        font-size: 0.8125rem;
    }
}

/* ==========================================================================
   WIDTH-BASED: Standard Chromebook (1280px - 1439px)
   ========================================================================== */
@media (min-width: 1280px) and (max-width: 1439px) {
    html {
        font-size: 15px;
    }
    
    .sidebar-icon {
        font-size: 16px;
    }

    .sidebar .nav-link {
        padding: 12px 16px;
    }

    .bottom-icon .user-image {
        width: 36px;
        height: 36px;
        max-width: 36px;
        max-height: 36px;
    }

    .sidebar {
        height: 100vh;
        overflow: visible;
    }

    .sidebar-scroll {
        overflow-y: auto;
        overflow-x: hidden;
        max-height: calc(100vh - 60px);
    }
}

/* ==========================================================================
   HEIGHT-BASED: Standard Compact (max-height: 900px)
   ========================================================================== */
@media (min-width: 992px) and (max-height: 900px) {
    .sidebar {
        height: 100vh;
        overflow: visible;
    }

    .sidebar-scroll {
        overflow-y: auto;
        overflow-x: hidden;
        max-height: calc(100vh - 80px);
        scrollbar-width: thin;
    }

    .sidebar-scroll::-webkit-scrollbar {
        width: 6px;
    }

    .sidebar-scroll::-webkit-scrollbar-track {
        background: #2c3136;
    }

    .sidebar-scroll::-webkit-scrollbar-thumb {
        background: #555;
        border-radius: 3px;
    }
}

/* ==========================================================================
   HEIGHT-BASED: Compact Screens (max-height: 850px)
   ========================================================================== */
@media (min-width: 992px) and (max-height: 850px) {
    .sidebar .nav-link {
        padding: 8px 16px;
    }

    .sidebar-icon {
        font-size: 15px;
    }

    .bottom-icon .user-image {
        width: 32px;
        height: 32px;
        max-width: 32px;
        max-height: 32px;
    }

    .notification-bell-container .notification-badge {
        font-size: 10px;
        padding: 2px 6px;
        min-width: 20px;
        height: 16px;
        line-height: 13px;
    }

    .cogniti-home-logo {
        width: 24px;
    }

    .sidebar .cogniti-nav-link-home-custom-logo .sidebar-logo-text {
        width: 34px;
        height: 34px;
        font-size: 15px;
    }
}

/* ==========================================================================
   HEIGHT-BASED: Very Compact Screens (max-height: 750px)
   ========================================================================== */
@media (min-width: 992px) and (max-height: 750px) {
    .sidebar .nav-link {
        padding: 6px 16px;
    }

    .sidebar-icon {
        font-size: 14px;
    }

    .bottom-icon .user-image {
        width: 28px;
        height: 28px;
        max-width: 28px;
        max-height: 28px;
    }

    .cogniti-home-logo {
        width: 22px;
    }

    .sidebar .cogniti-nav-link-home-custom-logo .sidebar-logo-text {
        width: 30px;
        height: 30px;
        font-size: 13px;
    }
}

/* ==========================================================================
   COMBINED: 1280×800 Chromebooks
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1300px) and (max-height: 850px) {
    html {
        font-size: 15px;
    }
    
    .sidebar .nav-link {
        padding: 8px 16px;
    }
    
    .sidebar-icon {
        font-size: 14px;
    }
    
    .sidebar-scroll {
        max-height: calc(100vh - 70px);
    }
}

/* ==========================================================================
   COMBINED: 1366×768 Chromebooks
   ========================================================================== */
@media (min-width: 1280px) and (max-width: 1400px) and (max-height: 800px) {
    html {
        font-size: 15px;
    }
    
    .sidebar .nav-link {
        padding: 10px 16px;
    }
    
    .sidebar-icon {
        font-size: 15px;
    }
}

/* ==========================================================================
   Agent Chat - Conversation Starter Buttons (Responsive)
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1439px) {
    .conversation-starter-btn {
        font-size: 0.875rem;
        padding: 0.375rem 0.75rem;
        line-height: 1.2;
        margin-bottom: 0.5rem !important;
    }
}

@media (min-width: 992px) and (max-height: 850px) {
    .conversation-starter-btn {
        font-size: 0.8125rem;
        padding: 0.3rem 0.625rem;
        margin-bottom: 0.4rem !important;
    }
}

@media (min-width: 992px) and (max-height: 750px) {
    .conversation-starter-btn {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
        margin-bottom: 0.3rem !important;
    }
}

/* ==========================================================================
   Reduced Motion Support
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    .sidebar,
    .sidebar-overlay,
    .sidebar-toggle,
    .sidebar-scroll {
        transition: none !important;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */
@media print {
    .sidebar,
    .sidebar-toggle {
        display: none !important;
    }
    
    .content {
        margin-left: 0 !important;
    }
}

/* ==========================================================================
   Agent Chat Iframe Font Sizing
   ========================================================================== */
body:has(.agent-chat-prompt-container) {
    font-size: 15px;  /* Increased from 14px */
}

@media (max-width: 599px) {
    body:has(.agent-chat-prompt-container) {
        font-size: 14px;  /* Increased from 13px */
    }
}

/* ==========================================================================
   Narrow Split-Screen (500px - 799px)
   For very narrow split-screen scenarios
   ========================================================================== */
@media (min-width: 500px) and (max-width: 799px) {
    /* Compact hub sidebar */
    .hub-sidebar {
        width: 260px;
        font-size: 0.875rem;
    }
    
    .sidebar-section,
    .sidebar-stats {
        padding: 0.625rem !important;
        margin: 0.5rem !important;
    }
    
    .stat-card {
        padding: 0.4rem 0.3rem;
    }
    
    /* Left sidebar minimum sizes */
    .sidebar .nav-link {
        padding: 0.75rem 0.875rem;
    }
    
    .sidebar-icon {
        font-size: 1rem !important;
    }
    
    /* Conversation starter buttons */
    .conversation-starter-btn {
        font-size: 0.8125rem;
        padding: 0.25rem 0.5rem;
        max-width: 250px;
    }
}
/* ==========================================================================
   Agent Cards Styling
   ========================================================================== */
/* Card structure - fixed height with flex layout */
.agent-card .card {
    border: 1px solid #dee2e6;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
    min-height: 320px;
}

.agent-card .card-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.agent-card .card:hover {
    border-color: var(--brand-primary);
    box-shadow: 0 4px 12px color-mix(in srgb, var(--brand-primary) 15%, transparent);
}

/* Agent card title */
.agent-card .card-title {
    color: #212529;
    font-weight: 600;
    flex-shrink: 0;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

/* Agent card description - fixed height with ellipsis */
.agent-card .card-text {
    color: #495057;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 10;
    -webkit-box-orient: vertical;
    line-clamp: 10;
    margin-bottom: 0.75rem;
}

/* Agent card footer - creator name and status icons on same line */
.agent-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    border-top: 1px solid #e9ecef;
    padding-top: 0.5rem;
    margin-top: auto;
    flex-shrink: 0;
    font-size: 0.875rem;
}

/* Agent card creator name */
.agent-card-creator {
    flex-grow: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.875rem;
    color: #6c757d;
}

.agent-card-creator i {
    color: var(--brand-primary);
    font-size: 0.875rem !important;
}

/* Agent card status icons - aligned right */
.agent-card-status {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.agent-card-status i {
    color: var(--brand-primary);
    opacity: 0.7;
    font-size: 0.875rem !important;
}

.agent-card-status i:hover {
    opacity: 1;
}

/* Owner heart icon uses brand colour */
.agent-card-status .bi-person-heart {
    color: var(--brand-primary) !important;
    opacity: 1;
}

/* Agent actions - pinned to bottom */
.agent-card .agent-actions {
    flex-shrink: 0;
    margin-top: 0.5rem;
}

/* Agent card action buttons */
.agent-card .agent-card-action {
    color: var(--brand-primary) !important;
    transition: color 0.15s ease;
}

.agent-card .agent-card-action:hover {
    color: color-mix(in srgb, var(--brand-primary) 70%, black) !important;
}

/* Highlighted agent card (when scrolled to) */
.cogniti-agent-card-highlight {
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-primary) 25%, transparent) !important;
}

/* Agent cards section headings */
.agent-cards-heading h2 {
    color: #212529;
    font-family: var(--brand-heading-font, inherit);
}

.agent-cards-heading .chevron {
    color: var(--brand-primary);
}

/* Pinned agent indicator */
.agent-card .agent-actions [data-cogniti-action="unpin"] i {
    color: var(--brand-primary) !important;
}

/* ==========================================================================
   Agent Cards Responsive Adjustments
   ========================================================================== */
@media (min-width: 992px) and (max-width: 1279px) {
    .agent-card .card {
        min-height: 300px;
    }
    
    .agent-card .card-title {
        font-size: 0.9375rem;
    }
    
    .agent-card .card-text {
        font-size: 0.875rem;
    }
    
    .agent-card-footer {
        font-size: 0.75rem;
    }
    
    .agent-card-creator {
        font-size: 0.75rem;
    }
    
    .agent-card-creator i {
        font-size: 0.75rem !important;
    }
    
    .agent-card-status i {
        font-size: 0.75rem !important;
    }
}

@media (min-width: 600px) and (max-width: 991px) {
    .agent-card {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
}

@media (max-width: 599px) {
    .agent-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .agent-card .card {
        min-height: 280px;
    }
}
.cogniti-styling-home-logo-override-preview-container {
    background-color: transparent !important;
}