/* 17-api-settings: shared API configuration, preserving provider transports. */
#cfg { padding: 24px; background: rgb(52 59 76 / .12); backdrop-filter: blur(3px); }
#cfg .cfg-box { width: min(772px,100%); height: 687px; max-height: calc(100dvh - 48px); margin-top: 18px; border-radius: 17px; background: var(--bg2); }
#cfg .pk-h { padding: 26px 30px 24px; border: 0; gap: 20px; }
#cfg #cfgT { font-size: 28px; line-height: 40px; }
#cfg #cfgX { width: 32px; height: 36px; padding: 0; background: transparent; color: var(--mu); font-size: 25px; }
#cfg .cfg-b { flex: 1; min-height: 0; padding: 4px 30px 26px; gap: 16px; }
#cfg .grp { margin: 0 0 -9px; font-size: 19px; letter-spacing: 0; color: var(--tx); }
#cfg .prov { display: flex; flex-wrap: wrap; gap: 16px 20px; padding: 0 16px 8px; }
#cfg .prov label { display: flex; align-items: center; gap: 10px; }
#cfg .prov input { position: static; opacity: 1; appearance: none; flex: none; width: 23px; height: 23px; margin: 0; border: 2px solid var(--line2); border-radius: 50%; background: var(--bg2); cursor: pointer; }
#cfg .prov input:checked { border: 6px solid var(--ac); }
#cfg .prov span { display: inline; padding: 0; border: 0; border-radius: 0; background: transparent; }
#cfg .prov label:has(input:checked) > span { box-shadow: none; }
#cfg .prov :is(input:checked + span,input:focus-visible + span) { background: transparent; border: 0; outline: 0; }
#cfg .prov b { font-size: 18px; font-weight: 500; }
#cfg .prov .lg, #cfg .prov small { display: none; }
#cfg .fld { gap: 6px; margin: 0; color: var(--tx); font-size: 19px; font-weight: 550; line-height: 1.3; }
#cfg .fld :is(input,select) { min-height: 45px; width: 100%; min-width: 0; padding: 9px 15px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); color: var(--tx); font: 17px/1.4 var(--sans); box-shadow: none; }
#cfg .fld input::placeholder { color: var(--mu); opacity: .8; }
#cfg .kw { position: relative; display: flex; }
#cfg #cfKey { padding-right: 50px; }
#cfg #cfEye { position: absolute; right: 10px; top: 4px; display: grid; place-items: center; width: 36px; height: 36px; padding: 8px; background: none; color: var(--mu); }
#cfg #cfEye svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; }
#cfEye[aria-pressed=true] .eye-slash { display: none; }
#cfg .api-model { position: relative; display: flex; flex-direction: column; }
.api-model-input { position: relative; }
#cfg #cfModel { padding-right: 45px; }
#cfg #cfModel::-webkit-calendar-picker-indicator { opacity: 0; }
#cfModelToggle { position: absolute; right: 7px; top: 4px; display: grid; place-items: center; width: 36px; height: 36px; padding: 8px; background: transparent; color: var(--mu); }
#cfModelToggle svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }
#cfModelMenu { position: absolute; z-index: 4; top: 100%; width: 100%; max-height: 200px; overflow: auto; padding: 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); box-shadow: var(--sh3); }
#cfModelMenu button { display: block; width: 100%; padding: 10px; border-radius: 6px; text-align: left; background: transparent; color: var(--tx); font-size: 14px; overflow-wrap: anywhere; }
#cfModelMenu button:hover, #cfModelMenu button:focus-visible { background: var(--acs); }
#cfAdvanced { border-radius: 12px; background: var(--sf); }
#cfAdvanced > summary { display: flex; align-items: center; gap: 10px; min-height: 45px; padding: 10px 18px; color: var(--tx); font-size: 17px; font-weight: 550; cursor: pointer; list-style: none; }
#cfAdvanced > summary::before { content: ""; border: 5px solid transparent; border-left-color: currentColor; }
#cfAdvanced[open] > summary::before { transform: rotate(90deg); }
#cfAdvanced > :not(summary) { margin: 10px 16px 16px; }
#cfAdvanced .note, #cfAdvanced .fine { font-size: 12px; line-height: 1.7; }
#cfg .tg { display: flex; align-items: center; gap: 10px; padding: 0; border: 0; background: none; }
#cfg #cfProxy { appearance: none; flex: none; width: 40px; height: 25px; margin: 0; padding: 3px; border: 0; border-radius: 20px; background: var(--line2); cursor: pointer; }
#cfg #cfProxy::before { content: ""; display: block; width: 19px; height: 19px; border-radius: 50%; background: white; box-shadow: 0 1px 3px #0002; }
#cfg #cfProxy:checked { background: var(--ac); }
#cfg #cfProxy:checked::before { transform: translateX(15px); }
#cfg .tg > span { display: flex; align-items: baseline; gap: 12px; min-width: 0; }
#cfg .tg b { font-size: 17px; font-weight: 500; }
#cfg .tg small { color: var(--mu); font-size: 14px; line-height: 1.6; }
#cfg #cfMsg { margin: 0; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
#cfg #cfMsg:empty { display: none; }
#cfg .cfg-f { flex: none; gap: 14px; min-height: 100px; padding: 26px 30px; }
#cfg .cfg-f button { min-height: 46px; padding: 9px 18px; border: 1px solid var(--line2); border-radius: 11px; background: var(--bg2); color: var(--tx); font-size: 17px; white-space: nowrap; }
#cfg .cfg-f #cfSave { background: var(--ac); border-color: var(--ac); color: #fff; box-shadow: none; }
#cfg button:focus-visible, #cfg summary:focus-visible, #cfg input:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }
@media(max-width:767px) {
  #cfg { padding: 16px 12px; place-items: center; }
  #cfg .cfg-box { max-height: calc(100dvh - 32px); margin-top: 0; border-radius: 16px; }
  #cfg .pk-h { padding: 19px 20px 14px; }
  #cfg #cfgT { font-size: 24px; }
  #cfg .cfg-b { gap: 16px; padding: 4px 20px 20px; }
  #cfg .prov { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 12px; padding: 0 0 4px; }
  #cfg .prov label:last-child:nth-child(odd) { grid-column: 1 / -1; }
  #cfg .prov b { font-size: 15px; }
  #cfg .fld, #cfg .grp { font-size: 16px; }
  #cfg .fld :is(input,select) { font-size: 16px; }
  #cfg .tg > span { flex-wrap: wrap; gap: 0 8px; }
  #cfg .cfg-f { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 8px; min-height: 0; padding: 16px 20px; }
  #cfg .cfg-f button { grid-column: span 2; padding: 8px 4px; font-size: 14px; white-space: normal; }
  #cfg .cfg-f :is(#cfTest,#cfSave) { grid-column: span 3; margin: 0; }
  #cfg .cfg-f .sp { display: none; }
}
