/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: rgba(51, 65, 85, 0.5);
    /* slate-700 */
    border-radius: 6px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: rgba(51, 65, 85, 0.8);
}

/* Custom Checkbox */
input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: transparent;
    margin: 0;
    font: inherit;
    width: 1rem;
    height: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.5);
    border-radius: 0.25rem;
    display: grid;
    place-content: center;
    transition: all 0.2s ease-in-out;
}

input[type="checkbox"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em white;
    background-color: white;
    transform-origin: bottom left;
    clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}

input[type="checkbox"]:checked {
    border-color: currentColor;
    background-color: currentColor;
}

input[type="checkbox"]:checked::before {
    transform: scale(1);
}

input[type="checkbox"]:focus-visible {
    outline: max(2px, 0.15em) solid currentColor;
    outline-offset: max(2px, 0.15em);
}

/* Toggle Switch */
.toggle-switch input:checked+.slider {
    background-color: #6366f1;
    /* primary */
    border-color: #6366f1;
}

.toggle-switch input:checked+.slider::before {
    transform: translateX(20px);
    background-color: white;
}

/* Specific Toggles */
.toggle-switch input:checked+.slider.gdpr {
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.toggle-switch input:checked+.slider.ccpa {
    background-color: #f97316;
    border-color: #f97316;
}

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

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

/* Markdown Body Styles (GitHub inspired but adapted for modern look) */
.markdown-body {
    font-family: 'Inter', system-ui, sans-serif;
    line-height: 1.6;
}

.markdown-body h1 {
    font-size: 2em;
    font-weight: 800;
    margin-bottom: 0.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
}

.markdown-body h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    padding-bottom: 0.3em;
    border-bottom: 1px solid #e2e8f0;
    color: #1e293b;
}

.markdown-body h3 {
    font-size: 1.25em;
    font-weight: 600;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    color: #334155;
}

.markdown-body p {
    margin-top: 0;
    margin-bottom: 1em;
    color: #475569;
}

.markdown-body ul {
    margin-top: 0;
    margin-bottom: 1em;
    padding-left: 2em;
    list-style-type: disc;
    color: #475569;
}

.markdown-body li+li {
    margin-top: 0.25em;
}

.markdown-body a {
    color: #3b82f6;
    text-decoration: none;
}

.markdown-body a:hover {
    text-decoration: underline;
}

.markdown-body strong {
    font-weight: 600;
    color: #1e293b;
}

/* Dark mode invert hack for the preview panel (we want it to look like a physical document by default, but give an option to match theme) */
/* Un-inverted looks like black text on white bg. We keep it that way for realism, no dark mode invert needed for now. */