/* Journal Tab Styles */

#journal-container {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.journal-tab {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.journal-events {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 0; /* Важно для flex-контейнера с overflow */
    
    /* Firefox scrollbar */
    scrollbar-width: thin;
    scrollbar-color: rgba(124, 92, 219, 0.5) rgba(0, 0, 0, 0.2);
}

/* Webkit scrollbar стили */
.journal-events::-webkit-scrollbar {
    width: 8px;
}

.journal-events::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.journal-events::-webkit-scrollbar-thumb {
    background: rgba(124, 92, 219, 0.5);
    border-radius: 4px;
    transition: background 0.2s ease;
}

.journal-events::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 92, 219, 0.7);
}

/* Event item */
.journal-event {
    padding: 0.5rem 0.75rem;
    background: transparent;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    transition: all 0.2s ease;
}

.journal-event:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Event importance - цветовая подсветка текста */
.journal-event-minor {
    color: rgba(255, 255, 255, 0.6);
}

.journal-event-major {
    color: rgba(255, 193, 7, 0.9);
}

.journal-event-major:hover {
    background: rgba(255, 193, 7, 0.1);
}

.journal-event-milestone {
    color: rgba(233, 30, 99, 1);
    font-weight: 500;
}

.journal-event-milestone:hover {
    background: rgba(233, 30, 99, 0.1);
}

/* Event time */
.journal-event-time {
    flex-shrink: 0;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.4);
    min-width: 4rem;
    text-align: right;
}

/* Event text */
.journal-event-text {
    flex: 1;
    font-size: 0.875rem;
    line-height: 1.4;
}

/* Placeholder */
.journal-placeholder {
    padding: 2rem;
    text-align: center;
    color: var(--placeholder-color, #9e9e9e);
    font-size: 0.875rem;
}

/* Loading */
.journal-loading {
    padding: 1rem;
    text-align: center;
    color: var(--loading-color, #757575);
    font-size: 0.875rem;
}

/* Error */
.journal-error {
    padding: 0.75rem;
    background: var(--error-bg, #ffebee);
    border-left: 3px solid var(--error-color, #f44336);
    border-radius: 8px;
    color: var(--error-text, #c62828);
    font-size: 0.875rem;
}

/* Load more button */
.journal-load-more {
    margin: 0.5rem auto;
    padding: 0.5rem 1.5rem;
    background: var(--button-bg, #2196f3);
    color: var(--button-text, #fff);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s ease;
}

.journal-load-more:hover {
    background: var(--button-hover-bg, #1976d2);
}

.journal-load-more:disabled {
    background: var(--button-disabled-bg, #bdbdbd);
    cursor: not-allowed;
}

/* Mobile adaptations */
@media (max-width: 768px) {
    .journal-event {
        flex-direction: column;
        gap: 0.25rem;
    }

    .journal-event-time {
        min-width: auto;
        text-align: left;
    }
}

