/* Globale Styles für QR Code Tool */

/* Global Body Styling */
body {
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    transition: background-color 0.3s ease, color 0.3s ease;
}

:root {
    /* Light Mode Colors */
    --bs-body-bg: #f8f9fa;
    --bs-body-color: #212529;
    --bs-card-bg: #ffffff;
    --bs-card-border: rgba(0, 0, 0, 0.125);
    --bs-table-bg: #ffffff;
    --bs-table-hover-bg: rgba(0, 123, 255, 0.05);
    --bs-navbar-bg: #0d6efd;
    --bs-input-bg: #ffffff;
    --bs-input-border: #ced4da;
    --bs-modal-bg: #ffffff;
    --bs-offcanvas-bg: #ffffff;
    --bs-dropdown-bg: #ffffff;
    --bs-list-group-bg: #ffffff;
    --bs-alert-bg: #d1ecf1;
}

[data-bs-theme="dark"] {
    /* Dark Mode Colors */
    --bs-body-bg: #1a1a1a;
    --bs-body-color: #e9ecef;
    --bs-card-bg: #2d2d2d;
    --bs-card-border: rgba(255, 255, 255, 0.125);
    --bs-table-bg: #2d2d2d;
    --bs-table-hover-bg: rgba(255, 255, 255, 0.05);
    --bs-navbar-bg: #0d1117;
    --bs-input-bg: #2d2d2d;
    --bs-input-border: #495057;
    --bs-modal-bg: #2d2d2d;
    --bs-offcanvas-bg: #2d2d2d;
    --bs-dropdown-bg: #2d2d2d;
    --bs-list-group-bg: #2d2d2d;
    --bs-alert-bg: #1e4d5b;
}

/* Logo Display Styles */
.d-dark-none {
    display: block !important;
}

.d-dark-block {
    display: none !important;
}

[data-bs-theme="dark"] .d-dark-none {
    display: none !important;
}

[data-bs-theme="dark"] .d-dark-block {
    display: block !important;
}

.navbar-logo {
    object-fit: contain;
    vertical-align: middle;
}

.login-logo {
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Dark Mode Toggle Switch Styles */
.dark-mode-switch {
    display: flex;
    align-items: center;
}

/* Switch styling for navbar */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: #2196F3;
}

input:focus + .slider {
    box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

.dark-mode-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    padding: 0;
}

