/* tool-img —— 图片类工具：格式转换、压缩、Base64、二维码、颜色
   仅对应页面加载（见 Infrastructure/PageCss.cs），不是全站样式。
   改样式请直接改本文件。 */

/* 13) 二维码 / 颜色 / 开发者工具 */
.qr-wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 336px;
    gap: 22px;
    align-items: start;
}

.qr-input {
    min-height: 132px;
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.6;
    resize: vertical;
}

.qr-opts {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 12px 0;
}

.qr-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--jt-ink-2);
}

.qr-select {
    width: 132px;
    height: 34px;
    padding: 0 8px;
}

.qr-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qr-btns .layui-btn { margin: 0; }

.qr-msg {
    min-height: 20px;
    margin-top: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.qr-msg--ok { color: #1a7f45; }

.qr-msg--warn { color: #c2650a; }

.qr-msg--err { color: #c02b2b; }

.qr-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qr-box {
    width: 320px;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1px solid var(--jt-line);
    border-radius: var(--jt-radius);
    background: #fff;
}

.qr-box img,
.qr-box canvas {
    max-width: 100%;
    height: auto;
}

.qr-hint {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.5;
    color: var(--jt-ink-3);
    text-align: center;
}

.cc-input-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.cc-input {
    flex: 1 1 280px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
}

.cc-msg {
    min-height: 20px;
    margin: 10px 0 0;
    font-size: 13px;
}

.cc-msg--err { color: #c02b2b; }

.cc-body {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-top: 14px;
}

.cc-swatch {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--jt-line);
    border-radius: var(--jt-radius);
}

.cc-swatch__text {
    font-size: 34px;
    font-weight: 700;
    letter-spacing: .02em;
}

.cc-table td.cc-copy-cell {
    width: 96px;
    text-align: right;
}

.cc-table .layui-btn-sm { margin: 0; }

@media (max-width: 860px) {
    .qr-wrap { grid-template-columns: 1fr; }

    .cc-body { grid-template-columns: 1fr; }

    .cc-swatch { height: 120px; }

}
/* 15) 图片格式转换 */
.iv-opts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 14px;
    margin: 14px 0;
}

.iv-opts .layui-btn { margin: 0; }

.iv-opt {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--jt-ink-2);
}

.iv-select {
    width: 104px;
    height: 34px;
    padding: 0 8px;
}

.iv-range { width: 128px; }

.iv-qval {
    min-width: 26px;
    color: var(--jt-ink);
    font-variant-numeric: tabular-nums;
}

.iv-num {
    width: 104px;
    height: 34px;
    padding: 0 10px;
}

.iv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 6px;
}

.iv-card {
    padding: 14px;
    border: 1px solid var(--jt-line);
    border-radius: var(--jt-radius);
    background: #fff;
}

.iv-card__title {
    margin: 0 0 10px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--jt-ink-3);
}

.iv-card__img {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: var(--jt-radius-sm);
    /* 棋盘格底，透明区一眼能看出来 */
    background: repeating-conic-gradient(#f1f3f8 0 25%, #ffffff 0 50%) 0 0 / 16px 16px;
}

.iv-card__img img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.iv-download {
    display: block;
    width: 100%;
    margin-top: 12px;
    text-align: center;
}

@media (max-width: 760px) {
    .iv-grid { grid-template-columns: 1fr; }

    .iv-card__img { height: 170px; }

}
/* 18) 图片转 Base64 */
.b64-block { margin-bottom: 28px; }

.b64-title {
    margin: 4px 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: var(--jt-ink);
}

.b64-block + .b64-block .b64-title { margin-top: 26px; }

.b64-out,
.b64-in {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;
    font-size: 12.5px;
    line-height: 1.55;
    word-break: break-all;
    resize: vertical;
}

.b64-out { height: 208px; background: #fbfcfe; }

.b64-in { min-height: 150px; }

.b64-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 10px;
}

.b64-actions--left { justify-content: flex-start; }

.b64-actions .layui-btn { margin: 0; }

.b64-count {
    margin-right: auto;
    font-size: 12.5px;
    color: var(--jt-ink-3);
    font-variant-numeric: tabular-nums;
}
