@import "_variables.css";

.self-assessment-page {
    .main-container {
        margin: 0;
        flex: none;
    }
}

.quiz-component {
    background-image: url("/site/assets/images/contact-bg.png");
    background-size: cover;
    width: 100%;
    height: 100vh;
    overflow-y: auto;

    .uk-svg {
        fill: transparent !important;
    }

    .quiz-component__content {
        border-radius: 1.231rem;
        background: rgba(0, 0, 0, 0.4);
        border: 0.231rem solid rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(6.662rem);

        .uk-card-header,
        .uk-card-footer {
            padding: 1.538rem;
        }

        .uk-card-body {
            gap: 1.538rem;
        }
    }

    .quiz-component__content-image {
        width: 17.231rem;
        height: 14.846rem;

        .quiz-logo {
            width: 8.154rem;
            margin-top: 0.769rem;
            margin-left: 4.231rem;
            position: absolute;
        }
    }

    .quiz-component__content-icon-title {
        gap: 1.538rem;
    }

    .quiz-component__content-sub-title {
        font-weight: 500;
        font-size: 1.538rem;
        line-height: 2.154rem;
        text-align: center;
        vertical-align: middle;
        color: rgba(255, 255, 255, 1);
    }

    .button-rounded {
        padding: 0.262rem 1.538rem;
    }

    .step-progress {
        border-radius: 0.769rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .steps {
        display: flex;
        gap: 0.308rem;
        flex-grow: 1;
    }

    .step {
        width: 100%;
        height: 0.308rem;
        border-radius: 0.923rem;
        background-color: #e0e0e0;
    }

    .step.completed {
        background-color: rgba(239, 68, 68, 1);
    }

    .step-count {
        font-size: 1.077rem;
        color: rgba(107, 114, 128, 1);
        margin-left: 0.769rem;
        white-space: nowrap;
    }


    .quiz-choice-content {
        background: #ffffff;

        .uk-card-footer {
            .button-rounded {
                display: flex;
                padding: 0.385rem 1.538rem;

                &:not(.uk-disabled) {
                    background: var(--primary-color);
                    color: var(--text-white);
                }

                &:first-child {
                    flex-direction: row-reverse;
                }
            }
        }

        .quiz-choice-body {
            &.--active {
                display: flex;
                flex-direction: column;
                align-items: center;
                justify-content: center;
                gap: 1.916rem;
            }

            .quiz-choice-hint {
                font-weight: 500;
                font-size: 1.077rem;
                line-height: 1.538rem;
                vertical-align: middle;
                color: rgba(107, 114, 128, 1);
            }

            .quiz-choice-question {
                font-weight: 500;
                font-size: 2.308rem;
                line-height: 2.769rem;
                vertical-align: middle;
                color: rgba(0, 0, 0, 1);
                text-align: center;
            }

            .form-container {
                width: 100%;
                line-height: 1.077rem;
                vertical-align: middle;
                color: rgba(0, 0, 0, 1);
            }

            .quiz-choice-form .uk-form-label {
                color: rgba(255, 255, 255, 1);
                font-size: var(--font-size-16);
                font-weight: var(--font-semi-bold);
                opacity: 0.9;
                margin-bottom: 0.308rem;
                display: inline-block;
            }

            .quiz-choice-form .text-input .uk-input {
                border-radius: var(--border-radius-12);
                background: rgba(255, 255, 255, 0.1);
                font-size: var(--font-size-14);
                height: 3.385rem;
                color: rgba(156, 163, 175, 1);
            }

            .quiz-choice-form .uk-form-controls .uk-textarea {
                border-radius: var(--border-radius-12);
                color: rgba(156, 163, 175, 1);
                font-size: var(--font-size-14);
            }

            .quiz-choice-body__answer {
                max-height: calc(100vh - 40.462rem);
                overflow-y: auto;
                gap: 1.231rem
            }

            .answer-item {
                display: flex;
                justify-content: space-between;
                align-items: center;
                border: 1px solid #ccc;
                margin-bottom: 0.375rem;
                border-radius: 9999px;
                width: 31.25rem;
                padding: 0.769rem 2.462rem;
                background: rgba(254, 242, 242, 1);
                color: rgba(31, 41, 55, 1);
                line-height: 1.5;
                gap: 10.385rem;
            }

            .answer-item.focused {
                outline: 2px solid #1e87f0;
                background-color: #f0f8ff;
            }

            .answer-item button:disabled {
                opacity: 0.5;
                cursor: not-allowed;
                pointer-events: none;
            }

            .sort-buttons {
                display: flex;
                gap: 4px;
            }

            .sort-buttons button {
                padding: 4px 6px;
                font-size: 14px;
                cursor: pointer;
                line-height: 1;
            }

            .answer-pool {
                display: flex;
                flex-wrap: wrap;
                gap: 0.5rem;
                padding: 0.5rem;
                border: 1px dashed #ccc;
                border-radius: 6px;
            }

            .answer-pool .answer-pool-item {
                display: inline-block;
                background: #f1f1f1;
                border: 1px solid #ddd;
                border-radius: 16px;
                padding: 0.3rem 0.8rem;
                cursor: pointer;
                font-size: 0.9rem;
                user-select: none;
                transition: background 0.2s, transform 0.1s;
            }

            .answer-pool .answer-pool-item:hover {
                background: #e0e0e0;
            }

            .answer-pool .answer-pool-item:focus {
                outline: 2px solid #0077ff;
                outline-offset: 2px;
                background: #e6f2ff;
            }

            .answer-button {
                padding: 0.769rem 2.462rem;
                background: rgba(254, 242, 242, 1);
                color: rgba(31, 41, 55, 1);
                line-height: 1.5;
                gap: 10.385rem;

                .answer-button__content {
                    flex: 1 1;
                }

                .uk-checkbox {
                    width: 1.231rem;
                    height: 1.231rem;
                    border-radius: 0.308rem;
                    border-width: 0.077rem;

                }

                &.active {
                    border: 0.154rem solid rgba(220, 38, 38, 1);
                    color: rgba(220, 38, 38, 1);

                    .uk-checkbox:checked {
                        color: #ffffff;
                        border: 0.077rem solid rgba(239, 68, 68, 1);
                        background-color: rgba(239, 68, 68, 1);
                    }
                }
            }

            .answer-text,
            .comment-text {
                border-radius: 0.615rem;
                padding: 1.154rem 0.923rem;
                resize: none;
                font-size: 1.077rem;
            }
        }
    }

    .input-send-result {
        border-radius: 0.923rem;
        padding: 1.385rem 0.923rem;
        backdrop-filter: blur(2.462rem);
        background-color: rgba(255, 255, 255, 0.1);
        gap: 0.615rem;
        height: 4.385rem;
        color: rgba(156, 163, 175, 1);

        &:not(.uk-form-danger) {
            color: rgba(156, 163, 175, 1);
            border: 0.077rem solid rgba(255, 255, 255, 0.2);
        }
    }

    .uk-form-icon {
        color: rgba(156, 163, 175, 1);

        svg,
        path {
            fill: rgba(156, 163, 175, 1) !important;
        }
    }

    .custome-completed {
        display: none !important;
    }

    .positionLbl {
        text-align: left !important;
        display: block;
        width: 100%;
        align-self: flex-start !important;
        font-weight: 500;
        font-size: 1rem;
        line-height: 1.4286rem;
        letter-spacing: 0%;
        color: #374151;
    }

    #position-input.uk-input {
        height: 2.5rem;
        border-radius: 0.75rem;
        border: 1px solid #D1D5DB;
        background: #fff;
        font-size: 1rem;
        color: #374151;
        padding: 0 1rem;
        margin-bottom: 1rem;
        box-sizing: border-box;
        outline: none;
        transition: border-color 0.2s;
    }

    #position-input.uk-input:focus {
        border-color: #6366F1;
        background: #fff;
    }

    #position-tags {
        display: flex;
        flex-wrap: wrap;
        gap: 1rem;
        margin-top: 1.142rem;
        align-items: flex-start;
        justify-content: flex-start;
        margin-top: 0.25rem;
    }

    .position-tag {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 9999px;
        padding: 0.5rem 1.25rem;
        background: var(--Default-red-50, #FEF2F2);
        border: none;
        font-family: 'DM Sans', sans-serif;
        font-weight: 500;
        font-size: 1rem;
        line-height: 1.4286rem;
        letter-spacing: 0%;
        color: #374151;
        cursor: pointer;
        transition: background 0.2s, color 0.2s;
        margin: 0;
        white-space: nowrap;
    }

    .position-tag:hover,
    .position-tag:focus {
        background: #fde4e4;
        color: #b91c1c;
    }

    .position-tag.disabled {
        opacity: 0.5;
        pointer-events: none;
    }

    .clear-input {
        position: absolute;
        top: 35%;
        right: 0.5rem;
        transform: translateY(-50%);
        display: none;
        background: none;
        border: none;
        font-size: 1rem;
        color: #374151;
        line-height: 1;
        padding: 0;
        margin: 0;
        width: 1.5rem;
        height: 1.5rem;
        cursor: pointer;
    }

    .star-icon {
        cursor: pointer;
        transition: fill 0.2s, stroke 0.2s;
    }

    .star-icon path {
        fill: #fff;
        stroke: #ccc;
        stroke-width: 2;
    }

    .star-icon.active path {
        fill: gold;
        stroke: #d4af37;
    }

    .quiz-error-message {
        background-color: #fef2f2;
        border-left: 4px solid #f87171;
        padding: 6px 10px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: flex-start;
        margin-top: 8px;
        margin-left: 0 !important;
    }
}

@media (max-height: 500px) {
    .quiz-component {
        height: auto;

        .quiz-choice-content {
            .quiz-choice-body {
                .quiz-choice-body__answer {
                    max-height: unset;
                }
            }
        }
    }
}