@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('/_assets/fonts/inter-variable-normal.ttf') format('truetype');
}

@font-face {
    font-family: 'Inter';
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url('/_assets/fonts/inter-variable-italic.ttf') format('truetype');
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: Inter, sans-serif;
    background-color: #fbfcfe;
    color: #1e1f26;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.8;
    background-image: url("/_assets/images/background.png");
    background-position: center;
    background-size: 1066px 410px;
    background-repeat: no-repeat;
}

/* Sticky-footer: centre the card vertically; .main-footer falls to the bottom. */
body > main,
body > .box {
    margin-block: auto;
}

/* <main> wrapper carries the .box width contract so it doesn't collapse to content size. */
body > main {
    width: 100%;
    max-width: 500px;
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        background-image: url("/_assets/images/background@2x.png");
    }
}

.box {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 1px 15px 0 rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 500px;
    min-height: 480px;
    padding: 1.875rem 1.5rem 1rem;
}

@media (min-width: 576px) {
    .box {
        padding: 3.75rem 3rem 2rem;
    }
}

.main-header {
    margin-bottom: 2.75rem;
}

.main-logo {
    display: block;
    height: 37px;
    width: 142px;
    background-size: 142px 37px;
    background-position: center;
    background-repeat: no-repeat;
    background-image: url("/_assets/images/kadence-logo.png");
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .main-logo {
        background-image: url("/_assets/images/kadence-logo@2x.png");
    }
}

h1,
h2 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 2.75rem;
}

.text-muted {
    color: rgba(30, 31, 38, 0.4);
    font-weight: 400;
}

.alert {
    text-align: center;
    width: 100%;
    max-width: 500px;
    padding: 1rem 1.5rem;
    border-radius: 10px 10px 0 0;
    font-size: 0.75rem;
    font-weight: bold;
    color: #ffffff;
    background: linear-gradient(135deg, #e0455d, #ee1881);
}

.form-content {
    flex-grow: 1;
}

.form-group {
    margin-bottom: 1.25rem;
    border-bottom: 1px solid rgba(30, 31, 38, 0.2);
    position: relative;
    transition: border-color 0.15s;
}

.form-group:focus-within {
    border-bottom-color: #ee1881;
}

.form-group label {
    display: block;
    color: rgba(30, 31, 38, 0.4);
    font-size: 0.9rem;
    line-height: 1.15;
    position: absolute;
    top: 0.9rem;
    left: 0;
    transform-origin: left top;
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.15s cubic-bezier(0.4, 0, 0.2, 1),
                top 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.form-group:focus-within label,
.form-group input:not(:placeholder-shown) + label {
    color: #ee1881;
    font-weight: 500;
    top: -0.9rem;
}

.form-group input {
    font-family: Inter, sans-serif;
    width: 100%;
    border: 0;
    background: transparent;
    color: #1e1f26;
    font-size: 0.9rem;
    line-height: 1.8;
    height: 44px;
    padding: 0;
    outline: none;
}

.form-group input:-webkit-autofill,
.form-group input:-webkit-autofill:hover,
.form-group input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1e1f26 !important;
    transition: background-color 5000s ease-in-out 0s;
}

form {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
}

/* MS Teams login description copy. Matches auth's #ms-teams-description
 * rule: keep the body font-size in line with the rest of the page (the
 * inherited 0.9rem already does that) and push 3rem of breathing room
 * between the description and the full-width Sign in button below. */
#ms-teams-description {
    margin-bottom: 3rem;
}

.btn {
    font-family: Inter, sans-serif;
    display: inline-block;
    padding: 0.375rem 1.25rem;
    font-size: 0.9rem;
    font-weight: bold;
    line-height: 1.8;
    border: 0;
    border-radius: 50vw;
    cursor: pointer;
    text-align: center;
    text-decoration: none;
}

.btn-primary {
    background-color: #ee1881;
    color: #ffffff;
}

.btn-primary:hover {
    background-color: #d4156f;
}

.btn-secondary {
    background-color: #f4f4f4;
    color: #1e1f26;
}

.btn-secondary:hover {
    background-color: #e0e0e1;
}

