/* Copied from Aiva's Cloud web app (wwwroot/app.css): the agent login wizard and runtime account rows. */

/* Wizard step loaders sit beside the step's own title and description and keep the
   container's accent colour rather than Qui's muted default. */
.loading-indicator.aiva-wizard-step-loader {
    color: inherit;
}

.settings-copy-button {
    display: inline-flex;
    min-width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    border: 0.5px solid var(--shell-border);
    border-radius: 6px;
    background: var(--shell-bg-surface);
    color: var(--shell-text-secondary);
    cursor: var(--pointer, pointer);
    font: inherit;
    font-size: 0.8125rem;
    font-weight: 520;
    line-height: 1rem;
    transition:
        background-color 0.16s ease,
        border-color 0.16s ease,
        color 0.16s ease;
}

.settings-copy-button:hover,
.settings-copy-button:focus-visible {
    border-color: var(--shell-border-strong, var(--shell-border));
    background: var(--shell-bg-active);
    color: var(--shell-text-primary);
    outline: none;
}

.settings-copy-button:disabled {
    cursor: default;
    opacity: 0.45;
}

.settings-copy-button[data-aiva-copy-state="copied"] {
    border-color: color-mix(in srgb, var(--toast-success-color, #26a269) 45%, var(--shell-border));
    color: var(--toast-success-color, #26a269);
}

.settings-copy-button[data-aiva-copy-state="failed"] {
    border-color: color-mix(in srgb, #b42318 45%, var(--shell-border));
    color: #b42318;
}

.settings-agent-login-copy-button {
    flex: 0 0 auto;
    width: 32px;
    padding: 0;
}

.settings-agent-login-step {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 14px;
}

.settings-agent-login-callout,
.settings-agent-login-success {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 0.5px solid var(--shell-border);
    border-radius: 8px;
    background: var(--shell-bg-surface);
}

.settings-agent-login-callout__icon,
.settings-agent-login-success__icon {
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border: 0.5px solid var(--shell-border);
    border-radius: 8px;
    background: var(--shell-bg-active);
    color: var(--shell-accent);
}

.settings-agent-login-success__icon {
    color: var(--shell-success-text, #26b36a);
}

.settings-agent-login-callout strong,
.settings-agent-login-success strong {
    display: block;
    margin: 0 0 3px;
    color: var(--shell-text-primary);
    font-size: 0.875rem;
    font-weight: 560;
    line-height: 1.25rem;
}

.settings-agent-login-callout p,
.settings-agent-login-success span,
.settings-agent-login-notes p {
    margin: 0;
    color: var(--shell-text-secondary);
    font-size: 0.8125rem;
    font-weight: 450;
    line-height: 1.25rem;
}

.settings-agent-login-notes {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

.settings-agent-login-loading {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--shell-accent);
}

.settings-agent-login-loading > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.settings-agent-login-loading strong {
    color: var(--shell-text-primary);
    font-size: 0.875rem;
    font-weight: 560;
    line-height: 1.25rem;
}

.settings-agent-login-loading span {
    color: var(--shell-text-secondary);
    font-size: 0.75rem;
    font-weight: 450;
    line-height: 1rem;
}

.settings-agent-login-code {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 16px;
}

.settings-agent-login-code > .button {
    align-self: flex-start;
}

.settings-agent-login-device-code {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 0.5px solid var(--shell-border);
    border-radius: 8px;
    background: var(--shell-bg-surface);
}

.settings-agent-login-device-code > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 4px;
}

.settings-agent-login-device-code span {
    color: var(--shell-text-secondary);
    font-size: 0.75rem;
    font-weight: 520;
    line-height: 1rem;
}

.settings-agent-login-device-code strong {
    color: var(--shell-text-primary);
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace);
    font-size: 1rem;
    font-weight: 560;
    letter-spacing: 0.02em;
    line-height: 1.25rem;
}

.settings-agent-login-summary {
    margin-top: 0;
}

.settings-agent-login-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.settings-claude-login-step {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 14px;
}

.settings-claude-login-callout,
.settings-claude-login-success {
    display: flex;
    min-width: 0;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border: 0.5px solid var(--shell-border);
    border-radius: 8px;
    background: var(--shell-bg-surface);
}

.settings-claude-login-callout__icon,
.settings-claude-login-success__icon {
    display: inline-grid;
    width: 32px;
    height: 32px;
    flex: 0 0 auto;
    place-items: center;
    border: 0.5px solid var(--shell-border);
    border-radius: 8px;
    background: var(--shell-bg-active);
    color: var(--shell-accent);
}

.settings-claude-login-success__icon {
    color: var(--shell-success-text, #26b36a);
}

.settings-claude-login-callout strong,
.settings-claude-login-success strong {
    display: block;
    margin: 0 0 3px;
    color: var(--shell-text-primary);
    font-size: 0.875rem;
    font-weight: 560;
    line-height: 1.25rem;
}

.settings-claude-login-callout p,
.settings-claude-login-success span,
.settings-claude-login-notes p {
    margin: 0;
    color: var(--shell-text-secondary);
    font-size: 0.8125rem;
    font-weight: 450;
    line-height: 1.25rem;
}

.settings-claude-login-notes {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

.settings-claude-login-loading {
    display: flex;
    min-height: 180px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--shell-accent);
}

.settings-claude-login-loading > div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 3px;
}

.settings-claude-login-loading strong {
    color: var(--shell-text-primary);
    font-size: 0.875rem;
    font-weight: 560;
    line-height: 1.25rem;
}

.settings-claude-login-loading span {
    color: var(--shell-text-secondary);
    font-size: 0.75rem;
    font-weight: 450;
    line-height: 1rem;
}

.settings-claude-login-code {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 16px;
}

.settings-claude-login-code > .button {
    align-self: flex-start;
}

.settings-claude-login-summary {
    margin-top: 0;
}

.aiva-inbox-detail__summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    max-width: 820px;
    margin-top: 34px;
    border: 0.5px solid var(--shell-border);
    border-radius: 10px;
    background: color-mix(in srgb, var(--shell-bg-active) 74%, transparent);
}

.aiva-inbox-detail__summary div {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 5px;
    padding: 13px 15px 14px;
}

.aiva-inbox-detail__summary div + div {
    border-left: 0.5px solid var(--shell-border);
}

.aiva-inbox-detail__summary span {
    color: var(--shell-text-secondary);
    font-size: 0.6875rem;
    font-weight: 500;
    line-height: 0.9375rem;
}

.aiva-inbox-detail__summary strong {
    overflow: hidden;
    color: var(--shell-text-primary);
    font-size: 0.8125rem;
    font-weight: 520;
    line-height: 1.125rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aiva-inbox-detail__summary.aiva-session-auto-pr-preview__metrics {
    width: 100%;
    max-width: none;
    margin: 0;
}

.aiva-create-session-hint,
.aiva-create-session-empty {
    margin: 0;
    color: var(--shell-text-secondary);
    font-size: 0.8125rem;
    line-height: 1.25rem;
}

.aiva-create-session-field__hint {
    margin: 0;
    color: var(--shell-text-secondary);
    font-size: 0.8125rem;
    line-height: 1.25rem;
}

.aiva-create-session-field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
}

.aiva-create-session-field-row {
    display: grid;
    min-width: 0;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.aiva-create-session-field__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--shell-text-primary);
    font-size: 0.75rem;
    font-weight: 560;
    line-height: 1rem;
}

.aiva-create-session-field .selection-dropdown,
.aiva-create-session-field .selection-dropdown__anchor {
    width: 100%;
    min-width: 0;
}

@media (max-width: 720px) {
    .settings-instance-api-key-secret {
        grid-template-columns: minmax(0, 1fr);
    }

    .aiva-create-session-field-row {
        grid-template-columns: minmax(0, 1fr);
    }

    .aiva-inbox-detail {
        padding: 24px 18px 34px;
    }

    .aiva-inbox-detail__summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aiva-inbox-detail__summary div:nth-child(3) {
        border-top: 0.5px solid var(--shell-border);
        border-left: 0;
    }

    .aiva-inbox-detail__summary div:nth-child(4) {
        border-top: 0.5px solid var(--shell-border);
    }

}
