/* =========================================================
   CUSTOM QUESTION EDIT
   ========================================================= */

.custom-question-edit-page {
    width: 100%;
    max-width: 1100px;

    margin: 0 auto;

    padding: 5px 0 45px;
}


/* =========================================================
   BACK
   ========================================================= */

.custom-question-edit-topbar {
    margin-bottom: 13px;
}


.custom-question-edit-back {
    display: inline-flex;
    align-items: center;

    gap: 8px;

    color: #55728e;

    text-decoration: none;

    font-size: 11px;
    font-weight: 700;
}


.custom-question-edit-back:hover {
    color: #1769aa;
}


.custom-question-edit-back span {
    width: 28px;
    height: 28px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 8px;

    color: #1769aa;

    background: #eaf5ff;

    font-size: 15px;
}


/* =========================================================
   HEADER
   ========================================================= */

.custom-question-edit-header {
    position: relative;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 27px 30px;

    margin-bottom: 17px;

    overflow: hidden;

    border-radius: 18px;

    background:
        linear-gradient(
            120deg,
            #081e3a,
            #0d467b,
            #176eae
        );

    box-shadow:
        0 12px 30px rgba(12,63,105,.15);
}


.custom-question-edit-header::after {
    content: "";

    position: absolute;

    width: 210px;
    height: 210px;

    right: -70px;
    top: -120px;

    border-radius: 50%;

    background: rgba(255,255,255,.07);
}


.custom-question-edit-header > div:first-child {
    position: relative;

    z-index: 2;
}


.custom-question-edit-eyebrow {
    display: block;

    margin-bottom: 7px;

    color: #75caff;

    font-size: 9px;
    font-weight: 850;

    letter-spacing: 1.4px;
}


.custom-question-edit-header h1 {
    margin: 0 0 5px;

    color: #fff;

    font-size: 25px;
}


.custom-question-edit-header p {
    margin: 0;

    color: rgba(255,255,255,.72);

    font-size: 11px;
}


.custom-question-edit-id {
    position: relative;

    z-index: 2;

    padding: 9px 12px;

    border-radius: 8px;

    color: #1f6fa9;

    background: #fff;

    font-size: 10px;
    font-weight: 800;
}


/* =========================================================
   ERROR
   ========================================================= */

.custom-question-edit-errors {
    display: flex;
    align-items: flex-start;

    gap: 11px;

    padding: 14px;

    margin-bottom: 17px;

    border: 1px solid #ffd4d4;

    border-radius: 10px;

    color: #963535;

    background: #fff1f1;
}


.errors-icon {
    width: 30px;
    height: 30px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 8px;

    background: #ffe0e0;

    font-size: 11px;
    font-weight: 800;
}


.custom-question-edit-errors strong {
    display: block;

    margin-bottom: 5px;

    font-size: 10px;
}


.custom-question-edit-errors ul {
    margin: 0;

    padding-left: 16px;
}


.custom-question-edit-errors li {
    margin-bottom: 3px;

    font-size: 9px;
}


/* =========================================================
   MAIN CARD
   ========================================================= */

.custom-question-edit-card {
    overflow: hidden;

    border: 1px solid #e1e8ef;

    border-radius: 17px;

    background: #fff;

    box-shadow:
        0 7px 23px rgba(25,55,85,.055);
}


/* =========================================================
   SECTION
   ========================================================= */

.custom-question-edit-section {
    padding: 24px 26px;

    border-bottom: 1px solid #e8edf2;
}


.custom-question-edit-section-title {
    display: flex;
    align-items: center;

    gap: 11px;

    margin-bottom: 20px;
}


.section-number {
    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 10px;

    font-size: 9px;
    font-weight: 850;
}


.section-number.blue {
    color: #176da9;

    background: #e7f4ff;
}


.section-number.purple {
    color: #7151c5;

    background: #eee8ff;
}


.section-number.green {
    color: #16805b;

    background: #e4f8ef;
}


.custom-question-edit-section-title strong {
    display: block;

    margin-bottom: 3px;

    color: #29445f;

    font-size: 12px;
}


.custom-question-edit-section-title span {
    display: block;

    color: #8d99a7;

    font-size: 9px;
}


/* =========================================================
   FIELD
   ========================================================= */

.custom-question-edit-field {
    margin-bottom: 0;
}


.custom-question-edit-field > label {
    display: block;

    margin-bottom: 8px;

    color: #29445f;

    font-size: 10px;
    font-weight: 750;
}


.custom-question-edit-field > label span {
    color: #d84c4c;
}


.custom-question-edit-field textarea,
.custom-question-edit-field select {
    width: 100%;

    box-sizing: border-box;

    border: 1px solid #dce5ed;

    border-radius: 10px;

    outline: none;

    color: #263f59;

    background: #fbfdff;

    font-family: inherit;

    font-size: 11px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease,
        background .2s ease;
}


