/* ========================================
   VERSION BADGE (Sidebar Footer)
   ======================================== */
.version-badge {
    position: relative;
    display: inline-block;
    padding: 2px 8px;
    background: none;
    border: none;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.6rem;
    font-family: 'DM Mono', monospace;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hide icon when sidebar is expanded */
.version-badge-icon {
    display: none;
    font-size: 0.65rem;
    flex-shrink: 0;
}

.sidebar-footer {
    padding: 6px 12px;
    text-align: center;
}

.version-badge:hover,
.version-badge:focus-visible {
    color: rgba(255, 255, 255, 0.55);
    outline: none;
}

/* Collapsed sidebar */
.sidebar.collapsed .version-badge,
html[data-sidebar-collapsed="true"] .sidebar .version-badge {
    padding: 5px;
}

/* Show icon when collapsed */
.sidebar.collapsed .version-badge-icon,
html[data-sidebar-collapsed="true"] .sidebar .version-badge-icon {
    display: inline;
}

.sidebar.collapsed .version-badge .nav-item-text,
html[data-sidebar-collapsed="true"] .sidebar .version-badge .nav-item-text {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .version-badge::after,
html[data-sidebar-collapsed="true"] .sidebar .version-badge::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(100% + 12px);
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.sidebar.collapsed .version-badge:hover::after,
.sidebar.collapsed .version-badge:focus-visible::after,
html[data-sidebar-collapsed="true"] .sidebar .version-badge:hover::after,
html[data-sidebar-collapsed="true"] .sidebar .version-badge:focus-visible::after {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   VERSION LOG MODAL
   ======================================== */
.vl-dialog {
    padding: 0;
    border: none;
    border-radius: 16px;
    background: transparent;
    max-width: 560px;
    width: 90vw;
    max-height: 80vh;
}

.vl-dialog::backdrop {
    background: rgba(15, 23, 41, 0.6);
    backdrop-filter: blur(4px);
}

.vl-modal {
    background: white;
    border-radius: 16px;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.2);
    display: flex;
    flex-direction: column;
    max-height: 80vh;
    overflow: hidden;
}

.vl-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.vl-modal-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dc-dark-blue);
}

.vl-modal-close {
    background: none;
    border: none;
    font-size: 1.4rem;
    color: #9ca3af;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    line-height: 1;
    transition: all 0.15s ease;
}

.vl-modal-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.vl-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Loading state */
.vl-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* Empty state */
.vl-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.vl-empty i {
    font-size: 2rem;
    margin-bottom: 12px;
    display: block;
}

/* Version entries */
.vl-entry {
    position: relative;
    padding-left: 24px;
    margin-bottom: 28px;
}

.vl-entry:last-child {
    margin-bottom: 0;
}

/* Timeline line */
.vl-entry::before {
    content: '';
    position: absolute;
    left: 5px;
    top: 24px;
    bottom: -28px;
    width: 2px;
    background: #e5e7eb;
}

.vl-entry:last-child::before {
    display: none;
}

/* Timeline dot */
.vl-entry::after {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--dc-blue);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--dc-blue);
}

.vl-entry:first-child::after {
    background: var(--dc-blue);
    box-shadow: 0 0 0 3px rgba(var(--dc-primary-rgb), 0.2);
}

.vl-entry-header {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 4px;
}

.vl-entry-version {
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dc-blue);
    background: rgba(var(--dc-primary-rgb), 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

.vl-entry-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dc-dark-blue);
}

.vl-entry-date {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 8px;
}

.vl-entry-description {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.6;
    white-space: pre-line;
}

/* ========================================
   VERSION LOG MANAGEMENT (Settings)
   ======================================== */
.vl-manage-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vl-manage-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 16px 20px;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    transition: all 0.15s ease;
}

.vl-manage-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.vl-manage-info {
    flex: 1;
    min-width: 0;
}

.vl-manage-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 4px;
}

.vl-manage-version {
    font-family: 'DM Mono', monospace;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dc-blue);
    background: rgba(var(--dc-primary-rgb), 0.08);
    padding: 2px 8px;
    border-radius: 4px;
}

.vl-manage-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--dc-dark-blue);
}

.vl-manage-date {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-bottom: 6px;
}

.vl-manage-description {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.5;
    white-space: pre-line;
    max-height: 60px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vl-manage-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    margin-left: 12px;
}