.dark-mode-toggle:focus {
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.dark-mode-slider {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark-mode-icon {
    font-size: 10px;
    color: #ffc107;
    transition: all 0.3s ease;
}

/* Dark mode active state */
[data-bs-theme="dark"] .dark-mode-toggle {
    background: #0d1117;
    border-color: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] .dark-mode-slider {
    transform: translateX(26px);
    background: white;
}

[data-bs-theme="dark"] .dark-mode-icon {
    color: #6f42c1;
}

/* Login page positioning */
.login-dark-mode-switch {
    position: fixed;
    top: 15px;
    right: 20px;
    z-index: 9999;
}

/* Admin Switch Styling - enhance Bootstrap switches */
.form-switch .form-check-input:hover:not(:disabled) {
    transform: scale(1.05);
}

/* Dark Mode Admin Switch */
[data-bs-theme="dark"] .form-switch .form-check-input {
    background-color: #6c757d;
    border-color: #6c757d;
}

[data-bs-theme="dark"] .form-switch .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

[data-bs-theme="dark"] .form-switch .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Disabled Admin Switch */
.form-switch .form-check-input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-switch .form-check-input:disabled:hover {
    transform: none;
}

/* Navbar styling */
.navbar .dark-mode-switch {
    margin-right: 0.5rem;
    display: flex;
    align-items: center;
    height: 100%;
}

.navbar .nav-item {
    display: flex;
    align-items: center;
}

.navbar .nav-item.dark-mode-nav-item {
    display: flex;
    align-items: center;
    padding: 0;
}

.navbar .dark-mode-toggle {
    border-color: rgba(255, 255, 255, 0.3);
    margin-top: 0;
    margin-bottom: 0;
}

.navbar .dark-mode-toggle:hover {
    transform: scale(1.05);
}

/* Hover effects */
.dark-mode-toggle:hover {
    transform: scale(1.05);
}

.login-dark-mode-switch .dark-mode-toggle:hover {
    transform: scale(1.1);
}

/* Light Mode Navbar Styling */
.navbar-nav .nav-link {
    transition: all 0.2s ease;
}

.navbar-nav .nav-link.active,
.navbar-nav .show > .nav-link {
    font-weight: 500;
}

/* Sidebar Filter Items */
.list-group-item {
    transition: all 0.2s ease;
    border-left-width: 3px;
}

.list-group-item:not(.active) {
    border-left-color: transparent;
}

/* Dark Mode Navbar Styling */
[data-bs-theme="dark"] .navbar-dark,
[data-bs-theme="dark"] .navbar.bg-primary {
    background-color: #0d1117 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
}

[data-bs-theme="dark"] .navbar-dark .navbar-nav .nav-link:hover,
[data-bs-theme="dark"] .navbar-dark .navbar-nav .nav-link:focus {
    color: rgba(255, 255, 255, 0.9);
}

[data-bs-theme="dark"] .navbar-dark .navbar-nav .nav-link.active {
    color: white !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.375rem;
    font-weight: 500;
}

/* Dark mode sidebar items */
[data-bs-theme="dark"] .list-group-item.active {
    background-color: white !important;
    border-color: white !important;
    color: #1a262e !important;
}

[data-bs-theme="dark"] .list-group-item.active .text-muted {
    color: rgba(26, 38, 46, 0.7) !important;
}

[data-bs-theme="dark"] .list-group-item.active .badge {
    background-color: #1a262e !important;
    color: white !important;
}

[data-bs-theme="dark"] .list-group-item.active i {
    color: #1a262e !important;
}

[data-bs-theme="dark"] .list-group-item:hover:not(.active) {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

[data-bs-theme="dark"] .list-group-item:hover:not(.active) i {
    color: rgba(255, 255, 255, 0.9) !important;
}

/* Dark mode sidebar group label */
[data-bs-theme="dark"] .list-group-item.bg-light {
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

[data-bs-theme="dark"] .list-group-item.bg-light .text-muted {
    color: rgba(255, 255, 255, 0.4) !important;
}

/* Logo Toggle Switch Styles (similar to dark mode toggle) */
.logo-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    padding: 0;
}

.logo-toggle:focus {
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.logo-slider {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.logo-icon {
    font-size: 10px;
    color: #6c757d;
    transition: all 0.3s ease;
}

/* Active state */
.logo-toggle.active {
    background: #198754;
    border-color: #198754;
}

.logo-toggle.active .logo-slider {
    transform: translateX(26px);
    background: white;
}

.logo-toggle.active .logo-icon {
    color: #198754;
}

/* Dark mode logo toggle */
[data-bs-theme="dark"] .logo-toggle {
    border-color: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] .logo-toggle.active {
    background: #198754;
    border-color: #198754;
}

[data-bs-theme="dark"] .logo-toggle .logo-slider {
    background: white;
}

[data-bs-theme="dark"] .logo-toggle:hover {
    transform: scale(1.05);
}

/* Active Toggle Switch Styles (similar to logo toggle) */
.active-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    outline: none;
    padding: 0;
}

.active-toggle:focus {
    box-shadow: 0 0 0 2px rgba(13, 110, 253, 0.25);
}

.active-slider {
    position: absolute;
    top: 1px;
    left: 1px;
    width: 20px;
    height: 20px;
    background: white;
    border-radius: 50%;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.active-icon {
    font-size: 10px;
    color: #6c757d;
    transition: all 0.3s ease;
}

/* Active state */
.active-toggle.active {
    background: #198754;
    border-color: #198754;
}

.active-toggle.active .active-slider {
    transform: translateX(26px);
    background: white;
}

.active-toggle.active .active-icon {
    color: #198754;
}

/* Dark mode active toggle */
[data-bs-theme="dark"] .active-toggle {
    border-color: rgba(255, 255, 255, 0.3);
}

[data-bs-theme="dark"] .active-toggle.active {
    background: #198754;
    border-color: #198754;
}

[data-bs-theme="dark"] .active-toggle .active-slider {
    background: white;
}

[data-bs-theme="dark"] .active-toggle:hover {
    transform: scale(1.05);
}

[data-bs-theme="dark"] .navbar-brand {
    color: rgba(255, 255, 255, 0.95) !important;
}

[data-bs-theme="dark"] .dropdown-menu {
    background-color: #2d2d2d !important;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

[data-bs-theme="dark"] .dropdown-item {
    color: #e9ecef !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="dark"] .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

/* Padding für sehr breite Bildschirme */
@media (min-width: 1920px) {
    .container-fluid {
        padding-left: 3rem;
        padding-right: 3rem;
    }
}

@media (min-width: 2560px) {
    .container-fluid {
        padding-left: 5rem;
        padding-right: 5rem;
    }
}

/* Bessere Tabellenansicht */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Sticky Table Headers */
.table thead th {
    position: sticky;
    top: 0;
    background-color: var(--bs-table-bg);
    z-index: 10;
    box-shadow: 0 2px 2px -1px rgba(0, 0, 0, 0.1);
}

[data-bs-theme="dark"] .table thead th {
    box-shadow: 0 2px 2px -1px rgba(255, 255, 255, 0.1);
}

/* Hover-Effekte für Tabellen */
.table-hover tbody tr:hover {
    background-color: var(--bs-table-hover-bg);
    cursor: pointer;
}

/* Bessere Button-Gruppen in Tabellen */
.table td .btn-group {
    display: flex;
    gap: 0.25rem;
}

/* Custom styling for group filter selects */
.form-select option[data-color] {
    font-family: monospace;
}

/* Color squares styling - colors will be applied via JavaScript */
.color-square {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 2px;
    margin-right: 6px;
    vertical-align: middle;
}

/* Responsive Karten */
@media (min-width: 1920px) {
    .col-xl-2 {
        flex: 0 0 auto;
        width: 16.66666667%;
    }
}

/* Navbar optimiert für breite Bildschirme */
@media (min-width: 1400px) {
    .navbar .container-fluid {
        max-width: none;
    }
}

/* QR Code Vorschau Box */
.qr-code-preview {
    max-width: 400px;
    margin: 0 auto;
}

/* Statistik-Karten */
.stat-card {
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
/* Changelog Modal — Tag-Badges */
.cl-tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 1rem;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    flex-shrink: 0;
}
.cl-tag-new     { background: #d1fae5; color: #065f46; }
.cl-tag-added   { background: #dbeafe; color: #1e40af; }
.cl-tag-changed { background: #fef3c7; color: #92400e; }
.cl-tag-fixed   { background: #fee2e2; color: #991b1b; }

[data-bs-theme="dark"] .cl-tag-new     { background: #064e3b; color: #6ee7b7; }
[data-bs-theme="dark"] .cl-tag-added   { background: #1e3a8a; color: #93c5fd; }
[data-bs-theme="dark"] .cl-tag-changed { background: #78350f; color: #fcd34d; }
[data-bs-theme="dark"] .cl-tag-fixed   { background: #7f1d1d; color: #fca5a5; }