.btn:focus-visible,
.btn-link:focus-visible,
.btn-option:focus-visible {
    outline: 2px solid #ee1881;
    outline-offset: 2px;
}

.btn-group .btn:focus-visible {
    outline: 2px solid #ee1881;
    outline-offset: -2px;
    z-index: 1;
}

.options {
    border: 1px solid rgba(30, 31, 38, 0.1);
    padding: 5px;
    border-radius: 5px;
    overflow-y: auto;
    flex-grow: 1;
    max-height: 240px;
}

.btn-option {
    display: block;
    min-height: 30px;
    line-height: 30px;
    text-decoration: none;
    border-radius: 4px;
    background: transparent;
    padding: 0 25px 0 5px;
    cursor: pointer;
    margin-bottom: 5px;
    font-size: 0.95rem;
    position: relative;
    color: #ee1881;
}

.btn-option:last-child {
    margin-bottom: 0;
}

.btn-option::after {
    content: "\203A";
    position: absolute;
    top: 50%;
    right: 8px;
    margin-top: -15px;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: right;
    color: #ee1881;
    font-size: 1.2rem;
}

.btn-option:hover {
    background: rgba(30, 31, 38, 0.05);
    color: #ee1881;
}

.login-or {
    color: rgba(30, 31, 38, 0.4);
    margin: 0.5rem 0;
    padding: 0.5rem 0;
    position: relative;
    text-align: center;
}

.span-or {
    position: absolute;
    left: 50%;
    top: 50%;
    background-color: #ffffff;
    font-size: 0.8rem;
    padding: 0 1rem;
    transform: translate(-50%, -50%);
    white-space: nowrap;
    text-transform: uppercase;
}

.hr-or {
    border: none;
    border-top: 1px solid rgba(30, 31, 38, 0.2);
    margin: 1rem 0;
}

.btn-group {
    display: flex;
    background-color: #f0f0f0;
    border-radius: 50vw;
    overflow: hidden;
}

.btn-group .btn {
    flex: 1;
    width: auto;
    border-radius: 0;
    padding: 0.6rem 0.45rem;
    background-color: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-group .btn:hover {
    background-color: rgba(30, 31, 38, 0.08);
}

.btn-group .btn img {
    display: block;
}

.login-sso-other {
    text-align: center;
    margin: 1rem 0 2rem;
    padding: 0.375rem 0;
}

.login-sso-other a {
    color: #697480;
    text-decoration: underline;
    font-size: 0.875rem;
    font-weight: 700;
}

.login-sso-other a:hover {
    color: #4a525c;
}

.btn-link {
    background: none;
    border: none;
    color: #ee1881;
    cursor: pointer;
    font-family: Inter, sans-serif;
    font-size: 0.85rem;
    text-decoration: underline;
    padding: 0;
}

.btn-link:hover {
    color: #d4156f;
}

.signup {
    width: 100%;
    font-size: 0.7rem;
    text-align: center;
    margin-top: 1.4rem;
    color: rgba(30, 31, 38, 0.4);
}

.signup p {
    margin: 0;
    line-height: 1.5;
}

/* External-link arrow rendered next to anchors whose href leaves the
 * Kadence surface (Sign up, Book a demo, Privacy policy, Terms). Glyph
 * is Font Awesome's regular external-link icon (canonical name
 * `arrow-up-right-from-square`), rendered via mask-image so the visible
 * shape picks up the parent link's text colour. Auto-scales with the
 * surrounding font-size via em units, with a small left margin so it
 * doesn't crash into the preceding word. */
.ext-icon {
    display: inline-block;
    width: 0.75em;
    height: 0.75em;
    vertical-align: -0.05em;
    margin-left: 0.15em;
    background-color: currentColor;
    -webkit-mask: url("/_assets/images/external-link.svg") no-repeat center / contain;
            mask: url("/_assets/images/external-link.svg") no-repeat center / contain;
}

.signup a {
    color: rgba(30, 31, 38, 0.4);
    text-decoration: underline;
}

.signup a:hover {
    color: rgba(30, 31, 38, 0.6);
}

/* Sign-up modal. Native <dialog> styled to match auth-server's
 * #signupModal: cream card on a gray-tinted backdrop, header/footer
 * delineated by box-shadow rather than borders. The dialog defaults
 * (1px solid border, no padding, transparent background) are reset
 * below; .signup-modal-content holds the visual chrome. */
.signup-modal {
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    border: 0;
    padding: 0;
    background: transparent;
    max-width: 37.5rem;
    width: calc(100% - 2rem);
    /* The universal `* { margin: 0 }` reset above kills the user-agent
     * margin:auto that browsers use to center a `<dialog>:modal` in its
     * containing block. Restore it explicitly. */
    margin: auto;

    /* Bootstrap-modal-style entry/exit: dialog slides down from a -50px
     * offset and fades in; backdrop fades from transparent to its target
     * shade. `transition-behavior: allow-discrete` lets `display: none`
     * and the top-layer `overlay` property animate alongside opacity so
     * the dialog stays painted during the exit transition. Older browsers
     * without @starting-style / discrete-transition support get an
     * instant open/close — graceful degradation. */
    opacity: 1;
    transform: translateY(0);
    transition:
        opacity 0.3s ease-out,
        transform 0.3s ease-out,
        display 0.3s ease-out allow-discrete,
        overlay 0.3s ease-out allow-discrete;
}

.signup-modal:not([open]) {
    opacity: 0;
    transform: translateY(-50px);
}

@starting-style {
    .signup-modal[open] {
        opacity: 0;
        transform: translateY(-50px);
    }
}

.signup-modal::backdrop {
    background-color: rgba(30, 31, 38, 0.75);
    transition:
        background-color 0.3s ease-out,
        display 0.3s ease-out allow-discrete,
        overlay 0.3s ease-out allow-discrete;
}

@starting-style {
    .signup-modal[open]::backdrop {
        background-color: rgba(30, 31, 38, 0);
    }
}

.signup-modal:not([open])::backdrop {
    background-color: rgba(30, 31, 38, 0);
}

.signup-modal-content {
    background-color: #fbfcfe;
    border-radius: 0.625rem;
    display: flex;
    flex-direction: column;
}

.signup-modal-header,
.signup-modal-footer {
    box-shadow: 0 1px 15px 0 rgba(0, 0, 0, 0.1);
    padding: 1rem 2rem;
}

.signup-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1;
    margin: 0;
}

