html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #333333, 0 0 0 0.25rem #1e3a5f;
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background-color: #121212;
  color: #e0e0e0;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: #909090;
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.skeleton-img {
    width: 100%;
    height: 50px;
    background: linear-gradient(90deg, #333 25%, #444 50%, #333 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.2s infinite linear;
    border-radius: 0.25rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

html, body {
    transition: background 0.3s, color 0.3s;
}

.dark {
    color-scheme: dark;
}

    .dark body {
        background-color: #121212;
        color: #e0e0e0;
    }

.sidebar-collapsed {
    width: 4rem;
}

.sidebar-expanded {
    width: 16rem;
}

.sidebar {
    transition: width 0.3s;
}

/* Force all headings to be centered, regardless of parent layout */
h1, h2, h3, h4, h5, h6 {
    display: block !important;
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.sidebar-collapsed ul li a {
    display: none !important;
}

.sidebar-expanded ul li a {
    display: flex !important;
    justify-content: flex-start;
    width: 100%;
    height: auto;
    padding-left: 1rem;
    padding-right: 1rem;
    border-radius: 0.5rem;
}

header > h1, header > h2, header > h3, header > h4, header > h5, header > h6 {
    width: 100%;
    text-align: center !important;
    margin-left: auto;
    margin-right: auto;
}

header h1, header h2, header h3, header h4, header h5, header h6 {
    width: 100%;
    text-align: center !important;
}

main h1, main h2, main h3, main h4, main h5, main h6 {
    text-align: center !important;
}

.sidebar-logo-row img {
    width: 2.5rem;
    height: 2.5rem;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    padding: 0.25rem;
}

/* Collapsed state */
.sidebar-collapsed .sidebar-logo-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0 0.5rem 0;
    gap: 0.5rem;
}

/* Expanded state */
.sidebar-expanded .sidebar-logo-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem 0.5rem 1rem;
    gap: 0.5rem;
}

#sidebar {
    overflow: hidden;
}

.no-transition {
    transition: none !important;
}
