/* =========================================================
   PERFORMANCE HEADER
   ========================================================= */

.performance-header label,
.performance-header select,
.performance-header input {
    text-transform: capitalize;
    font-size: 13px;
}
.performance-textbox,
.performance-category input[type="text"] {
    /*text-transform: uppercase;*/
}
/*.performance-textarea {
    text-transform: capitalize;
}*/

/* =========================================================
   PERFORMANCE CATEGORY
   ========================================================= */

.performance-category {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    background: #ffffff;
    border: 1px solid #e4e7eb;
    border-radius: 14px;
    padding: 15px 23px 19px;
    margin-bottom: 16px;
    box-sizing: border-box;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02), 0 8px 20px rgba(0, 0, 0, 0.035);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}


    /* Hover Category */
    .performance-category:hover {
        border-color: #d9dee4;
        box-shadow: 0 3px 8px rgba(0, 0, 0, 0.025), 0 10px 26px rgba(0, 0, 0, 0.045);
    }


/* =========================================================
   CATEGORY TITLE
   ========================================================= */

.performance-category-title {
    position: relative;
    width: 100%;
    margin: 0;
    padding: 10px 16px;
    box-sizing: border-box;
    border-radius: 7px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.4;
    color: #ffffff;
    background: linear-gradient( 105deg, #b80000 0%, #cf0000 35%, #e50000 68%, #ff1717 100% );
    box-shadow: 0 3px 7px rgba(184, 0, 0, 0.14);
    letter-spacing: 0.1px;
    overflow: hidden;
}


    /* subtle highlight */
    .performance-category-title::after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 1px;
        background: rgba(255, 255, 255, 0.25);
        pointer-events: none;
    }


/* =========================================================
   CATEGORY INFO
   ========================================================= */

.performance-category-info {
    margin: 8px 2px 12px;
    font-size: 12px;
    font-weight: 400;
    color: #69727d;
    line-height: 1.5;
}


/* =========================================================
   CATEGORY BUTTONS
   ========================================================= */

.performance-category-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0 0 16px;
}


    /* Button */
    .performance-category-buttons button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        padding: 0;
        border: 1px solid #d8dee5;
        border-radius: 8px;
        background: #ffffff;
        color: #4a5159;
        font-size: 15px;
        font-weight: 400;
        line-height: 1;
        cursor: pointer;
        box-sizing: border-box;
        transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
    }


        /* Button hover */
        .performance-category-buttons button:hover {
            background: #fff7f7;
            border-color: #e0a0a0;
            color: #c00000;
            box-shadow: 0 2px 6px rgba(192, 0, 0, 0.08);
        }


        /* Button active */
        .performance-category-buttons button:active {
            transform: scale(0.94);
            box-shadow: none;
        }


        /* Button disabled */
        .performance-category-buttons button:disabled {
            color: #b9bec4;
            background: #f7f8f9;
            border-color: #e2e5e8;
            cursor: not-allowed;
            opacity: 0.65;
            box-shadow: none;
        }


/* =========================================================
   INSTANCE CONTAINER
   ========================================================= */

.performance-instance-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 20px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}


/* =========================================================
   PERFORMANCE INSTANCE
   ========================================================= */

.performance-instance {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 18px 20px 20px;
    background: #ffffff;
    border: 1px solid #e3e7eb;
    border-radius: 11px;
    overflow: hidden;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, transform 0.15s ease;
}


    /* Instance hover */
    .performance-instance:hover {
        border-color: #d2d8df;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.045);
    }


    /* =========================================================
   SELECTED INSTANCE
   ========================================================= */

    .performance-instance.selected {
        background: #fffafa;
        border-color: #e3a0a0;
        box-shadow: 0 0 0 2px rgba(224, 80, 80, 0.08), 0 5px 14px rgba(180, 0, 0, 0.05);
    }


/* =========================================================
   PERFORMANCE QUESTION
   ========================================================= */

