.mapping-source,
.mapping-result,
.mapping-audit,
.mapping-schema {
    margin-top: 16px;
    border: 1px solid #d7dee8;
    border-radius: 6px;
    background: #fff;
}

.mapping-source,
.mapping-audit,
.mapping-schema {
    padding: 13px;
}

.mapping-source {
    background: #f6f8fb;
}

.mapping-section-heading,
.mapping-result__heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.mapping-section-heading > div > span,
.mapping-result__heading > div > span {
    color: #e8177f;
    font-size: 8px;
    font-weight: 700;
}

.mapping-source h3,
.mapping-result h3,
.mapping-audit h3,
.mapping-schema h3 {
    margin: 2px 0 0;
    color: #17243a;
    font-size: 13px;
}

.mapping-badge,
.mapping-result__heading > span {
    flex: 0 0 auto;
    padding: 4px 7px;
    color: #496b94;
    border-radius: 4px;
    background: #eaf2fb;
    font-size: 7px;
    font-weight: 700;
}

.mapping-source .demo-field-label {
    display: block;
    margin-top: 12px;
}

.mapping-source textarea {
    width: 100%;
    min-height: 132px;
    margin-top: 5px;
    padding: 10px 11px;
    resize: vertical;
    color: #24354d;
    border: 1px solid #cfd9e6;
    border-radius: 5px;
    background: #fff;
    font: 9px/1.55 Consolas, "Courier New", monospace;
}

.mapping-source textarea:focus {
    border-color: #df78aa;
    outline: 2px solid rgb(232 23 127 / 12%);
}

.mapping-threshold {
    margin-top: 11px;
}

.mapping-threshold > div:first-child,
.mapping-threshold__scale {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mapping-threshold .demo-field-label {
    margin: 0;
}

.mapping-threshold output {
    color: #bf0c68;
    font-size: 9px;
    font-weight: 700;
}

.mapping-threshold input {
    width: 100%;
    margin: 5px 0 0;
    accent-color: #e8177f;
}

.mapping-threshold__scale {
    color: #8490a2;
    font-size: 7px;
}

.mapping-source .btn-demo-action,
.mapping-audit .btn-demo-action {
    margin-top: 11px;
}

.mapping-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.mapping-actions .btn-demo-action {
    width: 100%;
    min-width: 0;
    margin-top: 0;
    padding-right: 8px;
    padding-left: 8px;
    font-size: 8px;
}

.mapping-source .btn-demo-action.is-busy {
    cursor: progress;
}

.mapping-result {
    overflow: hidden;
    border-color: #abd7c9;
    background: #f4fbf8;
}

.mapping-result__heading {
    padding: 13px 13px 10px;
}

.mapping-result__heading > span {
    color: #247d64;
    background: #dff2eb;
}

.mapping-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid #d8ebe5;
    background: #fff;
}

.mapping-metrics span {
    display: grid;
    gap: 2px;
    padding: 10px 4px;
    text-align: center;
}

.mapping-metrics span + span {
    border-left: 1px solid #e4e9f0;
}

.mapping-metrics strong {
    color: #263850;
    font-size: 10px;
}

.mapping-metrics small {
    color: #7b889c;
    font-size: 6px;
}

.mapping-list {
    display: grid;
    gap: 7px;
    margin-top: 11px;
}

.mapping-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    padding: 9px;
    border: 1px solid #dbe3ed;
    border-left: 3px solid #32a47d;
    border-radius: 4px;
    background: #fbfcfe;
}

.mapping-item--skipped {
    border-left-color: #e4a531;
    background: #fffbf2;
}

.mapping-item > div:first-child {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 7px;
}

.mapping-item code {
    min-width: 0;
    overflow: hidden;
    color: #293a52;
    font-size: 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mapping-item code:last-child {
    color: #147858;
    font-weight: 700;
}

.mapping-item--skipped code:last-child {
    color: #9b6811;
}

.mapping-item i {
    position: relative;
    flex: 0 0 14px;
    height: 1px;
    background: #9cabbc;
}

.mapping-item i::after {
    position: absolute;
    top: -3px;
    right: 0;
    width: 6px;
    height: 6px;
    content: "";
    border-top: 1px solid #9cabbc;
    border-right: 1px solid #9cabbc;
    transform: rotate(45deg);
}

.mapping-item > div:last-child {
    display: grid;
    justify-items: end;
    gap: 2px;
}

.mapping-item > div:last-child span {
    color: #527064;
    font-size: 6px;
    font-weight: 700;
    text-transform: uppercase;
}

.mapping-item--skipped > div:last-child span {
    color: #9b6811;
}

.mapping-item > div:last-child strong {
    color: #22364f;
    font-size: 8px;
}

.mapping-schema__names {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.mapping-schema__names code {
    max-width: 100%;
    overflow: hidden;
    padding: 4px 6px;
    color: #3d618d;
    border: 1px solid #cee0f3;
    border-radius: 3px;
    background: #edf5fd;
    font-size: 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 520px) {
    .mapping-actions {
        grid-template-columns: 1fr;
    }

    .mapping-item {
        grid-template-columns: minmax(0, 1fr);
    }

    .mapping-item > div:last-child {
        display: flex;
        justify-content: space-between;
    }
}
