/* Auth pages: CRM skin primary + Privacy/Terms layout (Enthral style) */

.btn-primary,
.btn-primary:not(:disabled):not(.disabled):active,
.show > .btn-primary.dropdown-toggle {
    color: #fff !important;
    background: var(--themePrimary) !important;
    border-color: var(--themePrimary) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary.focus {
    color: #fff !important;
    background: var(--themeDark, var(--themePrimary)) !important;
    border-color: var(--themeDark, var(--themePrimary)) !important;
    box-shadow: none !important;
}

.auth-form a,
.auth-form .link,
a.link,
.auth a:not(.btn):not(.mnt-btn) {
    color: var(--themePrimary) !important;
}

.auth-form a:hover,
.auth-form .link:hover,
a.link:hover {
    color: var(--themeDark, var(--themePrimary)) !important;
}

.custom-control-input:checked ~ .custom-control-label::before {
    background-color: var(--themePrimary) !important;
    border-color: var(--themePrimary) !important;
}

.password-toggle-btn:hover,
.password-toggle-btn:focus {
    color: var(--themePrimary) !important;
}

/* ===== Privacy / Terms (and other non-floated auth): primary header + light page ===== */
/* Overrides body.main-box { background-color: unset } so the page is not filled with primary */
body.main-box:has(> .auth:not(.auth-floated)),
body:has(> .auth:not(.auth-floated)) {
    background-color: #f7f7f7 !important;
    color: #2e2e2e !important;
    color-scheme: light;
}

.auth:not(.auth-floated) {
    background-color: #f7f7f7 !important;
    color: #2e2e2e !important;
    min-height: 100vh;
}

.auth:not(.auth-floated) .auth-header {
    background-color: var(--themePrimary, #2F90C4) !important;
    background-image: none !important;
    color: #fff !important;
    flex: 0 0 auto;
    width: 100%;
}

.auth:not(.auth-floated) .auth-header img {
    filter: invert(1) grayscale(1) brightness(4);
    height: 65px;
    width: auto;
    max-width: 220px;
}

.auth:not(.auth-floated) .auth-form {
    background-color: #fff !important;
    color: #2e2e2e !important;
    box-shadow: 0 0 0 1px rgba(20, 20, 31, 0.05), 0 1px 3px 0 rgba(20, 20, 31, 0.15);
}

.auth:not(.auth-floated) .auth-form label,
.auth:not(.auth-floated) .auth-form .form-group,
.auth:not(.auth-floated) .auth-form p,
.auth:not(.auth-floated) .auth-form .custom-control-label {
    color: #2e2e2e !important;
}

.auth:not(.auth-floated) .auth-form .text-muted {
    color: #6c757d !important;
}

.auth:not(.auth-floated) .auth-form a {
    color: var(--themePrimary, #2F90C4) !important;
}

.auth:not(.auth-floated) footer {
    color: #6c757d !important;
    background: transparent !important;
    max-width: 420px;
    width: 100%;
    padding: 1rem 1.25rem 2rem;
    text-align: center;
}

/* Privacy / Terms: fit viewport, no page scrollbar */
html:has(body.auth-doc-page),
body.auth-doc-page {
    height: 100%;
    max-height: 100vh;
    overflow: hidden !important;
}

body.auth-doc-page {
    background-color: #f7f7f7 !important;
    color: #2e2e2e !important;
    margin: 0;
}

body.auth-doc-page .auth {
    background-color: #f7f7f7 !important;
    height: 100vh;
    max-height: 100vh;
    min-height: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
}

body.auth-doc-page .auth-header {
    background-color: var(--themePrimary, #2F90C4) !important;
    background-image: none !important;
    color: #fff !important;
    flex: 0 0 auto;
    width: 100%;
    margin-bottom: -2rem !important;
    padding: 2.5rem 1.25rem 2.5rem !important;
}

body.auth-doc-page .auth-header img {
    filter: invert(1) grayscale(1) brightness(4);
    height: 52px;
    width: auto;
    max-width: 200px;
}

body.auth-doc-page .auth-form {
    background-color: #fff !important;
    color: #2e2e2e !important;
    box-shadow: 0 0 0 1px rgba(20, 20, 31, 0.05), 0 1px 3px 0 rgba(20, 20, 31, 0.15);
    flex: 0 1 auto;
    max-height: calc(100vh - 10rem);
    overflow: hidden;
    padding: 1.5rem 1.75rem 1rem !important;
    margin: 0 1rem;
}

body.auth-doc-page .auth-form label,
body.auth-doc-page .auth-form .form-group,
body.auth-doc-page .auth-form p {
    color: #2e2e2e !important;
}

body.auth-doc-page .auth-form .form-group {
    margin-bottom: 0.75rem;
}

body.auth-doc-page .auth-form p {
    margin-bottom: 0.65rem;
    font-size: 0.9rem;
    line-height: 1.45;
}

body.auth-doc-page .auth-form a {
    color: var(--themePrimary, #2F90C4) !important;
}

body.auth-doc-page footer {
    color: #6c757d !important;
    background: transparent !important;
    flex: 0 0 auto;
    padding: 0.75rem 1.25rem 1.25rem !important;
    max-width: 420px;
    width: 100%;
    text-align: center;
}
