/* ==========================================================================
   Username personalization widget
   ==========================================================================
   Reusable widget (see includes/username-input.md) that lets readers enter
   their identifier and have it filled into every copy-pasteable command on
   the page. See docs/javascripts/username-personalize.js for the behavior.
   ========================================================================== */

.username-personalize {
    border: 1px solid var(--md-default-fg-color--lightest);
    border-left: 3px solid var(--md-accent-fg-color);
    background: var(--md-default-bg-color);
    border-radius: 4px;
    padding: 0.75rem 1rem;
    margin: 1.25rem 0;
}

.username-personalize > p {
    margin: 0 0 0.5rem;
}

.username-personalize-field {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.username-personalize-field > span {
    font-weight: 600;
    font-size: 0.85rem;
}

.username-personalize-input {
    font-family: var(--md-code-font-family, monospace);
    background: var(--md-code-bg-color);
    color: var(--md-code-fg-color);
    border: 1px solid var(--md-default-fg-color--lighter);
    border-radius: 3px;
    padding: 0.3rem 0.6rem;
    font-size: 0.9rem;
    min-width: 14rem;
}

.username-personalize-input:focus {
    outline: 2px solid var(--md-accent-fg-color);
    outline-offset: 1px;
    border-color: var(--md-accent-fg-color);
}

.username-personalize-note {
    font-size: 0.75rem;
    color: var(--md-default-fg-color--light);
    margin-top: 0.5rem;
}

/* Hide "replace the placeholder with..." hint paragraphs once the reader
   has personalized the page, since the substitution is now self-evident. */
body[data-personalized] .personalize-hint {
    display: none;
}
