/****************** User custom CSS ***************************************
In this file you can add your own custom CSS to change the appearance of your survey theme.
*******************************************************************************/

@import url('https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:ital,wght@0,400;0,700;1,400;1,700&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

body.font-noto, body {
    font-family: 'Atkinson Hyperlegible', Arial, sans-serif;
    font-size: 18px;
}

pre, code, kbd, samp {
    font-family: 'IBM Plex Mono', 'Courier New', monospace;
    font-size: 16px;
}

pre {
  padding: 1rem;
}

li.radio-item, li.checkbox-item, li.radio-text-item, li.checkbox-text-item {
    margin-bottom: 0;
}

.text-primary {
    color: #c8e0ff !important;
}

.card {
    background-color: rgb(var(--bs-dark-rgb));
}

.bg-light {
  background-color: rgba(var(--bs-dark-rgb), var(--bs-bg-opacity)) !important;
}

.navbar-light .navbar-nav .nav-link {
  color: #ccc;
}

/****************** Xcode Dark color scheme ***************************************
Palette lifted from Xcode's default dark theme / macOS dark-mode system colors.
*******************************************************************************/

:root {
    color-scheme: dark;
    --xc-bg: #1e1e1e;
    --xc-bg-elevated: #262626;
    --xc-bg-elevated-hover: #2f2f31;
    --xc-bg-inset: #161616;
    --xc-border: #3c3c3e;
    --xc-text: #e5e5e5;
    --xc-text-muted: #9a9a9c;
    --xc-accent: #0a84ff;
    --xc-accent-hover: #409cff;
    --xc-danger: #ff453a;
    --xc-warning: #ffd60a;
}

html, body {
    background-color: var(--xc-bg);
    color: var(--xc-text);
}

a {
    color: var(--xc-accent);
}
a:hover {
    color: var(--xc-accent-hover);
}

/* Progress bar */
.progress {
    background-color: var(--xc-bg-elevated);
}
.progress-bar {
    background-color: var(--xc-accent);
}

/* Question card */
.question-container {
    background-color: var(--xc-bg-elevated);
    border: 1px solid var(--xc-border);
    border-radius: 8px;
}
.ls-label-question, .question-text, .question-text p {
    color: var(--xc-text);
}

/* Code blocks: dark inset panel, distinct from the question card background */
pre, code, kbd, samp {
    background-color: var(--xc-bg-inset);
    color: var(--xc-text);
}
pre {
    border: 1px solid var(--xc-border);
    border-radius: 4px;
}
code {
    padding: 0.1em 0.35em;
}
pre code {
    border: none;
    padding: 0;
}

/* Answer options (radio/checkbox list) */
li.radio-item label.radio-label,
li.checkbox-item label.checkbox-label,
.list-group-item {
    background-color: var(--xc-bg-elevated);
    color: var(--xc-text);
}
li.radio-item label.radio-label:hover,
li.checkbox-item label.checkbox-label:hover,
.list-group-item:hover {
    background-color: var(--xc-bg-elevated-hover);
}
input[type="radio"], input[type="checkbox"] {
    accent-color: var(--xc-accent);
}

/* Bootstrap-buttons style (confidence sub-question) */
.list-group-item.active {
    background-color: var(--xc-accent);
    border-color: var(--xc-accent);
    color: #ffffff;
}

/* Text inputs, selects */
.form-control, select, textarea {
    background-color: var(--xc-bg-elevated);
    color: var(--xc-text);
    border: 1px solid var(--xc-border);
}
.form-control:focus {
    background-color: var(--xc-bg-elevated);
    color: var(--xc-text);
    border-color: var(--xc-accent);
    box-shadow: 0 0 0 0.2rem rgba(10, 132, 255, 0.25);
}

/* Buttons */
.btn-primary {
    background-color: var(--xc-accent);
    border-color: var(--xc-accent);
}
.btn-primary:hover {
    background-color: var(--xc-accent-hover);
    border-color: var(--xc-accent-hover);
}
.btn-outline-secondary {
    color: var(--xc-text);
    border-color: var(--xc-border);
}
.btn-outline-secondary:hover {
    background-color: var(--xc-bg-elevated-hover);
    color: var(--xc-text);
}

/* Alerts */
.alert-warning {
    background-color: rgba(255, 214, 10, 0.12);
    border-color: rgba(255, 214, 10, 0.4);
    color: var(--xc-warning);
}
.alert-danger, .errormandatory {
    background-color: rgba(255, 69, 58, 0.12);
    border-color: rgba(255, 69, 58, 0.4);
    color: var(--xc-danger);
}

/****************** Pygments syntax highlighting (Dracula) ***************************************
Generated via: HtmlFormatter(style='dracula').get_style_defs('pre code'), with the formatter's own
`pre code { background: ... }` rule dropped so the existing --xc-bg-inset background above still
applies -- only token foreground colors come from Dracula here.
*******************************************************************************/

pre { line-height: 150%; }
td.linenos .normal { color: #f1fa8c; background-color: #44475a; padding-left: 5px; padding-right: 5px; }
span.linenos { color: #f1fa8c; background-color: #44475a; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #50fa7b; background-color: #6272a4; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #50fa7b; background-color: #6272a4; padding-left: 5px; padding-right: 5px; }
pre code .hll { background-color: #44475a }
pre code .c { color: #6272A4 } /* Comment */
pre code .err { color: #F8F8F2 } /* Error */
pre code .g { color: #F8F8F2 } /* Generic */
pre code .k { color: #FF79C6 } /* Keyword */
pre code .l { color: #F8F8F2 } /* Literal */
pre code .n { color: #F8F8F2 } /* Name */
pre code .o { color: #FF79C6 } /* Operator */
pre code .x { color: #F8F8F2 } /* Other */
pre code .p { color: #F8F8F2 } /* Punctuation */
pre code .ch { color: #6272A4 } /* Comment.Hashbang */
pre code .cm { color: #6272A4 } /* Comment.Multiline */
pre code .cp { color: #FF79C6 } /* Comment.Preproc */
pre code .cpf { color: #6272A4 } /* Comment.PreprocFile */
pre code .c1 { color: #6272A4 } /* Comment.Single */
pre code .cs { color: #6272A4 } /* Comment.Special */
pre code .gd { color: #8B080B } /* Generic.Deleted */
pre code .ge { color: #F8F8F2; text-decoration: underline } /* Generic.Emph */
pre code .ges { color: #F8F8F2; text-decoration: underline } /* Generic.EmphStrong */
pre code .gr { color: #F8F8F2 } /* Generic.Error */
pre code .gh { color: #F8F8F2; font-weight: bold } /* Generic.Heading */
pre code .gi { color: #F8F8F2; font-weight: bold } /* Generic.Inserted */
pre code .go { color: #44475A } /* Generic.Output */
pre code .gp { color: #F8F8F2 } /* Generic.Prompt */
pre code .gs { color: #F8F8F2 } /* Generic.Strong */
pre code .gu { color: #F8F8F2; font-weight: bold } /* Generic.Subheading */
pre code .gt { color: #F8F8F2 } /* Generic.Traceback */
pre code .kc { color: #FF79C6 } /* Keyword.Constant */
pre code .kd { color: #8BE9FD } /* Keyword.Declaration */
pre code .kn { color: #FF79C6 } /* Keyword.Namespace */
pre code .kp { color: #FF79C6 } /* Keyword.Pseudo */
pre code .kr { color: #FF79C6 } /* Keyword.Reserved */
pre code .kt { color: #8BE9FD } /* Keyword.Type */
pre code .ld { color: #F8F8F2 } /* Literal.Date */
pre code .m { color: #FFB86C } /* Literal.Number */
pre code .s { color: #BD93F9 } /* Literal.String */
pre code .na { color: #50FA7B } /* Name.Attribute */
pre code .nb { color: #8BE9FD } /* Name.Builtin */
pre code .nc { color: #50FA7B } /* Name.Class */
pre code .no { color: #F8F8F2 } /* Name.Constant */
pre code .nd { color: #F8F8F2 } /* Name.Decorator */
pre code .ni { color: #F8F8F2 } /* Name.Entity */
pre code .ne { color: #F8F8F2 } /* Name.Exception */
pre code .nf { color: #50FA7B } /* Name.Function */
pre code .nl { color: #8BE9FD } /* Name.Label */
pre code .nn { color: #F8F8F2 } /* Name.Namespace */
pre code .nx { color: #F8F8F2 } /* Name.Other */
pre code .py { color: #F8F8F2 } /* Name.Property */
pre code .nt { color: #FF79C6 } /* Name.Tag */
pre code .nv { color: #8BE9FD } /* Name.Variable */
pre code .ow { color: #FF79C6 } /* Operator.Word */
pre code .pm { color: #F8F8F2 } /* Punctuation.Marker */
pre code .w { color: #F8F8F2 } /* Text.Whitespace */
pre code .mb { color: #FFB86C } /* Literal.Number.Bin */
pre code .mf { color: #FFB86C } /* Literal.Number.Float */
pre code .mh { color: #FFB86C } /* Literal.Number.Hex */
pre code .mi { color: #FFB86C } /* Literal.Number.Integer */
pre code .mo { color: #FFB86C } /* Literal.Number.Oct */
pre code .sa { color: #BD93F9 } /* Literal.String.Affix */
pre code .sb { color: #BD93F9 } /* Literal.String.Backtick */
pre code .sc { color: #BD93F9 } /* Literal.String.Char */
pre code .dl { color: #BD93F9 } /* Literal.String.Delimiter */
pre code .sd { color: #BD93F9 } /* Literal.String.Doc */
pre code .s2 { color: #BD93F9 } /* Literal.String.Double */
pre code .se { color: #BD93F9 } /* Literal.String.Escape */
pre code .sh { color: #BD93F9 } /* Literal.String.Heredoc */
pre code .si { color: #BD93F9 } /* Literal.String.Interpol */
pre code .sx { color: #BD93F9 } /* Literal.String.Other */
pre code .sr { color: #BD93F9 } /* Literal.String.Regex */
pre code .s1 { color: #BD93F9 } /* Literal.String.Single */
pre code .ss { color: #BD93F9 } /* Literal.String.Symbol */
pre code .bp { color: #F8F8F2 } /* Name.Builtin.Pseudo */
pre code .fm { color: #50FA7B } /* Name.Function.Magic */
pre code .vc { color: #8BE9FD } /* Name.Variable.Class */
pre code .vg { color: #8BE9FD } /* Name.Variable.Global */
pre code .vi { color: #8BE9FD } /* Name.Variable.Instance */
pre code .vm { color: #8BE9FD } /* Name.Variable.Magic */
pre code .il { color: #FFB86C } /* Literal.Number.Integer.Long */

/****************** Modal dialogs (mandatory-question alert, etc.) ***************************************
Bootstrap's default modal is light-themed and unstyled by the rest of this file, making it
illegible against the dark survey chrome (white body text/background left as Bootstrap defaults).
*******************************************************************************/

.modal-content {
    background-color: var(--xc-bg-elevated);
    color: var(--xc-text);
    border: 1px solid var(--xc-border);
}
.modal-header {
    border-bottom: 1px solid var(--xc-border);
}
.modal-footer {
    border-top: 1px solid var(--xc-border);
}
.modal-title, .modal-body {
    color: var(--xc-text);
}
.btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}
