/* Dashboard Initialization Styles */
/* Extracted from inline styles in index.html to improve page load performance */

/* Hide content initially */
body {
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.content-loaded {
    opacity: 1;
    width: fit-content;
    min-width: 100%;
    position: relative;
    z-index: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

/* Use CSS variable for background to allow theme-specific overrides */
body.content-loaded {
    background: var(--content-bg, transparent);
    background-image: var(--content-bg-image, linear-gradient(rgba(33, 37, 41, 0.4), rgba(33, 37, 41, 0.4)), url('/static/background1.jpg'));
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

html {
    background-color: var(--bs-dark);
}

/* Card translucency styles */
.card, 
.card.chat-card {
    background: rgba(33, 37, 41, 0.2) !important;
    background-image: none !important;
    backdrop-filter: none !important;
    border-left: 3px solid rgba(255, 255, 255, 0.1) !important;
}

.card.card-color-green {
    background: rgba(25, 135, 84, 0.2) !important;
}

.card.card-color-yellow {
    background: rgba(255, 193, 7, 0.2) !important;
}

.card.card-color-red {
    background: rgba(220, 53, 69, 0.2) !important;
}

/* Card text styling with proper hierarchy */
.card .card-title {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
    color: var(--bs-light) !important; /* Brighter white for titles */
}

.card .card-text,
.card .card-body p {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7) !important;
    color: rgba(255, 255, 255, 0.90) !important; /* Adjusted to 0.90 opacity */
}

/* Usage Alert Styles */
.usage-alert {
    position: fixed;
    bottom: 20px;
    left: 20px;
    padding: 20px;
    border-radius: 8px;
    max-width: 325px;
    background-color: rgba(33, 37, 41, 0.95);
    color: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1060;
    animation: slideIn 0.3s ease-out;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.usage-alert.critical {
    border-left: 4px solid var(--bs-danger);
}

.usage-alert.limit {
    border: 1px solid rgba(220, 53, 69, 0.2);  /* Subtle red border */
    border-left: 4px solid var(--bs-danger);  /* Red left border */
    background-color: rgba(33, 37, 41, 0.95);  /* Dark background with slight transparency */
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);  /* Red-tinted shadow */
}

.usage-alert.warning {
    border-left: 4px solid var(--bs-warning);
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.usage-alert h4 {
    margin: 0 0 15px 0;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.usage-alert h4 i {
    font-size: 1.2rem;
}

.usage-alert p {
    margin: 0 0 15px 0;
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
}

.usage-alert ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}

.usage-alert ul li {
    font-size: 0.9rem;
    opacity: 0.9;
    line-height: 1.4;
    margin-bottom: 5px;
}

.usage-alert .alert-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.usage-alert .alert-actions > .btn {
    flex: 1;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.usage-alert .close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: none;
    border: none;
    color: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.7;
    padding: 0 4px;
}

.usage-alert .close-btn:hover {
    opacity: 1;
}

/* Hover effect for board list items */
.list-group-item:hover,
#boardList .list-group-item:hover {
    background: rgba(var(--bs-primary-rgb), 0.1) !important;
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
    box-shadow: 0 0 10px rgba(var(--bs-primary-rgb), 0.2) !important;
}

/* Active state for board list items */
.list-group-item.active,
#boardList .list-group-item.active,
.board-list .list-group-item.active {
    background: rgba(var(--bs-primary-rgb), 0.15) !important;
    background-color: rgba(var(--bs-primary-rgb), 0.15) !important;
    border-color: rgba(var(--bs-primary-rgb), 0.3) !important;
    box-shadow: 0 0 12px rgba(var(--bs-primary-rgb), 0.25) !important;
}

/* Font family overrides */
:root {
    --bs-font-sans-serif: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif !important;
}

body {
    font-family: var(--bs-font-sans-serif) !important;
    letter-spacing: 0.01em !important; /* Adjusted for testing using em */
}

.btn {
    letter-spacing: 0.01em !important; /* Apply to Bootstrap buttons */
}

/* Hide test button */
#testTokenLimitModalBtn {
    display: none !important; /* Hide the button */
}

/* Theme toggle now visible on all screen sizes */ 