/*
 * DOAP Identity presentation overrides.
 * Authentication and OIDC behavior are untouched.
 */

/*
 * Remove all visible upstream Authelia attribution.
 */
a[href*="authelia" i],
a[href*="www.authelia.com" i],
a[href*="github.com/authelia" i] {
    display: none !important;
}

/*
 * Some Authelia builds wrap attribution in a footer container.
 * Once the attribution link is hidden, collapse an otherwise-empty
 * footer/wrapper as well.
 */
footer:has(a[href*="authelia" i]),
[class*="footer" i]:has(a[href*="authelia" i]) {
    display: none !important;
}

/* DOAP_IDENTITY_MONO_THEME_V1_BEGIN
 *
 * Match the black/white DOAP Workspace / Nextcloud presentation.
 * Authentication and OIDC behavior are untouched.
 */

html,
body,
#root {
    background: #000 !important;
    color: #f5f5f5 !important;
    color-scheme: dark;
}

/* General typography */
body,
.MuiTypography-root,
.MuiFormControlLabel-label {
    color: #f5f5f5 !important;
}

/* Links */
a,
.MuiLink-root {
    color: #e8e8e8 !important;
    text-decoration-color: #777 !important;
}

a:hover,
a:focus-visible,
.MuiLink-root:hover,
.MuiLink-root:focus-visible {
    color: #fff !important;
    text-decoration-color: #fff !important;
}

/* Input surfaces */
.MuiOutlinedInput-root {
    background: #141414 !important;
    color: #fff !important;
}

.MuiOutlinedInput-root .MuiOutlinedInput-notchedOutline {
    border-color: #666 !important;
}

.MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline {
    border-color: #999 !important;
}

.MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
    border-color: #fff !important;
    border-width: 2px !important;
}

.MuiInputBase-input {
    color: #fff !important;
    caret-color: #fff !important;
}

.MuiInputBase-input::placeholder {
    color: #999 !important;
    opacity: 1 !important;
}

/* Floating labels */
.MuiInputLabel-root {
    color: #aaa !important;
}

.MuiInputLabel-root.Mui-focused {
    color: #fff !important;
}

/* Helper/error-neutral text */
.MuiFormHelperText-root {
    color: #aaa !important;
}

/* Checkbox */
.MuiCheckbox-root {
    color: #aaa !important;
}

.MuiCheckbox-root.Mui-checked {
    color: #fff !important;
}

input[type="checkbox"] {
    accent-color: #fff;
}

/* Primary Sign In button */
button[type="submit"],
.MuiButton-containedPrimary {
    background: #f5f5f5 !important;
    border-color: #f5f5f5 !important;
    color: #000 !important;
    box-shadow: none !important;
}

button[type="submit"]:hover,
button[type="submit"]:focus-visible,
.MuiButton-containedPrimary:hover,
.MuiButton-containedPrimary:focus-visible {
    background: #fff !important;
    border-color: #fff !important;
    color: #000 !important;
    box-shadow: none !important;
}

/* Icon buttons remain neutral */
.MuiIconButton-root {
    color: #eee !important;
}

/* Keyboard focus */
*:focus-visible {
    outline-color: #fff !important;
}

/* DOAP_IDENTITY_MONO_THEME_V1_END */

/* DOAP_IDENTITY_SIGNUP_LINK_V1 */
#doap-create-account {
    margin-top: 12px;
    text-align: center;
    font-size: 1rem;
}

#doap-create-account a {
    color: #f2f2f2;
    text-decoration: none;
}

#doap-create-account a:hover,
#doap-create-account a:focus-visible {
    text-decoration: underline;
}

/* DOAP_IDENTITY_SIGNUP_LINK_V2 */
#doap-create-account {
    width: 100%;
    margin-top: 10px;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}

#doap-create-account a {
    color: #f2f2f2 !important;
    text-decoration: none !important;
}

#doap-create-account a:hover,
#doap-create-account a:focus {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* DOAP_IDENTITY_SIGNUP_LINK_V2 */
#doap-create-account {
    width: 100%;
    margin-top: 10px;
    text-align: center;
    font-size: 16px;
    line-height: 1.5;
}

#doap-create-account a {
    color: #f2f2f2 !important;
    text-decoration: none !important;
}

#doap-create-account a:hover,
#doap-create-account a:focus {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* DOAP_IDENTITY_SIGNUP_VISIBILITY_V3
 * Let the active Authelia theme provide the foreground color.
 * This avoids white-on-white when the signup row is rendered
 * inside a light login card.
 */
#doap-create-account,
#doap-create-account a {
    color: inherit !important;
}

#doap-create-account a {
    opacity: 0.92;
    text-decoration: none !important;
}

#doap-create-account a:hover,
#doap-create-account a:focus-visible {
    opacity: 1;
    text-decoration: underline !important;
}
/* DOAP_IDENTITY_SIGNUP_VISIBILITY_V3_END */