.performance-question {
    display: grid;
    /*
        Desktop

        Number | Question | Response
    */

    grid-template-columns: 0px 100px minmax(0, 1fr);
    column-gap: 8px;
    align-items: start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-bottom: 5px;
    box-sizing: border-box;
    overflow-wrap: anywhere;
    word-break: break-word;
}


    /* =========================================================
   QUESTION WITH TEXTAREA
   ========================================================= */

    .performance-question:has(.performance-textarea) {
        grid-template-columns: 0px minmax(0, 1fr);
        column-gap: 8px;
    }


        /* Question textarea */
        .performance-question:has(.performance-textarea)
        .performance-question-label {
            grid-column: 2;
        }


        /* Textarea below question */
        .performance-question:has(.performance-textarea)
        .performance-question-input {
            grid-column: 2;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            margin-top: -15px !important;
            gap: 0 !important;
        }

.performance-textarea-warning {
    color: #dc3545;
    font-size: 10px;
    line-height: 14px;
    margin: 0 0 2px 0 !important;
    padding: 0 !important;
}

    .performance-textarea-warning + .performance-textarea {
        margin-top: 0 !important;
    }
        /* Textarea */
        .performance-question:has(.performance-textarea)
        .performance-textarea {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
        }


/* =========================================================
   QUESTION NUMBER
   ========================================================= */

.performance-question-sequence {
    width: 100%;
    padding-right: 4px;
    visibility: hidden;
    text-align: right;
    line-height: 24px;
    color: #7b838c;
    font-size: 12px;
    font-weight: 600;
    box-sizing: border-box;
}


/* =========================================================
   QUESTION LABEL
   ========================================================= */

.performance-question-label {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    line-height: 24px;
    color: #343a40;
    font-size: 12px;
    font-weight: 600;
    white-space: break-spaces;
    overflow-wrap: anywhere;
    word-break: break-word;
    box-sizing: border-box;
}


/* =========================================================
   QUESTION INPUT
   ========================================================= */

.performance-question-input {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}


/* =========================================================
   TEXTBOX
   ========================================================= */

.performance-textbox {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    height: 38px;
    padding: 7px 11px;
    box-sizing: border-box;
    border: 1px solid #d8dee5;
    border-radius: 7px;
    background: #ffffff;
    color: #333333;
    font-size: 12px;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}


/* =========================================================
   TEXTAREA
   ========================================================= */

.performance-textarea {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: 80px;
    height: auto;
    padding: 9px 11px;
    box-sizing: border-box;
    border: 1px solid #d8dee5;
    border-radius: 7px;
    background: #ffffff;
    color: #333333;
    font-size: 12px;
    line-height: 1.5;
    outline: none;
    overflow-y: hidden;
    resize: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}


    /* =========================================================
   INPUT HOVER
   ========================================================= */

    .performance-textbox:hover,
    .performance-textarea:hover,
    .performance-category input[type="text"]:hover,
    .performance-category textarea:hover {
        border-color: #bdc5ce;
    }


    /* =========================================================
   INPUT FOCUS
   ========================================================= */

    .performance-textbox:focus,
    .performance-textarea:focus,
    .performance-category input[type="text"]:focus,
    .performance-category textarea:focus {
        border-color: #dc7777;
        background-color: #ffffff;
        box-shadow: 0 0 0 3px rgba(220, 80, 80, 0.10);
    }


/* =========================================================
   GENERAL INPUT
   ========================================================= */

.performance-category input[type="text"],
.performance-category textarea {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    border: 1px solid #d8dee5;
    border-radius: 7px;
    background-color: #ffffff;
    font-size: 12px;
    color: #333333;
    outline: none;
}


/* =========================================================
   OPTIONS
   ========================================================= */

.performance-options {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}


/* =========================================================
   OPTION
   ========================================================= */

