/*
 * HTTP 接口在线测试样式
 * Author: 缘境 (yvsm@zunyunkeji.com) QQ:316430983 微信：yvsm316
 *
 * 修改说明：补充基本介绍与常见问题样式
 * Author: 缘境 (yvsm@zunyunkeji.com) QQ:316430983 微信：yvsm316
*/
.tool-privacy-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    padding: 8px 14px;
    border: 1px solid #c9dbf7;
    border-radius: 999px;
    background: #f3f7ff;
    color: #2563eb;
    font-size: 13px;
    font-weight: 600;
}
.tool-field { display: flex; align-items: center; gap: 10px; color: #334155; font-size: 14px; }
.tool-check { display: inline-flex; align-items: center; gap: 8px; color: #475569; font-size: 14px; }
.tool-check input { width: 16px; height: 16px; }
.tool-mini-btn { min-height: 36px !important; padding: 6px 12px !important; font-size: 13px !important; }
.tool-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 8px;
}
.tool-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #d9e3f1;
    border-radius: 10px;
    background: #fff;
}
.tool-feature-item i { flex-shrink: 0; margin-top: 3px; color: #2563eb; }
.tool-feature-item p {
    margin: 0;
    min-width: 0;
    color: #52627a;
    font-size: 14px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.tool-seo-block {
    margin-top: 22px;
    padding: 24px 26px;
    border: 1px solid #d9e3f1;
    border-radius: 12px;
    background: #fff;
}
.tool-seo-block h2 { margin: 0 0 12px; color: #1c2f4c; font-size: 20px; }
.tool-seo-block h2::after { display: none; }
.tool-seo-block p { margin: 0; color: #61728a; font-size: 15px; line-height: 1.9; }
.tool-seo-block p + p,
.tool-seo-block p + ul,
.tool-seo-block ul + p { margin-top: 12px; }
.tool-seo-block code,
.tool-faq-item code {
    padding: 1px 6px;
    border-radius: 4px;
    background: #eef3fb;
    color: #1d4ed8;
    font-family: Consolas, "Courier New", monospace;
    font-size: 0.92em;
}
.tool-intro-list {
    margin: 0;
    padding-left: 1.2em;
    color: #61728a;
    font-size: 15px;
    line-height: 1.9;
}
.tool-intro-list li + li { margin-top: 6px; }
.tool-faq-list { display: grid; gap: 10px; }
.tool-faq-item {
    border: 1px solid #e5edf7;
    border-radius: 10px;
    background: #f8fbff;
    overflow: hidden;
}
.tool-faq-item summary {
    cursor: pointer;
    list-style: none;
    padding: 14px 16px;
    color: #1c2f4c;
    font-size: 15px;
    font-weight: 650;
    user-select: none;
}
.tool-faq-item summary::-webkit-details-marker { display: none; }
.tool-faq-item summary::before {
    content: '+';
    display: inline-block;
    width: 1.1em;
    margin-right: 8px;
    color: #2563eb;
    font-weight: 700;
}
.tool-faq-item[open] summary::before { content: '−'; }
.tool-faq-item p {
    margin: 0;
    padding: 0 16px 14px 16px;
    color: #61728a;
    font-size: 14px;
    line-height: 1.85;
}

.tool-http-section { padding: 48px 0 72px; background: #f7f9fc; }
.tool-http-panel {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid #d9e3f1;
    border-radius: 12px;
    background: #fff;
}
.tool-http-url-row {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    margin-bottom: 18px;
}
.tool-http-method,
.tool-http-url,
.tool-http-field input,
.tool-http-field select,
.tool-http-body-toolbar select {
    height: 44px;
    padding: 0 12px;
    border: 1px solid #d5e0ef;
    border-radius: 8px;
    background: #fff;
    color: #1e293b;
    font-size: 14px;
    box-sizing: border-box;
}
.tool-http-method { font-weight: 700; color: #2563eb; }
.tool-http-url-row .btn,
#http-send {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
    line-height: 1;
    box-sizing: border-box;
}
.tool-http-url-row .btn i,
#http-send i {
    margin: 0;
}
.tool-http-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e8eef7;
}
.tool-http-tabs button {
    height: 34px;
    padding: 0 14px;
    border: 1px solid #d5e0ef;
    border-radius: 999px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
}
.tool-http-tabs button.is-active {
    border-color: #2563eb;
    background: #edf3ff;
    color: #2563eb;
    font-weight: 650;
}
.tool-http-tab-panel { display: none; }
.tool-http-tab-panel.is-active { display: block; }
.tool-http-kv-head,
.tool-http-response-head,
.tool-http-body-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.tool-http-kv-head h2,
.tool-http-response-head h2 {
    margin: 0;
    color: #1c2f4c;
    font-size: 18px;
    font-weight: 650;
}
.tool-http-kv-head h2::after,
.tool-http-response-head h2::after { display: none; }
.tool-http-kv-list,
.tool-http-form-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.tool-http-kv-row {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr) minmax(0, 1.2fr) 40px;
    gap: 10px;
    align-items: center;
}
.tool-http-kv-row input[type="text"] {
    height: 40px;
    padding: 0 12px;
    border: 1px solid #d5e0ef;
    border-radius: 8px;
}
.tool-http-kv-row input[type="checkbox"] { width: 16px; height: 16px; margin: 0 auto; }
.tool-http-kv-remove {
    width: 40px;
    height: 40px;
    border: 1px solid #fecaca;
    border-radius: 8px;
    background: #fff5f5;
    color: #dc2626;
    cursor: pointer;
}
.tool-http-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 12px;
}
.tool-http-field > span {
    color: #334155;
    font-size: 13px;
    font-weight: 650;
}
.tool-http-auth-grid,
.tool-http-settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 16px;
}
.tool-http-body {
    width: 100%;
    min-height: 180px;
    padding: 14px;
    border: 1px solid #d9e3f1;
    border-radius: 10px;
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
    line-height: 1.7;
    resize: vertical;
}
.tool-http-security-note {
    grid-column: 1 / -1;
    margin: 4px 0 0;
    padding: 12px 14px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    font-size: 13px;
    line-height: 1.7;
}
.tool-http-meta {
    color: #64748b;
    font-size: 13px;
}
.tool-http-meta.is-ok { color: #047857; font-weight: 650; }
.tool-http-meta.is-err { color: #b91c1c; font-weight: 650; }
.tool-http-response {
    margin: 0;
    max-height: 460px;
    overflow: auto;
    padding: 16px;
    border: 1px solid #e5edf7;
    border-radius: 10px;
    background: #0f172a;
    color: #e2e8f0;
    font-family: Consolas, "Courier New", monospace;
    font-size: 12px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

@media (max-width: 1023px) {
    .tool-http-url-row { grid-template-columns: 1fr; }
    .tool-http-auth-grid,
    .tool-http-settings-grid,
    .tool-feature-grid { grid-template-columns: 1fr; }
    .tool-http-kv-row { grid-template-columns: 28px 1fr; }
    .tool-http-kv-row input[type="text"]:nth-of-type(2) { grid-column: 1 / -1; }
    .tool-http-kv-remove { grid-column: 1 / -1; width: 100%; }
}

@media (max-width: 767px) {
    .tool-http-section { padding: 28px 0 48px; }
    .tool-http-panel { padding: 16px; }
    .tool-http-response { max-height: 320px; }
}
