/* cache-bump 2026-09-03b: fresh ?v so Cloudflare fetches new from origin */
/* AMMER theme — matches the existing Custodial Platform login page.
   Own class names throughout (not the base theme's kcXxx classes) so this
   doesn't depend on guessing base-theme internals correctly. */

:root {
    --ammer-bg: #f5f5f5;
    --ammer-card-bg: #ffffff;
    --ammer-text: #161616;
    --ammer-text-muted: #6b6b6b;
    --ammer-input-bg: #f0f0f0;
    --ammer-input-placeholder: #9a9a9a;
    --ammer-black: #161616;
    --ammer-border-radius-card: 20px;
    --ammer-border-radius-input: 12px;
    --ammer-border-radius-pill: 999px;
    --ammer-font: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--ammer-bg);
    font-family: var(--ammer-font);
    color: var(--ammer-text);
    min-height: 100vh;
}

.ammer-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ---------- top bar ---------- */

.ammer-topbar {
    background: #ffffff;
    border-bottom: 1px solid #ececec;
    padding: 18px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.ammer-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ammer-text);
    text-decoration: none;
}

.ammer-logo svg {
    display: block;
}

.ammer-topbar-action {
    background: var(--ammer-black);
    color: #ffffff;
    border: none;
    border-radius: var(--ammer-border-radius-pill);
    padding: 12px 22px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
}

.ammer-topbar-action:hover {
    opacity: 0.85;
}

/* ---------- centered card ---------- */

.ammer-content {
    flex: 1;
    display: flex;
    justify-content: center;
    padding: 90px 20px 40px;
}

.ammer-card {
    background: var(--ammer-card-bg);
    border-radius: var(--ammer-border-radius-card);
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.06);
    padding: 40px;
    width: 100%;
    max-width: 460px;
    height: fit-content;
}

/* small context pill, e.g. country/region or step indicator */
.ammer-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--ammer-input-bg);
    border-radius: var(--ammer-border-radius-pill);
    padding: 6px 16px 6px 6px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 24px;
}

.ammer-badge-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--ammer-black);
    color: #ffffff;
    font-size: 13px;
    font-weight: 800;
}

/* Swiss flag variant - used specifically for the country/region badge on
   Login and Sign Up, matching the real reference design. The generic dark
   .ammer-badge-icon above is for badges invented for this flow's custom
   pages (email verification, secure sign-in, pending review), which have
   no real-world reference to match. */
.ammer-badge-icon-swiss {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d52b1e;
    position: relative;
    flex-shrink: 0;
}

.ammer-badge-icon-swiss::before,
.ammer-badge-icon-swiss::after {
    content: "";
    position: absolute;
    background: #ffffff;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.ammer-badge-icon-swiss::before {
    width: 55%;
    height: 18%;
}

.ammer-badge-icon-swiss::after {
    width: 18%;
    height: 55%;
}

.ammer-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 0 0 28px;
}

.ammer-title {
    font-size: 26px;
    font-weight: 800;
    margin: 0;
    color: var(--ammer-text);
}

/* Platform flag, pinned to the far right of the title row (no label). */
.ammer-platform-flag {
    width: 28px;
    height: 28px;
    flex: 0 0 28px;
    display: block;
}

/* ---------- form ---------- */

.ammer-form-group {
    margin-bottom: 20px;
}

.ammer-label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--ammer-text);
}

.ammer-input {
    width: 100%;
    background: var(--ammer-input-bg);
    border: none;
    border-radius: var(--ammer-border-radius-input);
    padding: 14px 16px;
    font-size: 15px;
    font-family: var(--ammer-font);
    color: var(--ammer-text);
}

.ammer-input::placeholder {
    color: var(--ammer-input-placeholder);
}

.ammer-input:focus {
    outline: 2px solid var(--ammer-black);
    outline-offset: 1px;
}

.ammer-secondary-link {
    display: block;
    margin-top: 10px;
    font-size: 13px;
    color: var(--ammer-text);
    text-decoration: none;
}

.ammer-secondary-link:hover {
    text-decoration: underline;
}

/* ---------- buttons ---------- */

.ammer-btn-primary {
    display: block;
    width: 100%;
    background: var(--ammer-black);
    color: #ffffff;
    border: none;
    border-radius: var(--ammer-border-radius-pill);
    padding: 16px;
    font-size: 15px;
    font-weight: 700;
    font-family: var(--ammer-font);
    cursor: pointer;
    margin-top: 28px;
    text-align: center;
    text-decoration: none;
}

.ammer-btn-primary:hover {
    opacity: 0.9;
}

.ammer-btn-primary[disabled] {
    background: var(--ammer-input-bg);
    color: var(--ammer-text-muted);
    cursor: not-allowed;
}

.ammer-btn-secondary {
    display: block;
    width: 100%;
    background: transparent;
    color: var(--ammer-text);
    border: 1px solid #e2e2e2;
    border-radius: var(--ammer-border-radius-pill);
    padding: 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: var(--ammer-font);
    cursor: pointer;
    margin-top: 12px;
    text-align: center;
}

