/*
 * Higher-value workflow tools for KivTools.  They deliberately extend the
 * existing Bootstrap/card language: calm documentation-like panels around one
 * concrete browser-only transformation, rather than a second app shell.
 */
.kiv-pro-tool .pro-tabs {
    margin-bottom: 14px;
}

.kiv-pro-tool .pro-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, .9fr);
    gap: 14px;
    align-items: start;
}

.kiv-pro-tool .pro-workspace.pro-workspace-wide-output {
    grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
}

.kiv-pro-tool .pro-card {
    margin: 0 0 14px;
    overflow: hidden;
    border: 1px solid #dfe8eb;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(30, 52, 62, .035);
}

.kiv-pro-tool .pro-card-head {
    display: flex;
    min-height: 43px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 13px;
    border-bottom: 1px solid #e6edef;
    background: #fbfcfc;
    color: #3b4d57;
    font-size: 13px;
    font-weight: 700;
}

.kiv-pro-tool .pro-card-head small {
    color: #7a8991;
    font-size: 11px;
    font-weight: 400;
    text-align: right;
}

.kiv-pro-tool .pro-card-body {
    padding: 13px;
}

.kiv-pro-tool .pro-card-body > :last-child {
    margin-bottom: 0;
}

.kiv-pro-tool .pro-code-input,
.kiv-pro-tool .pro-code-output {
    width: 100%;
    margin: 0;
    border: 1px solid #dfe7ea;
    border-radius: 3px;
    background: #fcfdfd;
    color: #24343d;
    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.53;
}

.kiv-pro-tool .pro-code-input {
    min-height: 292px;
    padding: 11px;
    resize: vertical;
}

.kiv-pro-tool .pro-code-input.pro-code-short {
    min-height: 114px;
}

.kiv-pro-tool .pro-code-output {
    display: block;
    min-height: 292px;
    max-height: 548px;
    overflow: auto;
    padding: 12px;
    white-space: pre;
}

.kiv-pro-tool .pro-code-output.pro-output-short {
    min-height: 128px;
}

.kiv-pro-tool .pro-toolbar,
.kiv-pro-tool .pro-control-row,
.kiv-pro-tool .pro-chip-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.kiv-pro-tool .pro-toolbar {
    margin: 11px 0 0;
}

.kiv-pro-tool .pro-toolbar .btn,
.kiv-pro-tool .pro-control-row .btn {
    min-height: 34px;
}

.kiv-pro-tool .pro-toolbar .btn-primary,
.kiv-pro-tool .pro-control-row .btn-primary {
    border-color: #0a9f65;
    background: #0b9f6a;
}

.kiv-pro-tool .pro-toolbar .btn-primary:hover,
.kiv-pro-tool .pro-control-row .btn-primary:hover,
.kiv-pro-tool .pro-toolbar .btn-primary:focus,
.kiv-pro-tool .pro-control-row .btn-primary:focus {
    border-color: #078354;
    background: #078354;
}

.kiv-pro-tool .pro-toolbar .pro-file-label {
    margin: 0;
}

.kiv-pro-tool .pro-toolbar .pro-file-label input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
}

.kiv-pro-tool .pro-toolbar .pro-file-label span {
    display: inline-block;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid #cfdadd;
    border-radius: 3px;
    background: #fff;
    color: #3c4e58;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.kiv-pro-tool .pro-toolbar .pro-file-label input:focus + span {
    outline: 3px solid rgba(91, 192, 222, .35);
    outline-offset: 1px;
}

.kiv-pro-tool .pro-select,
.kiv-pro-tool .pro-text-input {
    min-height: 34px;
    border: 1px solid #cfdadd;
    border-radius: 3px;
    background: #fff;
    color: #344650;
    font-size: 12px;
}

.kiv-pro-tool .pro-select {
    padding: 5px 28px 5px 8px;
}

.kiv-pro-tool .pro-text-input {
    min-width: 0;
    padding: 6px 8px;
}

.kiv-pro-tool .pro-field {
    display: grid;
    gap: 5px;
    margin: 0 0 11px;
}

