:root {
    --primary-color: #3270fa;
    --secondary-color: #000;
}
html,
body,
#abox,
#err_msg {
    height: 100%;
}
body {
    font-family: "Noto Sans", "Arial", sans-serif;
    color: #333;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background-color: #ffffff;
    background-size: 10px 10px;
    background-image: repeating-linear-gradient(
        45deg,
        rgba(237, 237, 237, 0.65) 0,
        rgba(237, 237, 237, 0.65) 1px,
        #ffffff 0,
        #ffffff 50%
    );
}

.hide {
    display: none !important;
}

.enkuesta-container {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.q-container {
    position: absolute;
    padding: 2rem;
    box-sizing: border-box;
    animation: slide-in 0.5s ease-in-out;
    width: 100%;
    max-width: 1024px;
    text-align: center;
}

.q-container.slide-out {
    animation: slide-out 0.5s ease-in-out;
    animation-fill-mode: forwards;
}

@keyframes pop {
    from {
        opacity: 0;
        transform: scale(0.75);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
@keyframes slide-in {
    from {
        opacity: 0;
        transform: translateY(200px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slide-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-200px);
    }
}

#logo {
    background-image: url("../img/factcere_logo.webp");
    background-repeat: no-repeat;
    background-size: contain;
    width: 150px;
    height: 67px;
    position: fixed;
    top: 15px;
    right: 15px;
}

#loader {
    width: 32px;
    height: 32px;
    border: 5px solid #fff;
    border-bottom-color: #3270fa;
    border-radius: 50%;
    display: block;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

#err_msg {
    font-size: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
}

@keyframes rotation {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* RADIO INPUT, CHECKBOX INPUT */
.radio-input,
.checkbox-input {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    font-size: 1.3rem;
}

.q-container[dir="rtl"] .radio-input {
    /* This is a hack to make flex item keep its direction if it has dir=rtl attribute  */
    flex-direction: row-reverse;
}

.radio-input-item,
.checkbox-input-item {
    padding: 1.5rem;
    border: 1px solid #ccc;
    border-radius: 9px;
    cursor: pointer;
}

.radio-input-item:hover,
.checkbox-input-item:hover {
    background-color: #fafafa;
    box-shadow: rgba(33, 35, 38, 0.1) 0px 10px 10px -10px;
}

.radio-input-item.selected,
.checkbox-input-item.selected {
    background-color: #3270fa;
    color: #fff;
    animation: blink 0.25s linear;
}

.radio-input-item.item-img img {
    width: 70px;
    height: 70px;
    filter: grayscale(100%);
}

.radio-input-item.item-img.selected img,
.radio-input-item.item-img:hover img {
    filter: grayscale(0%);
}

@keyframes blink {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

/* TEXT, DROP-LIST, DATE */
.text-input, .drop-list, .date-input {
    font-size: 2rem;
    width: 100%;
    border-top: none;
    border-left: none;
    border-right: none;
    border-bottom: 2px solid #86b7fe ;
    padding: 0.55rem 0.25rem;
    box-sizing: border-box;
    background-color: transparent;
}

.text-input:focus, .drop-list:focus, .date-input:focus {
    outline: none;
    border-bottom-color: var(--primary-color);
}

.text-input.invalid {
    border-bottom-color: #ef233c;
    animation: blink-border-bottom 0.25s linear;
}

@keyframes blink-border-bottom {
    0% {
        border-bottom-color: #ef233c;
    }
    50% {
        border-bottom-color: #86b7fe;
    }
    100% {
        border-bottom-color: #ef233c;
    }
}

/* DROP-LIST */
.drop-list:not([multiple]) {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    appearance: none;
}

.drop-list.selected {
    animation: droplist-blink 0.25s linear;
}

@keyframes droplist-blink {
    0% {
        opacity: 0;
    }
    50% {
        opacity: 1;
        background-color: #86b7fe;
    }
    100% {
        opacity: 0;
    }
}

/* DATE */
.date {
    display: flex;
    gap: 1rem;
}

/* NEXT, SUBMIT, AND SKIP BUTTONS */
.btn_container {
    display: flex;
    justify-content: center;
    gap: 1rem;
}
button.next_step {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid #ccc;
    border-radius: 9px;
    margin-top: 1rem;
    background-color: #000;
    color: #fff;
    cursor: pointer;
}

button.next_step:hover {
    background-color: #2c2c2c;
}

button.next_step:active {
    transform: translate(1px, 1px)
}

button.next_step:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background-color: #000;
}

button.skip_step {
    appearance: none;
    font-size: 1.3rem;
    margin-top: 1rem;
    background-color: transparent;
    color: #3270fa;
    border: none;
    cursor: pointer;
}

button.skip_step:hover {
    color: #175df3;
    text-decoration: underline;
}

/* VALIDATION MESSAGE */
.question_invalid {
    font-size: 0.85rem;
    color: red;
    margin-top: 1rem;
    animation: blink 0.25s linear;
}

.performancelabel{
    font-size: 0.8rem;
    text-align: left;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}
.featurefail{
    color: red;
    font-weight: bold;
}
.featurepass{
    color: green;
}

@media screen and (max-width: 768px) {
    #abox,
    #err_msg {
        font-size: 1.5rem;
    }
    .q-container {
        margin-left: 0;
    }
    .question_title, .text-input, .drop-list, .date-input {
        font-size: 1.25rem;
    }
    button.next_step {
        font-size: 1.25rem;
    }
}

@media screen and (max-width: 576px) {
    .radio-input-item {
        padding: 1rem;
    }
    .radio-input-item.item-img img {
        width: 50px;
        height: 50px;
    }
}