/* Buttons that carry inline icons alongside text (e.g. Choose Method) -
   overrides the plain-text centering above; must come after it in the
   stylesheet since both are single-class selectors of equal specificity. */
.ammer-btn-icon-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
}

.ammer-btn-icon-row svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Badge icons now hold an SVG instead of an emoji character - size it to
   fit the circle with a little breathing room. */
.ammer-badge-icon svg {
    width: 14px;
    height: 14px;
}

/* ---------- footer line under the primary action ---------- */

.ammer-footer-line {
    text-align: center;
    margin-top: 20px;
    font-size: 13px;
    color: var(--ammer-text-muted);
}

.ammer-footer-line a {
    color: var(--ammer-text);
    font-weight: 700;
    text-decoration: none;
    margin-left: 4px;
}

.ammer-footer-line a:hover {
    text-decoration: underline;
}

/* ---------- alerts ---------- */

.ammer-alert {
    border-radius: 12px;
    padding: 12px 16px;
    font-size: 13px;
    margin-bottom: 20px;
}

.ammer-alert-error {
    background: #fdeceb;
    color: #b3261e;
}

.ammer-alert-success {
    background: #eaf7ee;
    color: #1e7a34;
}

.ammer-alert-warning {
    background: #fff6e5;
    color: #8a5a00;
}

.ammer-alert-info {
    background: #eef2fb;
    color: #2c4a9e;
}

/* ---------- page footer ---------- */

.ammer-page-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 20px;
    font-size: 12px;
    color: var(--ammer-text-muted);
}

/* Restart-login row rendered by template.ftl's show-username block, on the
   steps where Keycloak already knows who is signing in. */
.ammer-attempted-username {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 18px;
    font-size: 13px;
    color: var(--ammer-text-muted);
}

.ammer-attempted-username a {
    color: var(--ammer-text);
    text-decoration: none;
    white-space: nowrap;
}

.ammer-attempted-username a:hover {
    text-decoration: underline;
}

/* ---------- bridges for base-theme markup ---------- */

/* The passkey control on the built-in login page is an <a>, not a <button>,
   so it needs the link defaults stripped to sit next to Sign In as a button. */
a.ammer-btn-secondary,
a.ammer-btn-primary {
    text-decoration: none;
    text-align: center;
}

.ammer-margin-top {
    margin-top: 10px;
}

/* base renders <label>…</label><span class="required">*</span> as siblings.
   Without this the block-level label puts the asterisk on its own line. */
.ammer-label-row {
    display: flex;
    align-items: baseline;
    gap: 5px;
    /* The label and its aside must never wrap onto separate lines. */
    flex-wrap: nowrap;
}

/* "(Forgot Password?)" next to the Password label: same size and weight as
   the label itself, and never wrapped. Deliberately its own class rather
   than kcFormOptionsWrapperClass, which 14 built-in pages use for their
   "Back to Login" block and would be dragged along with it. */
.ammer-label-aside {
    flex: 0 0 auto;
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    color: var(--ammer-text);
    opacity: 0.85;
}

.ammer-label-aside a {
    color: inherit;
    text-decoration: underline;
}

.ammer-label-aside a:hover {
    text-decoration: none;
}

.ammer-label-row .required {
    color: var(--ammer-text);
    font-size: 13px;
    line-height: 1;
}

.ammer-input-wrap {
    display: block;
}

/* ---------- password show/hide toggle ---------- */

.ammer-input-group {
    position: relative;
    display: block;
}

.ammer-input-group .ammer-input {
    padding-right: 42px;
}

.ammer-password-toggle {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    background: none;
    border: 0;
    cursor: pointer;
}

.ammer-eye,
.ammer-eye-off {
    display: block;
    width: 18px;
    height: 18px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: 18px 18px;
    opacity: .6;
}

.ammer-password-toggle:hover .ammer-eye,
.ammer-password-toggle:hover .ammer-eye-off {
    opacity: 1;
}

.ammer-eye {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M1.8 12S5.4 5.8 12 5.8 22.2 12 22.2 12 18.6 18.2 12 18.2 1.8 12 1.8 12Z'/><circle cx='12' cy='12' r='3.1'/></svg>");
}

.ammer-eye-off {
    background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'><path d='M1.8 12S5.4 5.8 12 5.8 22.2 12 22.2 12 18.6 18.2 12 18.2 1.8 12 1.8 12Z'/><circle cx='12' cy='12' r='3.1'/><line x1='3.5' y1='3.5' x2='20.5' y2='20.5'/></svg>");
}

/* ---------- social sign-in buttons ---------- */

.ammer-social {
    margin-top: 14px;
}

/* "Or sign in with", as a rule with the label sitting in it. */
.ammer-social-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 12px;
    font-size: 12px;
    color: var(--ammer-text-muted);
}

.ammer-social-divider::before,
.ammer-social-divider::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #e2e2e2;
}

.ammer-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 8px;
}

.ammer-social-logo {
    display: inline-flex;
    align-items: center;
    line-height: 0;
}

.ammer-social-logo svg {
    display: block;
}


/* "Choose a different sign-in method" on the credential setup pages. */
.ammer-choose-again {
    display: block;
    margin-top: 20px;
    text-align: center;
}
