/* Shared settings-form design system (issue #167; globalized in #273).
   These `.settings-*` primitives are used by several admin panels
   (SiteSettingsPanel, EmailPluginSettingsDialog, EnablePushButton).
   They live here — global, not scoped to one component — so every panel renders
   the same regardless of component boundaries. Leans on hud-theme.css tokens. */

.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 24px;
    margin-top: 14px;
}

/* The accent field spans the row so the picker + preview have room. */
.settings-grid > .settings-field:last-child {
    grid-column: 1 / -1;
}

.settings-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.settings-label {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-3, #6f747d);
}

.settings-input {
    background: var(--bg-2, rgba(255, 255, 255, 0.03));
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    border-radius: 2px;
    color: var(--text-1, #e8eaed);
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 13px;
    padding: 9px 10px;
    width: 100%;
    box-sizing: border-box;
}

.settings-input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent-soft);
}

.settings-hint {
    font-size: 11px;
    color: var(--text-3, #6b7079);
    line-height: 1.4;
}

.settings-accent {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.settings-swatch {
    width: 44px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--line, rgba(255, 255, 255, 0.12));
    border-radius: 2px;
    background: transparent;
    cursor: pointer;
}

.settings-hex {
    width: 110px;
    flex: 0 0 auto;
    text-transform: lowercase;
}

.settings-accent-preview {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.12em;
    padding: 7px 14px;
    border: 1px solid;
    border-radius: 2px;
}

.settings-actions {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 640px) {
    .settings-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Section divider between concerns within a panel. */
.settings-section {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--line, rgba(255, 255, 255, 0.12));
}

.settings-sublabel {
    margin-top: 14px;
}

.settings-linkrow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) auto;
    gap: 8px;
    align-items: center;
}

.settings-linkactions {
    margin-top: 4px;
}

.settings-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-2, #c8ccd2);
    cursor: pointer;
}

.mud-dialog.hud-dialog .plugin-email-settings {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
}

@media (max-width: 640px) {
    .settings-linkrow {
        grid-template-columns: minmax(0, 1fr) auto;
    }
}

/* #358: unpinned-issuer security reminder (Admin console). An amber NUDGE — not a
   red alarm — since relaxed is a valid first-run state. Uses the semantic
   degraded/amber token for the accent, independent of the brand accent. */
.issuer-banner {
    display: flex;
    align-items: flex-start;
    gap: var(--s-3, 12px);
    padding: var(--s-4, 16px);
    margin-bottom: var(--s-5, 24px);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-left: 3px solid var(--status-degraded, #f59e0b);
    border-radius: 4px;
    background:
        linear-gradient(rgba(245, 158, 11, 0.06), rgba(245, 158, 11, 0.06)),
        var(--bg-2, rgba(255, 255, 255, 0.022));
}

.issuer-banner-glyph {
    color: var(--status-degraded, #f59e0b);
    font-size: 18px;
    line-height: 1.4;
    flex: 0 0 auto;
}

.issuer-banner-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1 1 auto;
}

.issuer-banner-title {
    font-weight: 600;
    color: var(--text-1, #e8e9ec);
    letter-spacing: 0.02em;
}

.issuer-banner-text {
    color: var(--text-2, #a7abb3);
    font-size: 12px;
    line-height: 1.5;
}

.issuer-banner-action {
    flex: 0 0 auto;
    white-space: nowrap;
    align-self: center;
}

@media (max-width: 640px) {
    .issuer-banner {
        flex-wrap: wrap;
    }
    .issuer-banner-action {
        width: 100%;
        align-self: stretch;
    }
}