.performance-option {
    display: flex;
    align-items: flex-start;
    gap: 7px;
    min-width: 0;
    line-height: 22px;
    color: #454b52;
    font-size: 12px;
    cursor: pointer;
    box-sizing: border-box;
}


    /* =========================================================
   RADIO / CHECKBOX
   ========================================================= */

    .performance-option input[type="radio"],
    .performance-option input[type="checkbox"] {
        width: 15px;
        height: 15px;
        margin: 2px 0 0;
        flex: 0 0 15px;
        cursor: pointer;
        accent-color: #d00000;
    }


/* =========================================================
   MLT / MULTIPLE
   ========================================================= */

.performance-question:has(.performance-options-mlt) {
    grid-template-columns: 5px minmax(0, 1fr);
    column-gap: 0px;
}


    /* MLT question */
    .performance-question:has(.performance-options-mlt)
    .performance-question-label {
        grid-column: 2;
    }


    /* MLT input */
    .performance-question:has(.performance-options-mlt)
    .performance-question-input {
        grid-column: 2;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-top: 4px;
    }


    /* MLT options */
    .performance-question:has(.performance-options-mlt)
    .performance-options-mlt {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }


    /* MLT option */
    .performance-question:has(.performance-options-mlt)
    .performance-option {
        display: flex;
        align-items: flex-start;
        width: 100%;
        min-width: 0;
        gap: 8px;
        margin: 0;
        padding: 3px 0;
        box-sizing: border-box;
        border-radius: 5px;
    }


        /* MLT hover */
        .performance-question:has(.performance-options-mlt)
        .performance-option:hover {
            background: #fff8f8;
        }


        /* MLT checkbox */
        .performance-question:has(.performance-options-mlt)
        .performance-option input[type="checkbox"] {
            width: 15px;
            height: 15px;
            min-width: 15px;
            max-width: 15px;
            margin: 2px 0 0;
            flex-shrink: 0;
        }


        /* MLT text */
        .performance-question:has(.performance-options-mlt)
        .performance-option span {
            flex: 1;
            min-width: 0;
            line-height: 1.5;
            color: #454b52;
            white-space: normal;
            overflow-wrap: break-word;
            word-break: normal;
        }


/* =========================================================
   PERFORMANCE VALIDATION WARNING
   ========================================================= */

.performance-validation-warning {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    text-align: left;
}


/* =========================================================
   VALIDATION TITLE
   ========================================================= */

.performance-validation-title {
    font-size: 20px;
    font-weight: 600;
    color: #2f343b;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 24px;
}


/* =========================================================
   VALIDATION CONTENT
   ========================================================= */

.performance-validation-content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}


/* =========================================================
   VALIDATION CATEGORY
   ========================================================= */

.performance-validation-category {
    width: 100%;
    max-width: 100%;
    margin-bottom: 20px;
    box-sizing: border-box;
}


/* =========================================================
   VALIDATION CATEGORY TITLE
   ========================================================= */

.performance-validation-category-title {
    font-size: 17px;
    font-weight: 600;
    color: #333333;
    line-height: 1.4;
    margin-bottom: 8px;
    padding-bottom: 7px;
    border-bottom: 1px solid #e8ebee;
}


/* =========================================================
   VALIDATION QUESTION LIST
   ========================================================= */

.performance-validation-question-list {
    width: 100%;
    max-width: 100%;
    padding-left: 8px;
    box-sizing: border-box;
}


/* =========================================================
   VALIDATION QUESTION
   ========================================================= */

.performance-validation-question {
    display: flex;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #555555;
    margin-bottom: 4px;
    box-sizing: border-box;
}


/* =========================================================
   VALIDATION NUMBER
   ========================================================= */

.performance-validation-number {
    width: 28px;
    flex: 0 0 28px;
    color: #777777;
    font-weight: 500;
}


/* =========================================================
   VALIDATION QUESTION TEXT
   ========================================================= */

.performance-validation-question-text {
    flex: 1;
    min-width: 0;
    color: #444444;
    overflow-wrap: anywhere;
    word-break: break-word;
}


