/******************
    SWP custom CSS (shared by all SWP themes)
    -----------------------------------------

    Ported from the LimeSurvey 3 SWP themes to LimeSurvey 7 (Bootstrap 5).
    Brand colours come from css/swp-brand.css of the active theme:
      --swp-primary    main brand colour (navbar, buttons, links)
      --swp-secondary  lighter variant (progress bar, info buttons)
*/

:root {
    --swp-text: #393939;
    --swp-muted: #737373;
    --swp-background: #f1f1f1;
    --swp-error: rgb(239,0,37);
    --swp-success: rgb(122,181,29);
}

/*General*/
body {
    font-size: 16px;
    font-family: "PT Sans", Helvetica, Arial, sans-serif;
    background-color: var(--swp-background);
    line-height: 22px;
    color: var(--swp-text);
    cursor: default;
}

/*Navbar*/
#survey-nav,
#survey-nav.bg-primary,
#survey-nav .navbar-collapse {
    background-color: var(--swp-primary) !important;
    border-bottom: none !important;
}
#survey-nav .navbar-brand,
#survey-nav .nav-link,
#survey-nav .nav-link:hover,
#survey-nav .nav-link:focus {
    background-color: var(--swp-primary);
    color: white;
}
#survey-nav .navbar-toggler {
    border-color: white;
}
#survey-nav .navbar-toggler-icon {
    filter: invert(1);
}
#survey-nav .navbar-brand {
    display: flex;
    align-items: center;
    white-space: normal;
}
#survey-nav .navbar-collapse {
    padding-top: 0 !important;
}
#survey-nav .logo-container img {
    max-height: 40px;
}

.progress-bar {
    background-color: var(--swp-secondary);
}
.container,
.outerframe {
    background-color: white;
    padding: 27px;
    border-radius: 10px;
    margin-bottom: 18px;
    margin-top: 18px;
    position: relative;
}
#main-col {
    margin-top: 0px;
}
.space-col {
    margin-top: 0px;
}
.group-title {
    font-size: 35px;
    line-height: 35px;
    font-weight: bold;
}
h3 {
    font-weight: bold;
    font-size: 20px;
    line-height: 25px;
    margin-bottom: 18px;
    margin-top: 0px;
}
p {
    font-size: 16px;
    font-family: "PT Sans", Helvetica, Arial, sans-serif;
    color: var(--swp-text);
}
/* Bootstrap 5 uses "bolder", LimeSurvey 3 (Bootstrap 3) used "bold" */
b, strong {
    font-weight: bold;
}

select.form-control,
select.form-select {
    border-radius: 22px;
    height: 45px;
    width: 100% !important;
}

/*
Button
*/
button:focus {
    background-color: var(--swp-primary) !important;
    border-color: transparent !important;
}
.btn-primary, .btn-success {
    background-color: var(--swp-primary);
    color: white;
}
.btn-primary,
.btn-default,
.btn-outline-secondary,
.btn-success,
.btn-danger {
    font-weight: bold;
    border-color: transparent;
    width: 100%;
    max-width: 330px;
    height: 45px;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1px 0px 2px 0px;
    border-radius: 22px;
    text-decoration: none;
    cursor: pointer;
}
.btn-danger {
    max-width: 200px;
}
.btn-info {
    border-color: transparent;
    border-radius: 22px;
    height: 45px;
    padding-left: 27px;
    padding-right: 27px;
    background-color: var(--swp-secondary);
    color: white;
}
.btn-primary:hover, .btn-success:hover,
.btn-primary:active, .btn-success:active {
    background-color: var(--swp-primary) !important;
    text-decoration: underline;
    border-color: transparent;
}

.btn-default,
.btn-outline-secondary {
    border: 3px solid var(--swp-primary);
    background-color: white;
    color: var(--swp-primary);
}
.btn-default:hover,
.btn-outline-secondary:hover,
.btn-outline-secondary:active {
    text-decoration: underline;
    background-color: white !important;
    border: 3px solid var(--swp-primary) !important;
    color: var(--swp-primary) !important;
}
.btn-default:focus,
.btn-outline-secondary:focus {
    background-color: white !important;
    border: 3px solid var(--swp-primary) !important;
    color: var(--swp-primary) !important;
}
.btn-info:hover {
    border-color: transparent;
    background-color: var(--swp-secondary);
    text-decoration: underline;
}
.btn-info:focus {
    background-color: var(--swp-secondary) !important;
}
#loadbutton, #savebutton, #register_button {
    background-color: var(--swp-primary);
    text-decoration: none;
    color: white;
}
#loadbutton:hover, #savebutton:hover, #register_button:hover {
    text-decoration: underline;
    border-color: transparent;
}
#loadbutton:focus, #savebutton:focus, #register_button:focus {
    background-color: var(--swp-primary) !important;
    color: white !important;
}

