/*
 * ============================================================
 * ACE — MULTIPLE TOKEN PATTERN MATCHER
 * DISPLAY STYLES
 * ============================================================
 */


/* ============================================================
 * PAGE
 * ============================================================ */

body {
    font-family: Arial, sans-serif;
    margin: 24px;
    line-height: 1.5;
    color: #222;
    background: #fff;
}

.ace-page {
    max-width: 1600px;
    margin: 0 auto;
}


/* ============================================================
 * SUMMARY
 * ============================================================ */

.ace-summary {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;

    margin: 20px 0 28px;
    padding: 14px 18px;

    background: #f6f6f6;
    border: 1px solid #ddd;
}

.ace-summary > div {
    white-space: nowrap;
}


/* ============================================================
 * TABLE WRAPPER
 * ============================================================ */

.ace-table-wrap {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


/* ============================================================
 * RESULT TABLE
 * ============================================================ */

.ace-table {
    width: 100%;
    min-width: 1300px;

    border-collapse: collapse;
}

.ace-table th,
.ace-table td {
    padding: 8px 10px;

    border: 1px solid #ccc;

    vertical-align: middle;
    white-space: nowrap;
}

.ace-table th {
    background: #efefef;

    text-align: left;
    font-weight: 700;
}

.ace-table tbody tr:nth-child(even) {
    background: #fafafa;
}


/* ============================================================
 * TOKEN
 * ============================================================ */

.ace-token {
    font-size: 1.25rem;
    font-weight: 700;
    text-align: right;
}


/* ============================================================
 * RESULT STATES
 * ============================================================ */

.ace-matched {
    background: #f4fff4;
}

.ace-not-matched {
    background: #fff1f1 !important;
}

.ace-error {
    background: #fff8e5 !important;
}


/* ============================================================
 * ALIGNMENT
 * ============================================================ */

.ace-center {
    text-align: center;
}


/* ============================================================
 * CODE VALUES
 * ============================================================ */

code {
    font-size: 0.95em;
}


/* ============================================================
 * MATCHER ERRORS
 * ============================================================ */

.ace-errors {
    margin-top: 32px;
}

.ace-error-token {
    font-size: 1.2rem;
    font-weight: 700;
}


/* ============================================================
 * RESPONSIVE DISPLAY
 * ============================================================ */

@media (max-width: 768px) {

    body {
        margin: 12px;
    }

    .ace-summary {
        gap: 12px;
        padding: 12px;
    }

    .ace-summary > div {
        flex: 1 1 45%;
    }

    .ace-token {
        font-size: 1.15rem;
    }

}
/* =========================================================
   ND STRUCTURAL COMPONENTS
   ========================================================= */

.ace-nd-part {
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    white-space: nowrap;
}

/* Append = soft violet */
.ace-nd-append,
.ace-nd-append-head {
    background: #f2e8ff;
}

/* Exact/base = soft green */
.ace-nd-exact,
.ace-nd-exact-head {
    background: #e6f7ec;
}

/* Prepend = soft blue */
.ace-nd-prepend,
.ace-nd-prepend-head {
    background: #e7f1ff;
}


/* =========================================================
   TRANSLATIONS
   ========================================================= */

.ace-translation {
    font-weight: 600;
    text-align: left;
}

/* Translation of prepend */
.ace-prepend-translation,
.ace-trans-prepend-head {
    background: #edf5ff;
}

/* Main lexical translation */
.ace-main-translation,
.ace-trans-exact-head {
    background: #fff4cc;
}

/* Translation of append */
.ace-append-translation,
.ace-trans-append-head {
    background: #f5edff;
}


/* Main lexical meaning gets slightly more emphasis */
.ace-main-translation {
    font-weight: 700;
}