.custom-question-edit-field textarea {
    min-height: 135px;

    padding: 13px 14px;

    resize: vertical;

    line-height: 1.6;
}


.custom-question-edit-field select {
    height: 43px;

    padding: 0 12px;

    cursor: pointer;
}


.custom-question-edit-field textarea:focus,
.custom-question-edit-field select:focus {
    border-color: #4c9bd0;

    background: #fff;

    box-shadow:
        0 0 0 3px rgba(44,137,196,.10);
}


.field-help {
    margin-top: 5px;

    color: #9aa6b4;

    font-size: 8px;
}


/* =========================================================
   TWO COLUMN
   ========================================================= */

.custom-question-edit-two-column {
    display: grid;

    grid-template-columns:
        minmax(0, .8fr)
        minmax(0, 1.2fr);

    gap: 18px;
}


/* =========================================================
   STATUS
   ========================================================= */

.custom-question-status-options {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0,1fr));

    gap: 9px;
}


.status-option {
    position: relative;

    display: flex;
    align-items: center;

    gap: 9px;

    min-height: 55px;

    padding: 9px 10px;

    border: 1px solid #e1e8ef;

    border-radius: 10px;

    cursor: pointer;

    background: #fff;

    transition: .2s ease;
}


.status-option:hover {
    background: #fbfdff;
}


.status-option input {
    position: absolute;

    opacity: 0;
}


.status-option.selected.status-active {
    border-color: #9bd9bf;

    background: #f2fcf7;
}


.status-option.selected.status-inactive {
    border-color: #f0c98e;

    background: #fffaf1;
}


.status-option-icon {
    width: 31px;
    height: 31px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 8px;

    font-size: 12px;
    font-weight: 800;
}


.status-active .status-option-icon {
    color: #16815b;

    background: #e3f8ee;
}


.status-inactive .status-option-icon {
    color: #b26d19;

    background: #fff0da;
}


.status-option-content {
    display: flex;
    flex-direction: column;
}


.status-option-content strong {
    color: #29445e;

    font-size: 10px;
}


.status-option-content small {
    margin-top: 2px;

    color: #909dab;

    font-size: 8px;
}


/* =========================================================
   OPTIONS EDITOR
   ========================================================= */

.custom-question-options-editor {
    display: flex;
    flex-direction: column;

    gap: 8px;
}


.custom-question-option-editor {
    display: grid;

    grid-template-columns: 40px minmax(0,1fr) 110px 30px;

    align-items: end;

    gap: 10px;

    padding: 11px;

    border: 1px solid #e3eaf1;

    border-radius: 11px;

    background:
        linear-gradient(
            90deg,
            #fbfdff,
            #fff
        );

    transition: .2s ease;
}


.custom-question-option-editor:hover {
    border-color: #d4e3ef;

    box-shadow:
        0 4px 14px rgba(25,55,85,.045);
}


/* =========================================================
   OPTION COLORS
   ========================================================= */

.editor-option-0 .editor-option-label {
    color: #176da9;
    background: #e5f3ff;
}


.editor-option-1 .editor-option-label {
    color: #7151c5;
    background: #eee8ff;
}


.editor-option-2 .editor-option-label {
    color: #16805b;
    background: #e4f8ef;
}


.editor-option-3 .editor-option-label {
    color: #c27318;
    background: #fff0dc;
}


.editor-option-4 .editor-option-label {
    color: #c24e78;
    background: #ffedf4;
}


.editor-option-label {
    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    font-size: 12px;
    font-weight: 850;
}


.editor-option-main,
.editor-option-score {
    min-width: 0;
}


.editor-option-main label,
.editor-option-score label {
    display: block;

    margin-bottom: 5px;

    color: #82909f;

    font-size: 8px;
    font-weight: 750;
}


.editor-option-main input,
.editor-option-score input {
    width: 100%;

    height: 39px;

    box-sizing: border-box;

    padding: 0 10px;

    border: 1px solid #dce5ed;

    border-radius: 8px;

    outline: none;

    color: #29435e;

    background: #fff;

    font-family: inherit;

    font-size: 10px;

    transition: .2s ease;
}


.editor-option-main input:focus,
.editor-option-score input:focus {
    border-color: #4c9bd0;

    box-shadow:
        0 0 0 3px rgba(44,137,196,.09);
}


.remove-option-button {
    width: 30px;
    height: 39px;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #f1d6d6;

    border-radius: 8px;

    color: #b84d4d;

    background: #fff5f5;

    cursor: pointer;

    font-family: inherit;

    font-size: 16px;

    transition: .18s ease;
}