/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 767px) {

    /* -----------------------------------------------------
       CATEGORY
       ----------------------------------------------------- */

    .performance-category {
        padding: 16px 14px 18px;
        border-radius: 11px;
        margin-bottom: 14px;
    }


    /* -----------------------------------------------------
       CATEGORY TITLE
       ----------------------------------------------------- */

    .performance-category-title {
        padding: 9px 12px;
        font-size: 13px;
        border-radius: 6px;
    }


    /* -----------------------------------------------------
       CATEGORY INFO
       ----------------------------------------------------- */

    .performance-category-info {
        margin-top: 8px;
        margin-bottom: 10px;
        font-size: 12px;
    }

    .performance-options:not(.performance-options-mlt) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 8px;
        row-gap: 4px;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

        .performance-options:not(.performance-options-mlt)
        .performance-option {
            display: flex;
            align-items: flex-start;
            gap: 4px;
            min-width: 0;
            width: 100%;
            white-space: normal;
            box-sizing: border-box;
        }

            .performance-options:not(.performance-options-mlt)
            .performance-option input[type="radio"] {
                flex: 0 0 15px;
                margin-top: 3px;
            }
    /* -----------------------------------------------------
       BUTTON
       ----------------------------------------------------- */

    .performance-category-buttons {
        gap: 5px;
        margin-bottom: 14px;
    }


        .performance-category-buttons button {
            width: 32px;
            height: 32px;
            border-radius: 7px;
            font-size: 17px;
        }


    /* -----------------------------------------------------
       INSTANCE CONTAINER
       ----------------------------------------------------- */

    .performance-instance-container {
        grid-template-columns: minmax(0, 1fr);
        row-gap: 14px;
    }


    /* -----------------------------------------------------
       INSTANCE
       ----------------------------------------------------- */

    .performance-instance {
        padding: 14px;
        border-radius: 9px;
    }


    /* -----------------------------------------------------
       QUESTION
       ----------------------------------------------------- */

    .performance-question {
        grid-template-columns: 5px minmax(0, 1fr);
        column-gap: 6px;
        width: 100%;
        margin-bottom: 5px;
    }
    .performance-question:has(.performance-textarea) {
        grid-template-columns: 5px minmax(0, 1fr);
        column-gap: 8px;
    }

    /* -----------------------------------------------------
       SEQUENCE
       ----------------------------------------------------- */

    .performance-question-sequence {
        width: 22px;
        padding: 0;
        visibility: hidden;
        text-align: left;
        line-height: 22px;
        font-size: 12px;
    }


    /* -----------------------------------------------------
       QUESTION LABEL
       ----------------------------------------------------- */

    .performance-question-label {
        width: 100%;
        line-height: 22px;
        font-size: 12px;
    }


    /* -----------------------------------------------------
       INPUT
       ----------------------------------------------------- */

    .performance-question-input {
        grid-column: 2;
        width: 100%;
    }


    /* -----------------------------------------------------
       FORM
       ----------------------------------------------------- */

    .performance-instance input[type="text"],
    .performance-instance textarea,
    .performance-textbox,
    .performance-textarea {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box !important;
    }


    /* -----------------------------------------------------
       OPTIONS
       ----------------------------------------------------- */

    .performance-options {
        width: 100%;
        max-width: 100%;
        min-width: 0;
    }


    .performance-option {
        font-size: 12px;
        line-height: 21px;
    }


    /* -----------------------------------------------------
       MLT MOBILE
       ----------------------------------------------------- */

    .performance-question:has(.performance-options-mlt) {
        grid-template-columns: 10px minmax(0, 1fr);
        column-gap: 0px;
    }


        .performance-question:has(.performance-options-mlt)
        .performance-option {
            gap: 8px;
            padding: 3px 0;
        }


            .performance-question:has(.performance-options-mlt)
            .performance-option span {
                font-size: 12px;
                line-height: 1.45;
            }
}
.performance-card-missing {
    outline: 2px solid #dc3545;
    outline-offset: 4px;
    border-radius: 8px;
    animation: missingCardPulse 1s ease-in-out 2;
}

@keyframes missingCardPulse {
    50% {
        background-color: #fff0f0;
    }
}