.kiv-pro-tool .pro-field > label,
.kiv-pro-tool .pro-inline-label {
    margin: 0;
    color: #53636d;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}

.kiv-pro-tool .pro-field-help,
.kiv-pro-tool .pro-note {
    margin: 7px 0 0;
    color: #71818a;
    font-size: 12px;
    line-height: 1.5;
}

.kiv-pro-tool .pro-local-banner {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 13px;
    padding: 9px 11px;
    border: 1px solid #c9e8d7;
    border-radius: 3px;
    background: #f1fbf5;
    color: #27724d;
    font-size: 12px;
    line-height: 1.48;
}

.kiv-pro-tool .pro-local-banner .glyphicon {
    margin-top: 1px;
}

.kiv-pro-tool .pro-status {
    display: none;
    margin: 0 0 13px;
    padding: 9px 12px;
    font-size: 12px;
}

.kiv-pro-tool .pro-status.is-visible {
    display: block;
}

.kiv-pro-tool .pro-preview {
    display: grid;
    min-height: 224px;
    place-items: center;
    overflow: auto;
    border: 1px solid #e0e8eb;
    border-radius: 3px;
    background-color: #fbfcfd;
    background-image: linear-gradient(45deg, #f0f4f5 25%, transparent 25%), linear-gradient(-45deg, #f0f4f5 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #f0f4f5 75%), linear-gradient(-45deg, transparent 75%, #f0f4f5 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}

.kiv-pro-tool .pro-preview img,
.kiv-pro-tool .pro-preview svg {
    display: block;
    max-width: 92%;
    max-height: 360px;
    margin: 18px;
}

.kiv-pro-tool .pro-empty {
    max-width: 360px;
    padding: 26px;
    color: #87949b;
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}

.kiv-pro-tool .pro-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 12px 0 0;
}

.kiv-pro-tool .pro-metric {
    padding: 9px;
    border: 1px solid #e1e9ec;
    border-radius: 3px;
    background: #fbfcfd;
}

.kiv-pro-tool .pro-metric strong,
.kiv-pro-tool .pro-metric span {
    display: block;
}

.kiv-pro-tool .pro-metric strong {
    overflow: hidden;
    color: #2a434c;
    font-size: 14px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kiv-pro-tool .pro-metric span {
    margin-top: 2px;
    color: #7a8991;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.kiv-pro-tool .pro-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.kiv-pro-tool .pro-list li {
    padding: 8px 0;
    border-bottom: 1px solid #edf1f3;
    color: #4a5a63;
    font-size: 12px;
    line-height: 1.45;
}

.kiv-pro-tool .pro-list li:last-child {
    border-bottom: 0;
}

.kiv-pro-tool .pro-list .pro-level {
    display: inline-block;
    min-width: 51px;
    margin-right: 7px;
    color: #0a9660;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .05em;
}

.kiv-pro-tool .pro-schema-view {
    min-height: 356px;
    overflow: auto;
    padding: 14px;
    border: 1px solid #dfe7ea;
    border-radius: 3px;
    background: #fff;
}

.kiv-pro-tool .pro-schema-view svg {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.kiv-pro-tool .pro-grid-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.kiv-pro-tool .pro-grid-three {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.kiv-pro-tool .pro-check {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: #52636c;
    font-size: 12px;
    font-weight: 400;
}

.kiv-pro-tool .pro-check input {
    margin: 0;
}

.kiv-pro-tool .pro-segmented {
    display: inline-flex;
    overflow: hidden;
    border: 1px solid #cfdadd;
    border-radius: 3px;
    background: #fff;
}

.kiv-pro-tool .pro-segmented button {
    min-height: 32px;
    padding: 5px 10px;
    border: 0;
    border-right: 1px solid #dce5e8;
    background: #fff;
    color: #52626a;
    font-size: 12px;
    font-weight: 600;
}

.kiv-pro-tool .pro-segmented button:last-child {
    border-right: 0;
}

.kiv-pro-tool .pro-segmented button.is-active {
    background: #eaf8ef;
    color: #097a4d;
}

.kiv-pro-tool .pro-footer-copy {
    margin-top: 14px;
}

@media (max-width: 991px) {
    .kiv-pro-tool .pro-workspace,
    .kiv-pro-tool .pro-workspace.pro-workspace-wide-output {
        grid-template-columns: 1fr;
    }

    .kiv-pro-tool .pro-code-input,
    .kiv-pro-tool .pro-code-output {
        min-height: 230px;
    }
}

@media (max-width: 575px) {
    .kiv-pro-tool .pro-grid-two,
    .kiv-pro-tool .pro-grid-three {
        grid-template-columns: 1fr;
    }

    .kiv-pro-tool .pro-metrics {
        grid-template-columns: 1fr;
    }

    .kiv-pro-tool .pro-card-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .kiv-pro-tool .pro-card-head small {
        text-align: left;
    }
}
