/*
.btn-primary {
    background: linear-gradient(45deg,#307eef,#a158f6,#edc38f);
    animation: Gradient 15s ease infinite;
}
*/
.profile-image {
    /* max-height: 500px; 
    max-width: 400px; */
    width: 100%;
    border-radius: 8px;
}
.profile {
    border-radius: 16px;
}
.profile-padding {
    height: calc(40vh);
}
.chat-box img {
    width: 100%;
    border-radius: 2px;
}
.chat-box {
    overflow-y: auto;
}

/* Hide chat-box scrollbars */
.chat-box::-webkit-scrollbar {
    display: none;
}
.chat-box {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
.chat-container {
    overflow-x: hidden;  /* Hide horizontal scrollbar */
    overflow-y: auto;
    min-height: 500px;
    max-height: calc(100dvh);
}

/* Hide ALL scrollbars on chat page */
body:has(.chat-container) *::-webkit-scrollbar {
    display: none;
}
body:has(.chat-container) * {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Fallback for browsers that don't support :has() - specific element scrollbar hiding */
.chat-container::-webkit-scrollbar {
    display: none;
}
.chat-container {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* Gallery styles - centralized for easy customization */
.gallery-container {
    max-width: 100% !important;
    width: 100% !important;
    overflow: hidden;
    box-sizing: border-box !important;
    margin: 0;
}

.gallery-scroll {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 10px;
    padding: 4px 0;
    width: 100%;
    box-sizing: border-box !important;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.gallery-scroll::-webkit-scrollbar {
    display: none;
}

.gallery-item {
    flex-shrink: 0;
    width: 108px;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    border-radius: 12px;
}

.gallery-item img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.gallery-item img:hover {
    border-color: #39527E;
    transform: scale(1.05);
}

.gallery-item-caption {
    font-size: 9px;
    color: #666;
    margin-top: 3px;
    word-wrap: break-word;
    line-height: 1.1;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-item-meta {
    font-size: 8px;
    color: #999;
    margin-top: 1px;
    max-width: 64px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gallery-controls {
    text-align: center;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid rgba(57, 82, 126, 0.1);
}

.gallery-btn {
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(57, 82, 126, 0.2);
    padding: 2px 6px;
    margin: 0 3px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.2s;
    color: #39527E;
}

.gallery-btn:hover {
    background: rgba(57, 82, 126, 0.1);
    border-color: #39527E;
}

.gallery-count {
    color: #666;
    font-size: 10px;
    margin: 0 6px;
}

.gallery-empty {
    text-align: center;
    color: #999;
    font-style: italic;
    padding: 20px;
}

/* Gallery image modal - easily customizable */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: pointer;
    backdrop-filter: blur(4px);
    transition: opacity 0.3s ease;
}

.gallery-modal-content {
    max-width: 90%;
    max-height: 90%;
    text-align: center;
    animation: galleryModalFadeIn 0.3s ease;
}

.gallery-modal-image {
    max-width: 100%;
    max-height: 80vh;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}

.gallery-modal-caption {
    color: white;
    margin-top: 15px;
    font-size: 16px;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.gallery-modal-hint {
    color: #ccc;
    margin-top: 10px;
    font-size: 12px;
    opacity: 0.8;
}

@keyframes galleryModalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Template System - Content Block Styles */
.content-block {
    margin: 8px 0;
    border-radius: 12px;
}

/* Image content blocks */
.image-container {
    text-align: center;
    max-width: 100%;
}

.content-image {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.image-caption {
    font-size: 12px;
    color: #666;
    margin-top: 8px;
    font-style: italic;
}

/* Text content blocks */
.text-container {
    padding: 8px;
}

/* Error content blocks */
.error-container {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    align-items: center;
    color: #dc3545;
}

.error-icon {
    font-size: 20px;
    margin-right: 8px;
}

.error-text {
    font-size: 14px;
}

/* Template engine error styles */
.template-error {
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.3);
    border-radius: 8px;
    padding: 12px;
    color: #856404;
    font-family: monospace;
    font-size: 12px;
}

.block-error {
    background: rgba(220, 53, 69, 0.1);
    border: 1px solid rgba(220, 53, 69, 0.3);
    border-radius: 8px;
    padding: 12px;
    color: #dc3545;
    font-family: monospace;
    font-size: 12px;
}
.spacer {
    height: 74px;
}
main, 
.chat-container {
    height: 100%;
}
.chat {
    width: 100%;
}
.User,
.agent-div.selected {
    background-color: rgba(57, 82, 126, 0.2);
}
.side-block::-webkit-scrollbar {
    display: none;
  }

.chat-prompt,
.chat-bar {
    z-index: 1;
}
/* Left menu button: same height as input container */
.chat-menu-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 24px !important; /* fixed radius to avoid oval when multiline */
    background-color: rgba(251, 253, 255, 0.5) !important;
    border: 2px solid rgba(251, 253, 255, 0.8) !important;
    box-shadow: 0px 4px 8px rgba(92, 125, 189, 0.2);
}
/* Send button inset inside field: slightly smaller */
.chat-send-btn {
    width: 40px;
    height: 40px;
    padding: 0;
    border-radius: 20px !important; /* fixed radius */
    box-shadow: 0 12px 24px rgba(40, 61, 102, 0.12);
}
.chat-prompt .form-control {
    height: 36px;            /* one-line height */
    min-height: 36px;
    line-height: 24px;
    padding: 6px 0;          /* true vertical centering */
    box-sizing: border-box;
    text-align: left;
    display: block;
}
/* keep container slim; vertical centering handled by textarea padding */
.chat-prompt { 
    padding-top: 4px !important; 
    padding-bottom: 4px !important; 
}
.chat-prompt { box-shadow: 0 12px 24px rgba(40, 61, 102, 0.12); }
.chat-prompt {
    background-color: rgba(251, 253, 255, 0.4);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: 1px solid rgba(150, 175, 202, 0.4);
    box-shadow: 0 4px 8px rgba(40, 61, 102, 0.12);
}
.chat-prompt input,
.chat-prompt input:focus,
.chat-prompt textarea,
.chat-prompt textarea:focus {
    background: none;
    border: none;
    box-shadow: none;
}
.chat-prompt textarea {
    resize: none;
    overflow-y: scroll;
    max-height: 200px; 
  }

/* Hide textarea scrollbars */
.chat-prompt textarea::-webkit-scrollbar {
    display: none;
}
.chat-prompt textarea {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* ensure inner control matches container rounding */

/* default single-line: keep pill via existing rounded classes */

/* When textarea expands to multiline, keep rounded corners fixed and tame height */
.chat-prompt.is-multiline { border-radius: 24px !important; }
.chat-prompt .form-control.is-multiline { border-radius: 24px !important; }

/* Align the send button to the input vertically and trim spacing */

.chat-bar .chat-send-btn { margin-left: 8px; }

/* Ensure start-new-chat overlay matches input height and rounding */
.start-new-chat-btn {
    display: block;
    height: 36px;
    line-height: 36px;
}


.auth-box,
.chat-box .User,
.chat-box .Agent,
.chat-prompt,
.chat-prompt textarea,
.chat-side,
.api-side {
    font-size: 14px;
}
.auth-box,
.chat-box .User,
.chat-box .Agent,
.chat-prompt,
.chat-side,
.api-side,
.premium-signup,
.upgrade,
.agent-header,
.profile,
.api-docs {
    border-radius: 12px;
    -webkit-backdrop-filter: saturate(180%) blur(20px)!important;
    backdrop-filter: saturate(180%) blur(20px)!important;
}
.btn {
    border-radius: 12px;
}
.hero {
    cursor: pointer;
}
.chat-box .User,
.chat-box .Agent,
.chat-prompt {
    cursor: text;
}
.auth-box input {
    border: none;
    background: transparent;
}
.fade {
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.regenerate-button {
    position: absolute;
    right: 0;
    display: none;
    z-index: 1;
  }
  
.chat-box .chat:hover .regenerate-button {
display: block;
}

.footer {
    border-radius: 12px 12px 0 0;
}


.hamburger {
    z-index: 2;
}
.chat-side {
    width: 300px!important;
    z-index: 2;
}
h5.recent {
    font-size: 14px;
}
#typing-indicator {
    font-size: 12px;
}
.side-block {
    max-height: 400px;
    overflow-y: auto;
}

/* Hide side-block scrollbars */
.side-block::-webkit-scrollbar {
    display: none;
}
.side-block {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}
#sidebar {
    height: auto;
}
.chat-list {
    text-decoration: none;
    line-height: 12px;
}
.chat-name {
    font-weight: 600;
    display: block;
    padding-bottom: 4px;
}
.chat-preview {
    font-size: 12px;
    color: rgba(84, 114, 166, 0.8);
}
.side-block .nav li {
    border-bottom: solid rgba(248, 218, 87, 0.4) 1px;
    border-radius: 0px;
    text-align: left;
}
.nav li.current {
    background-color: rgba(248, 218, 87, 0.4);
    border-radius: 12px;
    border: 2px solid rgba(248, 218, 87, 0.8);
    box-shadow: 0px 4px 8px rgba(92, 125, 189, 0.2);
}
button.btn-close {
    float: right;
    padding-right: 12px;
}
.api-docs.hero {
    margin-top: 120px;
}
.agent-list .agent,
.api .agent {
    border-radius: 12px;
    border: 2px solid rgba(248, 218, 87, 0.8);
    box-shadow: 0px 4px 8px rgba(92, 125, 189, 0.2);   
}
.agent-list a {
    text-decoration: none;
    color: inherit;
}
.agent-list .card-img-top {
    border-radius: 12px 12px 0 0;
}

p.agent-text,
.agent-header p {
    font-size: 12px;
    margin-bottom: 0px;
}
.agent-z {
    z-index: 1;
}
.agent-link {
    text-decoration: none;
    color: inherit;
}

.agent-div.selected {
    border: 2px solid rgb(48, 70, 107);
  }
  
.spacer {
    height: 74px;
  }
.agent-div,
.user-link img,
.admin-img img {
    transition: transform 0.3s ease;
}
.agent-div:hover,
.user-link img:hover,
.admin-img img:hover {
    transform: scale(1.1); /* Scales up the card by 5% */
}

.tooltip-inner {
    max-width: 400px;
}

.bio {
    max-height: 300px;
    overflow-y: scroll;
}

/* Hide bio scrollbars */
.bio::-webkit-scrollbar {
    display: none;
}
.bio {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.my-agent {
    width: 25px;
}





  /* Premium/Upgrade CSS */

.upgrade {
    background-color: rgba(251, 253, 255, 0.4);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border: solid rgba(150, 175, 202, 0.4) 1px;
    box-shadow: 0px 4px 8px rgba(40, 61, 102, 0.2);
    cursor: text;
    min-height: 40px!important;
}

    .upgrade input {
    border: none;
    background: transparent;
}
.upgrade .line {
    border-bottom: solid rgba(150, 175, 202, 0.4) 1px;
    border-radius: 0;
}
.upgrade-hero h4 {
    color: rgba(111, 139, 177, 0.8);
}

.card-icon {
    margin: 8px 6px 0 0;
}


.grecaptcha-badge { 
    visibility: hidden;
}


/* Country Select */
.select2-container--fire .select2-selection--single {
    background-color: none;
    border: none;
}
.select2-container--fire .select2-selection--single .select2-selection__rendered {
    padding-top: 6px;
}




/* API Page */

.scrolling-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    height: 300px; /* Adjust the height as needed */
    -ms-overflow-style: none; /* Hide scrollbar for IE and Edge */
    scrollbar-width: none; /* Hide scrollbar for Firefox */
}
.scrolling-wrapper::-webkit-scrollbar {
    display: none; /* Hide scrollbar for Chrome, Safari, and Opera */
}

.scrolling-wrapper .img-fluid {
    display: inline-block; /* Ensures images are lined up horizontally */
    height: 100%; /* Makes images fill the container height */
    margin: 1px; /* Adjust spacing between images */
}


pre {
    color: #666; /* Darker text color for better readability */
    border: solid rgba(150, 175, 202, 0.4) 1px;
    box-shadow: 0px 4px 8px rgba(40, 61, 102, 0.2);
    page-break-inside: avoid;
    font-family: monospace; /* Ensures text is in monospace */
    font-size: 15px; /* Slightly larger font size */
    line-height: 1.6; /* More room between lines */
    margin-bottom: 1.6em; /* Space below the block */
    max-width: 100%; /* Ensures it doesn't overflow its container */
    overflow: auto; /* Adds scrollbars if needed */
    display: block; /* Makes sure it's a block */
    padding: 2em; /* Padding inside the box */
    white-space: pre-wrap; /* Maintains whitespace formatting */
    word-wrap: break-word; /* Breaks long lines */
}

/* Hide pre scrollbars */
pre::-webkit-scrollbar {
    display: none;
}
pre {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

code {
    background-color: transparent; /* No background color */
    border: none; /* No borders */
    padding: 0; /* No padding */
}




/* Mobile menu positioning */
@media (max-width: 991.98px) {
    .mobile-bottom-menu.offcanvas-start {
        top: auto !important;
        bottom: 74px !important; /* Position above the chat bar */
        left: 16px !important; /* Left-aligned */
        transform: translateY(calc(100% + 74px)) !important; /* Animate from below */
        width: 300px !important; /* Restore original width */
        height: auto !important;
        max-height: 70vh !important;
        border-radius: 16px !important; /* All corners rounded */
        box-shadow: 0 16px 40px rgba(40, 61, 102, 0.3), 0 8px 20px rgba(40, 61, 102, 0.2) !important; /* Bigger deeper shadow */
        /* Translucent/blurry background */
        background-color: rgba(251, 253, 255, 0.4) !important;
        backdrop-filter: saturate(180%) blur(20px) !important;
        border: solid rgba(150, 175, 202, 0.4) 1px !important;
        transition: transform 0.3s ease-in-out !important; /* Add animation */
        will-change: transform; /* Hint browser for smoother start */
    }
    
    .mobile-bottom-menu.offcanvas-start.show {
        transform: translateY(0) !important;
    }
    
    .mobile-bottom-menu.offcanvas-start.hiding {
        transform: translateY(calc(100% + 74px)) !important;
    }
    
    /* Menu button styling */
    .mobile-menu-btn {
        backdrop-filter: blur(20px);
        background: rgba(255, 255, 255, 0.9) !important;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #39527E !important;
        transition: all 0.3s ease !important;
    }
    
    .mobile-menu-btn:hover {
        background: rgba(255, 255, 255, 1) !important;
        transform: scale(1.05);
        color: #39527E !important;
    }
    
    .mobile-menu-btn svg path {
        stroke: #39527E !important;
        fill: none !important;
    }
    


    
    /* Mobile header styles */
    .mobile-header {
        border-bottom: 1px solid rgba(150, 175, 202, 0.3);
        background: transparent; /* Let the menu background show through */
    }

    /* Ensure mobile header logo uses the same color logic as bottom nav button */
    .mobile-header svg path { stroke: #39527E !important; fill: none !important; }

/* Ensure desktop sidebar stays visible and mirrors mobile header layout */
@media (min-width: 992px) {
    #sidebar.offcanvas-lg {
        transform: none !important;
        visibility: visible !important;
        position: sticky;
        top: 16px;
        height: calc(100dvh - 32px);
    }
    /* Remove any close button on desktop if present */
    #sidebar .offcanvas-header .btn-close { display: none !important; }

    /* Tighten spacing to match mobile look */
    #sidebar .mobile-header { border-radius: 12px; }
}
    
    /* Admin button floating above menu (only when menu is open) */
    .admin-button-float {
        position: fixed;
        top: 16px;
        left: 16px; /* Same left alignment as menu */
        z-index: 1100;
    }
}

/* Desktop admin button positioning (same as mobile) */
@media (min-width: 992px) {
    .admin-button-float {
        position: fixed;
        top: 16px;
        left: 16px;
        z-index: 1100;
    }
}

/* Ensure inline SVG logos inherit text color */
.logo-icon { color: inherit; }
.logo-icon path { stroke: currentColor !important; }
.logo-icon line,
.logo-icon polyline,
.logo-icon polygon,
.logo-icon circle,
.logo-icon rect { stroke: currentColor !important; }

/*

sass /Users/chadetsell/Documents/GitHub/eros/static/css/theme.scss /Users/chadetsell/Documents/GitHub/eros/static/css/theme.css

*/