/* PrivacyDb base styles */

.pdb-sidebar {
    width: 240px;
    min-width: 240px;
    z-index: 1200;
    overflow: visible;
    transition: width 0.18s ease, min-width 0.18s ease;
}

.pdb-sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: 0.65rem;
}

.pdb-content,
.pdb-main {
    width: 100%;
    min-width: 0;
}

.pdb-nav-icon {
    width: 1.15rem;
    height: 1.15rem;
    flex: 0 0 1.15rem;
    fill: currentColor;
}

.pdb-brand {
    min-width: 0;
}

.pdb-brand-icon {
    display: none;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.pdb-sidebar-toggle {
    flex: 0 0 auto;
}

.pdb-sidebar-toggle-closed {
    display: none;
}

.pdb-sidebar-toggle-mobile {
    display: none;
}

.pdb-qr-code {
    display: block;
    padding: 0.5rem;
    border-radius: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--bs-border-color);
}

.pdb-website-card {
    overflow: hidden;
}

.pdb-website-url {
    color: var(--bs-link-color);
    text-decoration-color: rgba(var(--bs-link-color-rgb), 0.35);
    text-underline-offset: 0.18em;
    overflow-wrap: anywhere;
}

.pdb-website-url:hover,
.pdb-website-url:focus {
    color: var(--bs-link-hover-color);
    text-decoration-color: currentColor;
}

.pdb-dashboard-widget {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.pdb-dashboard-widget:hover,
.pdb-dashboard-widget:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 0.6rem 1.4rem rgba(15, 23, 42, 0.08);
}

.pdb-mobile-page-title,
.pdb-mobile-actions,
.pdb-mobile-menu-actions {
    display: none;
}

.pdb-theme-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: 0;
    background: transparent;
    color: var(--bs-body-color);
    padding: 0.15rem 0.25rem;
}

.pdb-theme-icon {
    width: 1rem;
    font-size: 0.95rem;
    line-height: 1;
    text-align: center;
    opacity: 0.65;
}

.pdb-theme-track {
    position: relative;
    width: 46px;
    height: 26px;
    border-radius: 999px;
    background: #d7dde5;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
    transition: background-color 0.18s ease;
}

.pdb-theme-thumb {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
    transition: transform 0.18s ease;
}

[data-bs-theme="dark"] .pdb-theme-track {
    background: #375aef;
}

[data-bs-theme="dark"] .pdb-theme-thumb {
    transform: translateX(20px);
}

[data-bs-theme="light"] .pdb-theme-icon:first-child,
[data-bs-theme="dark"] .pdb-theme-icon:last-child {
    opacity: 1;
}

body.pdb-sidebar-collapsed .pdb-sidebar {
    width: 76px;
    min-width: 76px;
}

body.pdb-sidebar-collapsed .pdb-sidebar .pdb-nav-label {
    display: none;
}

body.pdb-sidebar-collapsed .pdb-sidebar .nav-link {
    position: relative;
    justify-content: center;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

body.pdb-sidebar-collapsed .pdb-sidebar .nav-link[data-menu-tooltip]::after {
    content: attr(data-menu-tooltip);
    position: absolute;
    left: calc(100% + 0.65rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 1300;
    white-space: nowrap;
    padding: 0.35rem 0.55rem;
    border-radius: 0.45rem;
    font-size: 0.8rem;
    color: #ffffff;
    background: rgba(20, 24, 28, 0.95);
    box-shadow: 0 0.35rem 1rem rgba(0, 0, 0, 0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.12s ease, transform 0.12s ease;
}

body.pdb-sidebar-collapsed .pdb-sidebar .nav-link[data-menu-tooltip]:hover::after,
body.pdb-sidebar-collapsed .pdb-sidebar .nav-link[data-menu-tooltip]:focus::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0.15rem);
}

body.pdb-sidebar-collapsed .pdb-sidebar hr {
    margin-left: 0.25rem;
    margin-right: 0.25rem;
}

body.pdb-sidebar-collapsed .pdb-brand-icon,
body.pdb-sidebar-collapsed .pdb-sidebar-toggle-closed {
    display: inline;
}

body.pdb-sidebar-collapsed .pdb-brand {
    font-size: 0.95rem;
}

body.pdb-sidebar-collapsed .pdb-sidebar > .d-flex:first-child {
    flex-direction: column;
    justify-content: center !important;
    align-items: center !important;
    gap: 0.45rem !important;
    margin-bottom: 1.35rem !important;
}

body.pdb-sidebar-collapsed .pdb-brand {
    display: flex;
    justify-content: center;
    width: 100%;
    line-height: 1;
}

body.pdb-sidebar-collapsed .pdb-sidebar-toggle {
    width: 2rem;
    height: 2rem;
    padding: 0;
    border-radius: 999px;
}

body.pdb-sidebar-collapsed .pdb-sidebar-toggle-open {
    display: none;
}

@media (max-width: 991.98px) {
    .pdb-shell {
        flex-direction: column;
    }

    .pdb-sidebar {
        position: sticky !important;
        top: 0;
        width: 100%;
        min-width: 100%;
        height: auto !important;
        min-height: auto;
        padding: 0.75rem 1rem !important;
        border-right: 0 !important;
        border-bottom: 1px solid var(--bs-border-color);
    }

    .pdb-sidebar > .d-flex {
        margin-bottom: 0 !important;
    }

    .pdb-mobile-page-title {
        display: block;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-weight: 600;
    }

    .pdb-mobile-actions {
        display: none;
    }

    .pdb-sidebar .nav,
    .pdb-sidebar > hr,
    .pdb-sidebar > a.nav-link,
    .pdb-mobile-menu-actions {
        display: none;
    }

    body.pdb-mobile-menu-open .pdb-sidebar .nav {
        display: flex;
        margin-top: 0.75rem;
    }

    body.pdb-mobile-menu-open .pdb-sidebar > hr,
    body.pdb-mobile-menu-open .pdb-sidebar > a.nav-link {
        display: flex;
    }

    body.pdb-mobile-menu-open .pdb-mobile-menu-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.75rem 0.5rem 0.25rem;
    }

    body.pdb-sidebar-collapsed .pdb-sidebar {
        width: 100%;
        min-width: 100%;
    }

    body.pdb-sidebar-collapsed .pdb-sidebar .pdb-nav-label {
        display: inline;
    }

    body.pdb-sidebar-collapsed .pdb-sidebar .nav-link {
        justify-content: flex-start;
        padding-left: var(--bs-nav-link-padding-x);
        padding-right: var(--bs-nav-link-padding-x);
    }

    .pdb-sidebar-toggle-open,
    .pdb-sidebar-toggle-closed,
    body.pdb-sidebar-collapsed .pdb-brand-icon,
    body.pdb-sidebar-collapsed .pdb-sidebar-toggle-open,
    body.pdb-sidebar-collapsed .pdb-sidebar-toggle-closed {
        display: none;
    }

    body.pdb-sidebar-collapsed .pdb-sidebar .pdb-brand .pdb-nav-label,
    .pdb-sidebar-toggle-mobile {
        display: inline;
    }

    body.pdb-sidebar-collapsed .pdb-brand {
        font-size: inherit;
    }

    body.pdb-sidebar-collapsed .pdb-sidebar .nav-link[data-menu-tooltip]::after {
        display: none;
    }

    .pdb-sidebar + .flex-grow-1 {
        height: auto !important;
        min-height: calc(100vh - 64px);
        overflow: visible !important;
    }

    .pdb-page-header {
        display: none !important;
    }

    .pdb-theme-switch {
        gap: 0.25rem;
    }

    .pdb-theme-track {
        width: 40px;
        height: 24px;
    }

    .pdb-theme-thumb {
        width: 18px;
        height: 18px;
    }

    [data-bs-theme="dark"] .pdb-theme-thumb {
        transform: translateX(16px);
    }
}

