/* assets/frontend/forms.css – frontend forms (login, password, registration, member account).

   Neutral look that works with any theme: font and text colour come from the theme, everything else
   has calm defaults. Sites adapt the look with CSS custom properties, e.g. in
   Appearance → Customize → Additional CSS:

   :root {
       --ac-accent: #005d8f;          buttons, active tab, focus, info messages
       --ac-accent-contrast: #fff;    text on accent-coloured buttons
       --ac-text: inherit;            text colour of the forms
       --ac-font-size: inherit;       base font size of the forms
       --ac-label-color: inherit;
       --ac-label-weight: 600;
       --ac-required: #d63638;        marker "*" after labels of required fields
       --ac-required-marker: " *";    "" hides the marker
       --ac-muted: #646970;           hints and secondary text
       --ac-border: #8c8f94;          input borders
       --ac-line: #dcdcde;            separator lines (tabs)
       --ac-radius: 3px;              input and button corners
       --ac-input-height: auto;
       --ac-input-shadow: none;       e.g. inset 0 0 0 1px #e5e5e5 (soft inner line)
       --ac-focus-outline: 2px solid var(--ac-accent);   focused input; "none" to switch it off
       --ac-focus-shadow: var(--ac-input-shadow);        focused input, e.g. inset 0 0 0 1px rgba(0,0,0,.1)
       --ac-button-font-size: inherit;
       --ac-button-weight: 600;
       --ac-button-transform: none;   e.g. uppercase
       --ac-button-padding: 0.6em 1.4em;
       --ac-form-margin: 0;           login, registration, password: "0 auto" centres the form
       --ac-account-margin: 0;        member account: "0 auto" centres it
   }

   Every value has a fallback, so nothing has to be set. Links always keep the theme's link style; to
   change them, use a selector, e.g. .ac-form a:not(.ac-button):not(.ac-tab), .ac-form .ac-link-button { color: … } */

.ac-form {
    max-width: 480px;
    margin: var(--ac-form-margin, 0);
    color: var(--ac-text, inherit);
    font-size: var(--ac-font-size, inherit);
}

.ac-form form {
    margin: 0;
}

.ac-form .ac-field {
    margin: 0 0 1em;
}

.ac-form .ac-field label {
    display: block;
    margin-bottom: 0.3em;
    color: var(--ac-label-color, inherit);
    font-weight: var(--ac-label-weight, 600);
}

