/* Custom styles for Dias Dias */

/* Beta Label */
.beta-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--bs-warning);
    letter-spacing: 1.5px;
    margin-top: -4px;
    text-align: center;
    opacity: 1;
    display: block;
    line-height: 1;
}

/* Hero box theme compatibility */
[data-bs-theme="light"] .bg-body-secondary {
    background-color: var(--bs-light) !important;
}

[data-bs-theme="dark"] .bg-body-secondary {
    background-color: var(--bs-dark) !important;
}

/* General styles */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content-container {
    flex: 1;
}

/* Timeline styling */
.timeline {
    position: relative;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--bs-secondary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
}

.timeline-item {
    position: relative;
    width: 50%;
    margin-bottom: 30px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    right: -8px;
    background-color: var(--bs-warning);
    border: 4px solid var(--bs-warning);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-item.left {
    left: 0;
    padding-right: 40px;
}

.timeline-item.right {
    left: 50%;
    padding-left: 40px;
}

.timeline-item.right::after {
    left: -8px;
}

@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item.left, .timeline-item.right {
        left: 0;
        padding-left: 70px;
        padding-right: 25px;
    }
    
    .timeline-item.left::after, .timeline-item.right::after {
        left: 23px;
    }
}

/* Sidebar */
.sidebar {
    min-width: 250px;
    max-width: 250px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    transition: all 0.3s;
}

.sidebar.show {
    margin-left: 0;
}

.content {
    margin-left: 250px;
    transition: all 0.3s;
}

@media (max-width: 768px) {
    .sidebar {
        margin-left: -250px;
    }
    .content {
        margin-left: 0;
    }
    .sidebar.show + .content {
        margin-left: 250px;
    }
}

/* Loading skeleton */
.skeleton-loading .placeholder {
    animation: placeholder-glow 2s ease-in-out infinite;
    background-color: var(--bs-secondary);
    opacity: 0.3;
}

/* Entry details */
.entry-metadata {
    border-left: 4px solid var(--bs-warning);
    padding-left: 1rem;
}

/* Tags */
#entryTags .badge {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.badge {
    transition: all 0.2s;
}

.badge:hover {
    transform: translateY(-2px);
}

/* Entry card hover effect */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

/* Search results highlight */
.search-highlight {
    background-color: rgba(255, 193, 7, 0.3);
    padding: 0 2px;
    border-radius: 2px;
}

/* Footer */
footer {
    padding: 1rem 0;
    margin-top: auto;
}

/* Create entry form */
.form-floating label {
    color: var(--bs-body-color);
}

.form-floating .form-control {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    border-color: var(--bs-secondary);
}

.form-floating .form-control:focus {
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
    border-color: var(--bs-warning);
}

/* Light/Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1050;
    background: var(--bs-warning);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    color: var(--bs-dark);
    font-size: 1.2rem;
}

.theme-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

/* Light mode styles */
[data-bs-theme="light"] {
    --bs-body-bg: #ffffff;
    --bs-body-color: #212529;
    --bs-card-bg: #ffffff;
}

[data-bs-theme="light"] .navbar {
    background-color: var(--bs-warning) !important;
}

[data-bs-theme="light"] .card {
    background-color: #ffffff;
    color: #212529;
    border: 1px solid #dee2e6;
}

[data-bs-theme="light"] .connection-reasoning {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    border: 1px solid #dee2e6;
}

[data-bs-theme="light"] .connection-type {
    color: #495057 !important;
}

[data-bs-theme="light"] .connection-description {
    color: #6c757d !important;
}

[data-bs-theme="light"] .btn-outline-warning {
    color: #856404;
    border-color: #ffc107;
}

[data-bs-theme="light"] .btn-outline-warning:hover {
    background-color: #ffc107;
    color: #000;
}

/* Dark mode styles */
[data-bs-theme="dark"] {
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #ffffff;
    --bs-card-bg: #2d2d2d;
}

[data-bs-theme="dark"] .navbar {
    background-color: #2d2d2d !important;
}

[data-bs-theme="dark"] .card {
    background-color: #2d2d2d;
    color: #ffffff;
    border: 1px solid #495057;
}

[data-bs-theme="dark"] .connection-reasoning {
    background-color: #343a40 !important;
    color: #ffffff !important;
    border: 1px solid #495057;
}

[data-bs-theme="dark"] .connection-type {
    color: #ffc107 !important;
}

[data-bs-theme="dark"] .connection-description {
    color: #ced4da !important;
}

[data-bs-theme="dark"] .btn-outline-warning {
    color: #ffc107;
    border-color: #ffc107;
}

[data-bs-theme="dark"] .btn-outline-warning:hover {
    background-color: #ffc107;
    color: #000;
}

/* Connection reasoning visibility fixes */
.connection-reasoning {
    padding: 0.75rem;
    margin: 0.5rem 0;
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.connection-type {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.connection-description {
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

.connection-strength {
    font-weight: 700;
    color: var(--bs-warning);
}

/* Ensure text is always visible */
.related-entry .card-body {
    color: inherit;
}

.related-entry .card-title {
    color: inherit;
}

.related-entry .card-text {
    color: inherit;
}