@media (max-width: 575.98px) {
    .pdb-mobile-page-title {
        display: none;
    }

    .pdb-mobile-actions .pdb-theme-icon {
        display: none;
    }
}

[data-bs-theme="light"] .bg-dark {
    background-color: #ffffff !important;
}

[data-bs-theme="light"] aside.bg-dark {
    background-color: #eef2f6 !important;
}

[data-bs-theme="light"] .navbar-dark,
[data-bs-theme="light"] aside.bg-dark {
    color: var(--bs-body-color);
}

[data-bs-theme="light"] .navbar-dark .navbar-brand,
[data-bs-theme="light"] .navbar-dark .nav-link,
[data-bs-theme="light"] aside .nav-link.text-light {
    color: var(--bs-body-color) !important;
}

[data-bs-theme="light"] aside.bg-dark {
    box-shadow: 0.25rem 0 1rem rgba(0, 0, 0, 0.06);
}

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

[data-bs-theme="light"] .text-secondary {
    color: #5f6b7a !important;
}

[data-bs-theme="light"] .table-dark {
    --bs-table-color: var(--bs-body-color);
    --bs-table-bg: #ffffff;
    --bs-table-border-color: var(--bs-border-color);
    --bs-table-striped-bg: #f8f9fa;
    --bs-table-striped-color: var(--bs-body-color);
    --bs-table-active-bg: #eef2f6;
    --bs-table-active-color: var(--bs-body-color);
    --bs-table-hover-bg: #f1f4f8;
    --bs-table-hover-color: var(--bs-body-color);
}

[data-bs-theme="light"] .pdb-website-card {
    background: #ffffff;
    box-shadow: 0 0.45rem 1.2rem rgba(15, 23, 42, 0.05);
}

[data-bs-theme="light"] .pdb-website-table thead th {
    background: #f8fafc;
    color: #1f2937;
}

[data-bs-theme="light"] .pdb-website-url,
[data-bs-theme="light"] .pdb-website-url:visited,
[data-bs-theme="light"] .pdb-website-card a.link-light:not(.btn),
[data-bs-theme="light"] .pdb-website-card a.link-light:not(.btn):visited {
    color: #000000 !important;
    text-decoration-color: rgba(17, 24, 39, 0.45);
}

[data-bs-theme="light"] .pdb-website-url:hover,
[data-bs-theme="light"] .pdb-website-url:focus,
[data-bs-theme="light"] .pdb-website-card a.link-light:not(.btn):hover,
[data-bs-theme="light"] .pdb-website-card a.link-light:not(.btn):focus {
    color: #000000 !important;
    text-decoration-color: currentColor;
}

[data-bs-theme="dark"] .pdb-website-url {
    color: #9ec5fe;
    text-decoration-color: rgba(158, 197, 254, 0.45);
}

[data-bs-theme="dark"] .pdb-website-url:hover,
[data-bs-theme="dark"] .pdb-website-url:focus {
    color: #cfe2ff;
}

[data-bs-theme="light"] .btn-outline-light {
    --bs-btn-color: var(--bs-body-color);
    --bs-btn-border-color: var(--bs-border-color);
    --bs-btn-hover-color: #ffffff;
    --bs-btn-hover-bg: var(--bs-primary);
    --bs-btn-hover-border-color: var(--bs-primary);
}

[data-bs-theme="light"] .badge.text-bg-dark {
    color: var(--bs-body-color) !important;
    background-color: #f1f4f8 !important;
}

[data-bs-theme="light"] pre.bg-black {
    background-color: #f8f9fa !important;
    color: var(--bs-body-color) !important;
    border: 1px solid var(--bs-border-color);
}