.upload, a.btn {
    line-height: 2.7;
    margin-bottom: 18px;
}

/*
Question Block General
*/
.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}
.question-container {
    background-color: var(--swp-background);
    border-radius: 10px;
    border: none;
    font-size: 16px;
    padding: 18px;
}
.question-title-container {
    font-weight: bold;
    align-items: center;
    cursor: default;
    display: flex;
    padding: 10px 0 10px 0;
    margin-bottom: 0px;
    max-width: 100%;
}
.fa-asterisk {
    color: var(--swp-text);
    font-size: 50%;
    position: absolute;
}
.text-danger.fa-asterisk {
    color: var(--swp-text) !important;
}
.requierd {
    position: static;
    margin-bottom: 22px;
}
.question-help-container, .text-info {
    color: var(--swp-muted) !important;
    display: block;
    font-size: 14px;
    padding-left: 0px;
}
/* LimeSurvey 7 renders the answer tip ("Bitte wählen Sie ...") bold, LimeSurvey 3 did not */
.question-valid-container .text-info {
    font-weight: normal;
}
.ls-questionhelp {
    margin-left: 0px !important;
    margin-top: 16px;
}
.date > .question-help-container > .ls-questionhelp,
.choice-5-pt-radio > .question-help-container > .ls-questionhelp,
.list-radio > .question-help-container > .ls-questionhelp,
.equation > .question-help-container > .ls-questionhelp,
.multiple-opt > .question-help-container > .ls-questionhelp {
    margin-top: 0px;
}
.ls-questionhelp:before {
    display: none;
}
.ls-question-message > .fa {
    display: none;
}
.error {
    color: var(--swp-error);
}
.error > .fa-exclamation-circle {
    display: none;
}

/*Answer General*/
.answer-container {
    padding-left: 0px;
}
.list-unstyled {
    padding-left: 0px;
}
.ls-answers {
    padding-bottom: 0px;
}

/*Radio Items*/
.radio-item label {
    font-weight: bold;
}
/*Text Area*/
.ls-answers > .col-sm-12 {
    padding-left: 0px;
}
textarea {
    border-radius: 10px !important;
    cursor: text;
    flex-basis: 0%;
    flex-direction: column;
    flex-grow: 1;
    flex-shrink: 1;
    font-weight: 400;
    height: 120px;
    overflow-x: auto;
    overflow-y: auto;
    resize: vertical;
    white-space: pre-wrap;
    width: 100%;
}

/*Input*/
input[type='text'], input[type='password'], input[type='email'] {
    border-radius: 22px;
}

.checkbox-item label::after {
    left: 1px;
    top: -2px;
    padding-top: 0;
    padding-left: 0;
    font-size: 14px;
    background-color: transparent;
}

.checkbox-label {
    text-align: left !important;
}

/*Completed*/
.completed-text {
    border: 4px solid var(--swp-success);
    border-radius: 10px;
    padding: 27px;
    background-color: #f1f8e9;
}
a {
    color: var(--swp-primary);
}

/*ERROR*/
.container:has(> #error-card) {
    background-color: transparent;
}
#error-card {
    background: white;
    border-radius: 20px;
    border: 4px solid var(--swp-error);
    padding: 27px;
    font-size: 16px;
}
#error-card > .card-body {
    padding: 0px;
}

/*Register*/
.register-form > .row {
    color: var(--swp-muted);
    display: block;
    font-size: 14px;
    padding-left: 0px;
}

/*Uploader Modal*/
.uploader {
    background-color: white;
}
.uploader-frame {
    height: 220px;
}
.alert {
    border-radius: 20px !important;
}
.alert-success {
    border: 4px solid var(--swp-success);
}
.alert-danger {
    border: 4px solid var(--swp-error);
    background-color: white;
    color: var(--swp-text);
}
.upload-div > button {
    margin-bottom: 25px;
}

/*DatePicker*/
.input-group-text {
    height: 100%;
    padding-left: 12px;
    padding-right: 12px;
}

/*Modal*/
.modal {
    font-size: 14px;
}

/**/
.privacy > .col-sm-12,
.limit-text-window,
.privacy > .col-sm-12 > .row > .col-sm-12 {
    padding-left: 0;
    padding-right: 0;
}

/*Fixed footer (SWP-Energie-Grün, views/subviews/footer/footer.twig)*/
body:has(.swp-footer) {
    padding-bottom: 50px;
}
.swp-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: var(--swp-primary);
    color: white;
    text-align: center;
    padding: 10px 0;
    font-family: Arial, sans-serif;
}
.swp-footer a {
    color: white;
    text-decoration: none;
    margin-left: 10px;
}
.swp-footer a:hover {
    color: white;
    text-decoration: underline;
}

/*Table*/
.uploadedfiles > tbody > tr > .title,
.uploadedfiles > tbody > tr > .comment,
.uploadedfiles > tbody > tr > .edit {
    text-align: left !important;
}