.signup-modal-body {
    padding: 2rem;
    font-size: 1rem;
    line-height: 1.5;
}

.signup-modal-body p {
    margin-bottom: 1rem;
}

.signup-modal-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.signup-modal-footer > * {
    margin: 0.25rem;
}

/* Page-level footer rendered below the .box card on every public page.
 * Mirrors auth-server's main-footer treatment: centered, small text,
 * dark-gray copy with same-color links. The two anchors carry external
 * icons inline via the {icon} ICU placeholder; no further styling needed
 * on .ext-icon since it inherits the link colour. */
.main-footer {
    margin-top: 1rem;
    text-align: center;
    color: #1e1f26;
    font-size: 0.875rem;
}

.main-footer p {
    margin: 0;
    line-height: 1.6;
}

.main-footer a {
    color: #1e1f26;
    text-decoration: underline;
}

.main-footer a:hover {
    color: #000000;
}

/* Loading spinner shown in place of an SSO icon (or other action
 * button content) once the user has triggered a redirect that takes
 * more than a frame to begin. Glyph is Font Awesome's solid spinner
 * (8-dot wheel) — same icon auth-server renders via FA Pro. Pulling
 * the full FA bundle for one icon would cost ~1 MB; instead the SVG
 * path lives in /static/images/spinner.svg and is rendered here as a
 * mask so the box's background-color becomes the visible icon. With
 * `background-color: currentColor`, the spinner picks up whatever
 * text colour the parent button has — works on the dark-icon SSO
 * buttons and the pink primary button alike. Timing matches FA's
 * .fa-spin: 2s linear infinite. */
.button-loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    vertical-align: middle;
    background-color: currentColor;
    -webkit-mask: url("/_assets/images/spinner.svg") no-repeat center / contain;
            mask: url("/_assets/images/spinner.svg") no-repeat center / contain;
    animation: button-loading-spinner-rotation 2s linear infinite;
}

@keyframes button-loading-spinner-rotation {
    to { transform: rotate(360deg); }
}