/* Required fields: marker after the label (all inputs with the required attribute) */
.ac-form .ac-field:has(> input[required]) > label::after {
    content: var(--ac-required-marker, " *");
    color: var(--ac-required, #d63638);
}

.ac-form .ac-field--checkbox label {
    display: inline-flex;
    gap: 0.5em;
    align-items: flex-start;
    font-weight: normal;
}

.ac-form .ac-field--checkbox input[type="checkbox"] {
    flex: none;
    margin: 0.35em 0 0;
}

.ac-form input[type="text"],
.ac-form input[type="email"],
.ac-form input[type="password"],
.ac-form input[type="tel"] {
    box-sizing: border-box;
    width: 100%;
    height: var(--ac-input-height, auto);
    margin: 0;
    padding: 0.6em 0.75em;
    border: 1px solid var(--ac-border, #8c8f94);
    border-radius: var(--ac-radius, 3px);
    background: #fff;
    color: inherit;
    font: inherit;
    box-shadow: var(--ac-input-shadow, none);
}

.ac-form input:focus {
    outline: var(--ac-focus-outline, 2px solid var(--ac-accent, #2271b1));
    outline-offset: 1px;
    box-shadow: var(--ac-focus-shadow, var(--ac-input-shadow, none));
}

/* Keyboard focus on buttons and links (not shown for mouse clicks) */
.ac-form button:focus-visible,
.ac-form a:focus-visible {
    outline: 2px solid var(--ac-accent, #2271b1);
    outline-offset: 1px;
}

.ac-form .ac-hint {
    display: block;
    margin-top: 0.3em;
    color: var(--ac-muted, #646970);
    font-size: 0.875em;
}

.ac-form .ac-actions {
    margin: 1.25em 0 0;
}

/* Buttons: <button> = primary (filled), <a class="ac-button"> = secondary (outline) */
.ac-form button.ac-button,
.ac-form a.ac-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: var(--ac-input-height, auto);
    margin: 0;
    padding: var(--ac-button-padding, 0.6em 1.4em);
    border: 1px solid var(--ac-accent, #2271b1);
    border-radius: var(--ac-radius, 3px);
    font-family: inherit;
    font-size: var(--ac-button-font-size, inherit);
    font-weight: var(--ac-button-weight, 600);
    line-height: 1.5;
    letter-spacing: normal;
    text-transform: var(--ac-button-transform, none);
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.15s, background-color 0.15s, color 0.15s;
}

.ac-form button.ac-button {
    background: var(--ac-accent, #2271b1);
    color: var(--ac-accent-contrast, #fff);
}

.ac-form button.ac-button:hover {
    opacity: 0.85;
}

.ac-form a.ac-button {
    background: transparent;
    color: var(--ac-accent, #2271b1);
}

.ac-form a.ac-button:hover {
    background: var(--ac-accent, #2271b1);
    color: var(--ac-accent-contrast, #fff);
}

.ac-form .ac-message {
    margin: 0 0 1.25em;
    padding: 0.75em 1em;
    border-left: 4px solid var(--ac-accent, #2271b1);
    background: #f0f6fc;
}

.ac-form .ac-message--error {
    border-left-color: #d63638;
    background: #fcf0f1;
}

.ac-form .ac-message--success {
    border-left-color: #00a32a;
    background: #edfaef;
}

.ac-form .ac-message a {
    font-weight: 600;
    text-decoration: underline;
}

.ac-form .ac-links {
    margin: 1.25em 0 0;
    padding: 0;
    list-style: none;
}

.ac-form .ac-links li {
    margin: 0.3em 0;
}

.ac-form .ac-captcha {
    margin: 0 0 1em;
}

/* ALTCHA widget: brings its own colours – map them to the form variables */
.ac-form .ac-captcha altcha-widget {
    --altcha-max-width: 100%;
    --altcha-color-base-content: currentColor;
    --altcha-color-primary: var(--ac-accent, #2271b1);
    --altcha-border-color: var(--ac-border, #8c8f94);
    --altcha-border-radius: var(--ac-radius, 3px);
    --altcha-checkbox-border-color: var(--ac-border, #8c8f94);
    --altcha-checkbox-border-radius: var(--ac-radius, 3px);
    --altcha-input-border-radius: var(--ac-radius, 3px);
}

/* Registration */
.ac-register {
    max-width: 640px;
}

.ac-form .ac-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0 1em;
}

.ac-form .ac-row > .ac-field {
    flex: 1 1 200px;
}

.ac-form .ac-row > .ac-field--wide {
    flex: 3 1 240px;
}

.ac-form .ac-row > .ac-field--narrow {
    flex: 1 1 110px;
}

.ac-form .ac-hint--block {
    margin: -0.5em 0 1em;
}

.ac-form .ac-notice p {
    margin: 0 0 0.5em;
}

.ac-form .ac-notice p:last-child,
.ac-form .ac-message ul {
    margin-bottom: 0;
}

.ac-form .ac-message ul {
    margin-top: 0;
    padding-left: 1.2em;
}

/* Honeypot: off screen, not display:none (some bots skip hidden fields) */
.ac-form .ac-hp {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

/* Member account "Meine Fischerhütte" */
.ac-account {
    max-width: 720px;
    margin: var(--ac-account-margin, 0);
}

.ac-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25em;
    margin: 0 0 1.5em;
    border-bottom: 1px solid var(--ac-line, #dcdcde);
}

.ac-tabs .ac-tab {
    margin-bottom: -1px;
    padding: 0.5em 1em;
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    color: inherit;
    text-decoration: none;
}

.ac-tabs .ac-tab:hover {
    color: var(--ac-accent, #2271b1);
}

.ac-tabs .ac-tab.is-active {
    border-bottom-color: var(--ac-accent, #2271b1);
    color: var(--ac-accent, #2271b1);
    font-weight: 600;
}

.ac-account h2.ac-account-hello {
    margin-top: 0;
}

.ac-account h3 {
    margin: 1.5em 0 0.75em;
}

.ac-account h3:first-child {
    margin-top: 0;
}

.ac-facts {
    display: grid;
    grid-template-columns: max-content 1fr;
    gap: 0.4em 1.5em;
    margin: 0 0 1.25em;
}

.ac-facts dt {
    color: var(--ac-label-color, inherit);
    font-weight: var(--ac-label-weight, 600);
}

.ac-facts dd {
    margin: 0;
}

.ac-form .ac-inline-form {
    display: inline;
}

.ac-form .ac-link-button {
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-decoration: underline;
    cursor: pointer;
}

.ac-form .ac-links + .ac-hint--block {
    margin-top: 1.5em;
}

.ac-form .ac-actions + .ac-hint--block {
    margin-top: 0.75em;
}

.ac-form .ac-cancel {
    margin-left: 1em;
}

.ac-form .ac-muted {
    color: var(--ac-muted, #646970);
}

.ac-form .ac-forgot {
    display: block;
    margin: 1.5em 0 0;
}
