/* ghxi-core: KMS 激活工具. Colours follow AeroCore variables, so dark mode works without extra rules. */
.ghxi-kms {
    margin: 0 0 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid var(--border-primary, #e5e6eb);
    color: var(--text-primary, #222);
    font-size: 15px;
}

/* Block spacing lives on the sections: the theme zeroes the top margin of a first-child h2 */
.ghxi-kms > section {
    margin-top: 28px;
}

.ghxi-kms [hidden],
.ghxi-kms:not(.is-ready) .ghxi-kms__js {
    display: none !important;
}

.ghxi-kms h2 {
    margin: 0 0 14px;
    font-size: 18px;
}

.ghxi-kms code {
    font-family: Consolas, Menlo, monospace;
}

.ghxi-kms__server {
    padding: 14px 16px;
    border-radius: 8px;
    background: var(--bg-secondary, #f5f6f8);
    font-size: 16px;
}

.ghxi-kms__server code {
    margin: 0 6px;
    font-weight: 600;
    color: var(--theme-color, #1e88e5);
}

.ghxi-kms__checked {
    margin-left: 8px;
    font-size: 12px;
    color: var(--text-tertiary, #999);
}

.ghxi-kms__server p {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--text-secondary, #666);
}

/* Parent class beats the theme's content button/link styles */
.ghxi-kms .ghxi-kms__copy {
    padding: 2px 10px;
    border: 1px solid var(--theme-color, #1e88e5);
    border-radius: 4px;
    background: transparent;
    color: var(--theme-color, #1e88e5);
    font-size: 13px;
    line-height: 22px;
    cursor: pointer;
    white-space: nowrap;
}

.ghxi-kms .ghxi-kms__copy:hover {
    background: var(--theme-color, #1e88e5);
    color: #fff;
}

.ghxi-kms__gen {
    padding: 16px;
    border: 1px solid var(--border-primary, #e5e6eb);
    border-radius: 8px;
}

.ghxi-kms__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ghxi-kms .ghxi-kms__tabs button {
    flex: 1;
    padding: 8px 0;
    border: 1px solid var(--border-primary, #e5e6eb);
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary, #222);
    font-size: 15px;
    cursor: pointer;
}

.ghxi-kms .ghxi-kms__tabs button[aria-selected="true"] {
    border-color: var(--theme-color, #1e88e5);
    background: var(--theme-color, #1e88e5);
    color: #fff;
}

.ghxi-kms__form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
}

.ghxi-kms__form label {
    display: flex;
    flex: 1 1 200px;
    flex-direction: column;
    gap: 4px;
    font-size: 13px;
    color: var(--text-secondary, #666);
}

.ghxi-kms__form select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid var(--border-input, #d9d9d9);
    border-radius: 6px;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #222);
    font-size: 14px;
}

.ghxi-kms__gen:not([data-product="office"]) .ghxi-kms__office-only {
    display: none;
}

.ghxi-kms__steps {
    margin: 14px 0 10px;
    padding-left: 20px;
    font-size: 14px;
    color: var(--text-secondary, #666);
}

.ghxi-kms__cmd {
    position: relative;
}

.ghxi-kms__cmd pre {
    margin: 0;
    padding: 14px 16px;
    padding-right: 96px;
    border-radius: 6px;
    background: var(--bg-code-block, #1e1e1e);
    color: var(--text-code-block, #e8e8e8);
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-all;
}

.ghxi-kms__cmd pre code {
    padding: 0;
    background: none;
    color: inherit;
}

.ghxi-kms .ghxi-kms__copy--cmd,
.ghxi-kms .ghxi-kms__copy--cmd:hover {
    position: absolute;
    top: 10px;
    right: 10px;
    border-color: var(--theme-color, #1e88e5);
    background: var(--theme-color, #1e88e5);
    color: #fff;
}

.ghxi-kms__note {
    margin: 10px 0 0;
    font-size: 13px;
    color: var(--text-tertiary, #999);
}

.ghxi-kms__search {
    box-sizing: border-box;
    width: 100%;
    margin-bottom: 10px;
    padding: 8px 12px;
    border: 1px solid var(--border-input, #d9d9d9);
    border-radius: 6px;
    background: var(--bg-card, #fff);
    color: var(--text-primary, #222);
    font-size: 14px;
}

.ghxi-kms__table {
    overflow-x: auto;
}

.ghxi-kms__table table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    font-size: 14px;
}

.ghxi-kms__table td,
.ghxi-kms__table th {
    padding: 7px 10px;
    border: 0;
    border-bottom: 1px solid var(--border-secondary, #f0f0f0);
    text-align: left;
}

.ghxi-kms__table td:nth-child(2) {
    white-space: nowrap;
}

.ghxi-kms__table td:last-child {
    width: 1%;
    text-align: right;
}

.ghxi-kms__group th {
    background: var(--bg-secondary, #f5f6f8);
    font-weight: 600;
}

.ghxi-kms__empty {
    padding: 16px 0;
    text-align: center;
    color: var(--text-tertiary, #999);
}

.ghxi-kms__errors details {
    border-bottom: 1px solid var(--border-secondary, #f0f0f0);
}

.ghxi-kms__errors summary {
    padding: 9px 0;
    cursor: pointer;
}

.ghxi-kms__errors summary code {
    margin-right: 6px;
    color: var(--theme-color, #1e88e5);
}

.ghxi-kms__errors details p {
    margin: 0 0 10px 16px;
    font-size: 14px;
    color: var(--text-secondary, #666);
}

@media (max-width: 600px) {
    .ghxi-kms__cmd pre {
        padding-right: 16px;
        padding-top: 44px;
    }
}
