/* ============================================================
   安装脚本浮窗（授权码 / 密钥自动填入）
   沿用知识库浮窗的暖色骨架：标题栏可拖拽、右下可缩放、可最大化
   ============================================================ */

.isc-mask {
    position: fixed;
    inset: 0;
    z-index: 1400;
    background: rgba(46, 44, 40, .42);
    animation: isc-fade .18s ease;
}
@keyframes isc-fade { from { opacity: 0; } to { opacity: 1; } }

/* 浮窗打开时暂停背后页面的动画，省一份每帧重绘 */
body.isc-open > *:not(.isc-win):not(.isc-mask),
body.isc-open > *:not(.isc-win):not(.isc-mask) * {
    animation-play-state: paused !important;
}

.isc-win {
    position: fixed;
    z-index: 1410;
    display: flex;
    flex-direction: column;
    background: var(--wb-bg, #f4efe6);
    border: 1px solid var(--wb-border-strong, #ddd4c4);
    border-radius: var(--wb-radius, 16px);
    box-shadow: 0 26px 70px rgba(30, 26, 20, .35);
    overflow: hidden;
    animation: isc-in .22s cubic-bezier(.22, 1, .36, 1);
}
@keyframes isc-in {
    from { opacity: 0; transform: translateY(14px) scale(.985); }
    to   { opacity: 1; transform: none; }
}

/* ---------- 标题栏 ---------- */
.isc-bar {
    height: 46px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 10px 0 15px;
    background: var(--wb-card, #fbf8f2);
    border-bottom: 1px solid var(--wb-border, #e9e2d5);
    cursor: move;
    user-select: none;
}
.isc-bar-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: #f3e6dd;
    color: #a35a3b;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.isc-bar-icon svg { width: 15px; height: 15px; }
.isc-bar-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--wb-text, #33302b);
    letter-spacing: .3px;
    white-space: nowrap;
}
.isc-bar-sub {
    font-size: 11px;
    color: var(--wb-muted, #a89f92);
    padding-left: 10px;
    border-left: 1px solid var(--wb-border, #e9e2d5);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 42vw;
}

/* 标题栏里的授权码小胶囊（点一下复制） */
.isc-code {
    font-family: ui-monospace, Menlo, Consolas, monospace;
    font-size: 11.5px;
    letter-spacing: .2px;
    padding: 3px 9px;
    border-radius: 7px;
    border: 1px solid #d9e3d0;
    background: #f3f7ee;
    color: #45632f;
    cursor: pointer;
    flex-shrink: 0;
    line-height: 1.5;
}
.isc-code:hover { background: #e8f0df; border-color: #b6cca0; }

.isc-bar-acts { display: flex; align-items: center; gap: 4px; }
.isc-tbtn {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: var(--wb-text-2, #6f685e);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s ease, color .15s ease;
    flex-shrink: 0;
}
.isc-tbtn:hover { background: #eee7da; color: var(--wb-text, #33302b); }
.isc-tbtn.close:hover { background: #e8d5cb; color: #a35a3b; }
.isc-tbtn svg { width: 15px; height: 15px; }

/* ---------- 内容区（内嵌安装脚本页） ---------- */
.isc-body {
    flex: 1;
    min-height: 0;
    position: relative;
    background: var(--wb-bg, #f4efe6);
}
.isc-frame {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
    background: var(--wb-bg, #f4efe6);
}
.isc-loading {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    font-size: 13px;
    color: var(--wb-muted, #a89f92);
    background: var(--wb-bg, #f4efe6);
    transition: opacity .2s ease;
}
.isc-loading.is-hide { opacity: 0; pointer-events: none; }

/* 右下缩放把手 */
.isc-resize {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize;
    z-index: 2;
}
.isc-resize::after {
    content: '';
    position: absolute;
    right: 4px;
    bottom: 4px;
    width: 7px;
    height: 7px;
    border-right: 2px solid #c9bfae;
    border-bottom: 2px solid #c9bfae;
    border-radius: 0 0 2px 0;
}
.isc-win.max .isc-resize { display: none; }

/* ---------- 安装记录卡片里的「安装脚本」按钮 ---------- */
.is-script-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    height: 27px;
    padding: 0 11px;
    border-radius: 8px;
    border: 1px solid var(--wb-accent, #a35a3b);
    background: var(--wb-accent, #a35a3b);
    color: #fff;
    font-family: inherit;
    font-size: 12px;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.is-script-btn svg { width: 13px; height: 13px; flex-shrink: 0; }
.is-script-btn:hover {
    background: #8e4c31;
    border-color: #8e4c31;
    box-shadow: 0 3px 10px rgba(163, 90, 59, .22);
}
.is-script-btn:active { transform: translateY(1px); }

/* 行内「复制一对」小图标按钮 */
.is-pair-cp {
    width: 27px;
    height: 27px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: 1px solid var(--wb-border-strong);
    background: #fff;
    color: var(--wb-text-2);
    cursor: pointer;
    flex-shrink: 0;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.is-pair-cp svg { width: 13px; height: 13px; }
.is-pair-cp:hover { background: var(--wb-tile); color: var(--wb-text); border-color: #cfc4b1; }
.is-pair-cp[disabled] { opacity: .4; cursor: not-allowed; }
.is-pair-cp[disabled]:hover { background: #fff; color: var(--wb-text-2); border-color: var(--wb-border-strong); }

@media (max-width: 720px) {
    .isc-bar-sub { display: none; }
}
