:root {
    --sidebar-width: 320px;
    --sidebar-width-collapsed: 80px;
}

body {
    overflow-x: hidden;
}

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    background:  #f5f5f5;
    transition: all 0.3s ease;
    overflow-y: scroll;
}

.sidebar .top {
    background-color: #ffffff;
    font-size: 1.4em;
}
.sidebar-link.active {
    font-weight: bold;
}

.main-content {
    margin-left: var(--sidebar-width);
    width: 100%;
    background-color: #f8f9fa;
    min-height: 100vh;
    padding: 20px;
    transition: all 0.3s ease;
}

.loader {
    width: 48px;
    height: 48px;
    border: 5px solid #FFF;
    border-bottom-color: #003361;
    border-radius: 50%;
    display: none;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
    z-index: 1000;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.translation-row .btn-group-horizontal {
    display: none; /* hide by default */
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.translation-row:focus-within .btn-group-horizontal {
    display: inline-flex; /* show when row is focused */
    opacity: 1;
    display: inline-flex;
}

.occurrence {
    padding: 2px 0;
}

.src-occurrence {
    /* UIBK Corporate Design Color */
    background-color: #003361; 
    color: white;
    font-weight: bold;
}

.tgt-occurrence {
    /* UIBK Corporate Design Color */
    background-color: #f39200;
    color: white;
    font-weight: bold;
}
span.score {
    color: #3e3e3e;
}

/* smaller screens: reduce log height to keep buttons visible */
@media (max-width: 576px) {
  #log { max-height: 140px; font-size: 0.8rem; }
}

/* profiler wrapper already scrolls, ensure internal table does not expand page */
#profiler-wrapper {
  overflow: auto;         /* horizontal + vertical scroll if needed */
  max-width: 100%;
  box-sizing: border-box;
}

/* make profiler table compact and allow horizontal scroll inside wrapper */
#profiler-metrics table {
  min-width: 640px;       /* keeps columns readable, wrapper will scroll */
  width: auto;
}

/* stats content boxes: fixed flex sizing to avoid overflow */
#stats-content > div {
  box-sizing: border-box;
  max-width: 100%;
}
#stats-content .bg-light {
  overflow: auto;
  max-height: 6.5em;
  word-break: break-word;
}

/* ensure projects table stays within container */
#projects-table-container .table-responsive {
  overflow: auto;
  max-width: 100%;
}

/* if nav element is active */
.active {
    font-weight: bold;
}


/* Progress Bar */
.progress-container {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.transition-all {
    transition: all 0.2s ease;
}

.progress-header:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%) !important;
}

.log-message {
    border-left: 3px solid transparent;
    padding-left: 8px;
}

.log-message.text-danger {
    border-left-color: #dc3545;
    background-color: rgba(220, 53, 69, 0.1);
}

.log-message.text-warning {
    border-left-color: #ffc107;
    background-color: rgba(255, 193, 7, 0.1);
}

.progress-bar {
    transition: width 0.4s ease;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.7; }
    100% { opacity: 1; }
}

.progress-bar-animated.bg-primary {
    animation: pulse 1.5s ease-in-out infinite;
}

.alignfix-icon {
  background: linear-gradient(to left, #f39200 50%, #003361 50%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}