/* ==========================================================
   在线经纬度距离计算工具样式
   ========================================================== */

.dist-tool {
    width: 100%;
}

.dist-tool label {
     margin-bottom: 0px !important;
}

.dist-tool [hidden] {
    display: none !important;
}

.dist-card {
    margin-bottom: 14px;
    background: #fff;
    border: 1px solid var(--dd-line);
    border-radius: 8px;
    overflow: hidden;
}

.dist-card h2 {
    margin: 0;
    padding: 11px 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--dd-ink);
    background: #f8fafc;
    border-bottom: 1px solid var(--dd-line);
}

.dist-tabs {
    display: flex;
    background: #f3f5f7;
    border-bottom: 1px solid var(--dd-line);
}

.dist-tab {
    height: 42px;
    padding: 0 20px;
    font-size: 13px;
    font-weight: 600;
    color: var(--dd-ink-2);
    background: transparent;
    border: 0;
    border-right: 1px solid var(--dd-line);
    cursor: pointer;
    outline: none !important;
}

.dist-tab:hover {
    color: var(--dd-brand);
}

.dist-tab.is-active {
    color: var(--dd-brand);
    background: #fff;
    border-bottom: 2px solid var(--dd-brand);
}

.dist-body {
    padding: 14px;
}

.dist-form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 28px;
    margin-bottom: 10px;
}

.dist-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dist-field label {
    flex: 0 0 auto;
    min-width: 44px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--dd-ink-2);
}

.dist-field input,
.dist-batch-input {
    width: 100%;
    min-width: 0;
    height: 36px;
    padding: 0 10px;
    font-size: 13px;
    color: var(--dd-ink);
    background: #fff;
    border: 1px solid var(--dd-line);
    border-radius: 4px;
    outline: none !important;
    box-sizing: border-box;
}

.dist-batch-input {
    height: auto;
    min-height: 140px;
    padding: 9px 11px;
    line-height: 1.7;
    resize: vertical;
}

.dist-field input:focus,
.dist-batch-input:focus {
    border-color: var(--dd-brand);
}

.dist-field input.is-error,
.dist-batch-input.is-error {
    border-color: #dc2626;
    background-color: #fff7f7;
}

.dist-batch-tip {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--dd-ink-3);
}

.dist-config {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--dd-line);
}

.dist-config-item {
    display: flex;
    align-items: center;
    min-width: 0;
    height: 36px;
    border: 1px solid var(--dd-line);
    border-radius: 4px;
    overflow: hidden;
}

.dist-config-item label {
    flex: 0 0 auto;
    padding: 0 9px;
    font-size: 12px;
    font-weight: 600;
    line-height: 34px;
    color: var(--dd-ink-2);
    background: #f8fafc;
    border-right: 1px solid var(--dd-line);
}

.dist-config-item select,
.dist-config-item input {
    flex: 1 1 auto;
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    font-size: 12.5px;
    color: var(--dd-ink);
    background: #fff;
    border: 0;
    outline: none !important;
}

.dist-config-item select {
    cursor: pointer;
}

.dist-actions {
    margin-top: 14px;
}

.dist-btn {
    display: inline-block;
    height: 36px;
    margin-right: 8px;
    padding: 0 16px;
    font-size: 12.5px;
    font-weight: 600;
    line-height: 34px;
    color: var(--dd-ink-2);
    text-align: center;
    background: #f6f8f9;
    border: 1px solid var(--dd-line);
    border-radius: 4px;
    cursor: pointer;
    outline: none !important;
    vertical-align: middle;
}

.dist-btn:hover:not(:disabled) {
    color: var(--dd-brand);
    border-color: var(--dd-brand);
}

.dist-btn:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.dist-btn-primary {
    color: #fff;
    background: var(--dd-brand);
    border-color: var(--dd-brand);
}

.dist-btn-primary:hover:not(:disabled) {
    color: #fff;
    background: var(--dd-brand-dark);
    border-color: var(--dd-brand-dark);
}

.dist-btn-ghost {
    background: #fff;
}

.dist-status {
    display: block;
    margin-top: 12px;
    padding: 8px 11px;
    font-size: 12.5px;
    line-height: 1.6;
    border-radius: 6px;
}

.dist-status-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 7px;
    background: currentColor;
    border-radius: 50%;
    vertical-align: middle;
}

.dist-status.is-success {
    color: #0f766e;
    background: #f0fcf9;
    border: 1px solid #d5eee8;
}

.dist-status.is-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.dist-result-main {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 24px;
    font-weight: 700;
    line-height: 1.5;
    color: var(--dd-brand);
    word-break: break-all;
}

.dist-result-detail {
    margin-top: 8px;
    font-size: 12.5px;
    line-height: 1.7;
    color: var(--dd-ink-2);
}

.dist-batch-table-wrap {
    overflow-x: auto;
}

.dist-batch-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}

.dist-batch-table th,
.dist-batch-table td {
    padding: 8px 10px;
    text-align: left;
    border: 1px solid var(--dd-line);
}

.dist-batch-table th {
    font-weight: 700;
    color: var(--dd-ink-2);
    background: #f8fafc;
    white-space: nowrap;
}

.dist-batch-table td {
    color: var(--dd-ink);
    word-break: break-all;
}

.dist-batch-errors {
    margin-top: 10px;
    padding: 9px 11px;
    font-size: 12px;
    line-height: 1.7;
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 6px;
    white-space: pre-line;
}

.dist-history {
    margin-bottom: 12px;
}

.dist-history-empty {
    padding: 10px 12px;
    font-size: 12.5px;
    color: var(--dd-ink-3);
    background: #f8fafc;
    border: 1px dashed var(--dd-line);
    border-radius: 6px;
}

.dist-history-item {
    padding: 9px 12px;
    border: 1px solid var(--dd-line);
    border-radius: 6px;
}

.dist-history-item + .dist-history-item {
    margin-top: 8px;
}

.dist-history-route {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 12.5px;
    color: var(--dd-ink);
    word-break: break-all;
}

.dist-history-meta {
    margin-top: 5px;
    font-size: 12px;
    color: var(--dd-ink-3);
}

.dist-history-meta strong {
    margin-right: 8px;
    font-size: 12.5px;
    color: var(--dd-brand);
}

.dist-history-meta span {
    margin-right: 10px;
}

.dist-notice {
    margin-bottom: 14px;
    padding: 9px 11px;
    font-size: 12px;
    line-height: 1.7;
    color: var(--dd-ink-3);
    background: #f8fafc;
    border: 1px solid var(--dd-line);
    border-radius: 6px;
}

@media (max-width: 767.98px) {
    .dist-form-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .dist-config {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .dist-config {
        grid-template-columns: minmax(0, 1fr);
    }

    .dist-tab {
        flex: 1 1 50%;
        padding: 0 10px;
    }

    .dist-result-main {
        font-size: 20px;
    }
}