.remove-option-button:hover {
    color: #fff;

    background: #c95b5b;

    border-color: #c95b5b;
}


/* =========================================================
   OPTIONS FOOTER
   ========================================================= */

.custom-question-options-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 12px;

    margin-top: 10px;
}


.add-option-button {
    min-height: 35px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 12px;

    border: 1px solid #cfe3f2;

    border-radius: 8px;

    color: #176ca9;

    background: #edf7ff;

    cursor: pointer;

    font-family: inherit;

    font-size: 9px;
    font-weight: 750;

    transition: .18s ease;
}


.add-option-button:hover {
    color: #fff;

    background: #237bb7;

    border-color: #237bb7;
}


.add-option-button.disabled,
.add-option-button:disabled {
    cursor: not-allowed;

    color: #9aa6b2;

    background: #f2f4f6;

    border-color: #e2e6ea;
}


.add-option-button span {
    font-size: 15px;
    line-height: 1;
}


.option-limit-text {
    color: #8e9aa7;

    font-size: 8px;
}


/* =========================================================
   INFO
   ========================================================= */

.custom-question-edit-info {
    display: flex;
    align-items: flex-start;

    gap: 11px;

    margin: 20px 26px 0;

    padding: 13px;

    border: 1px solid #d9eafa;

    border-radius: 10px;

    background: #f3f9ff;
}


.custom-question-edit-info .info-icon {
    width: 29px;
    height: 29px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 8px;

    color: #2473ac;

    background: #dfefff;

    font-size: 11px;
    font-weight: 800;
}


.custom-question-edit-info strong {
    display: block;

    margin-bottom: 3px;

    color: #28516f;

    font-size: 10px;
}


.custom-question-edit-info p {
    margin: 0;

    color: #71889d;

    font-size: 9px;

    line-height: 1.6;
}


/* =========================================================
   ACTIONS
   ========================================================= */

.custom-question-edit-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;

    gap: 9px;

    padding: 22px 26px 25px;

    margin-top: 22px;

    border-top: 1px solid #e8edf2;
}


.custom-question-edit-cancel {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 15px;

    border-radius: 9px;

    color: #65798d;

    background: #f1f4f7;

    text-decoration: none;

    font-size: 10px;
    font-weight: 700;
}


.custom-question-edit-cancel:hover {
    color: #41576c;

    background: #e7ebef;
}


.custom-question-edit-submit {
    min-height: 40px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 0 17px;

    border: 0;

    border-radius: 9px;

    color: #fff;

    background:
        linear-gradient(
            135deg,
            #1769aa,
            #287fb9
        );

    cursor: pointer;

    font-family: inherit;

    font-size: 10px;
    font-weight: 750;

    box-shadow:
        0 6px 16px rgba(23,105,170,.18);

    transition: .2s ease;
}


.custom-question-edit-submit:hover {
    transform: translateY(-1px);

    box-shadow:
        0 9px 21px rgba(23,105,170,.25);
}


/* =========================================================
   ALERT
   ========================================================= */

.custom-question-edit-alert {
    display: flex;
    align-items: center;

    gap: 12px;

    padding: 17px;

    border-radius: 12px;
}


.custom-question-edit-alert.error {
    color: #963434;

    background: #fff0f0;

    border: 1px solid #ffd6d6;
}


.custom-question-edit-alert .alert-icon {
    width: 38px;
    height: 38px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 10px;

    background: #ffe0e0;

    font-weight: 800;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 800px) {

    .custom-question-edit-two-column {
        grid-template-columns: 1fr;
    }


    .custom-question-option-editor {
        grid-template-columns:
            40px minmax(0,1fr) 90px 30px;
    }

}


@media (max-width: 600px) {

    .custom-question-edit-header {
        align-items: flex-start;

        flex-direction: column;

        padding: 22px;
    }


    .custom-question-edit-id {
        width: 100%;

        box-sizing: border-box;

        text-align: center;
    }


    .custom-question-edit-section {
        padding: 20px;
    }


    .custom-question-option-editor {
        grid-template-columns:
            38px minmax(0,1fr) 30px;
    }


    .editor-option-score {
        grid-column: 2 / 3;
    }


    .remove-option-button {
        grid-column: 3;

        grid-row: 1;
    }


    .custom-question-options-footer {
        align-items: flex-start;

        flex-direction: column;
    }


    .custom-question-edit-info {
        margin-left: 20px;
        margin-right: 20px;
    }


    .custom-question-edit-actions {
        padding-left: 20px;
        padding-right: 20px;

        flex-direction: column-reverse;
    }


    .custom-question-edit-cancel,
    .custom-question-edit-submit {
        width: 100%;
    }

}