/* Fonts are self-hosted and loaded by the document - see public/css/fonts.css. */

.auth-layout {
    display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
  background-color: var(--color-surface);
}

.auth-layout__header {
    display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding-top: 60px;
  padding-bottom: 40px;
}

.auth-layout__title-block {
    display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.auth-layout__title {
    font-family: "Source Serif Pro", serif;
  font-size: 52px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--color-black);
  text-align: center;
  padding: 10px;
}

.auth-layout__subtitle {
    font-family: "DM Sans", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
  color: var(--color-ink-faint);
  text-align: center;
  max-width: 860px;
}

.auth-layout__content {
    display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 30px 0 40px;
}

.auth-layout__footer {
  display: flex;
  justify-content: center;
  margin-top: auto;
  padding: 40px 20px;
}

.auth-layout__footer .logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.auth-layout__footer .logo__mark {
  display: inline-flex;
  width: 33px;
  height: 24px;
}

.auth-layout__footer .logo__mark svg {
  width: 100%;
  height: 100%;
  display: block;
}

.auth-layout__footer .logo__text {
  display: inline-flex;
  width: 118px;
  height: 23px;
}

.auth-layout__footer .logo__text svg {
  width: 100%;
  height: 100%;
  display: block;
  transform: scaleY(-1);
}

.auth-card {
    width: 100%;
  max-width: 406px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.auth-form.auth-form-reg{
    gap: 24px;
}

.auth-form.auth-form-reset-pass-button{
    margin-top: -30px;
}

.auth-form-social{
    display: flex;
    flex-direction: column;
    gap: 36px;
}

.auth-form-fields{
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.auth-label {
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--color-ink-faint);
}

.auth-input-wrap {
    position: relative;
}

.auth-input {
    width: 100%;
    height: 48px;
    padding: 12px;
    padding-right: 48px;
    border: 1px solid var(--color-border);
    border-radius: 12px;
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 18px;
    color: var(--color-black);
    background: var(--color-surface);
    outline: none;
    transition: border-color 0.2s;
}

.auth-input::placeholder {
    color: var(--color-ink-faint);
}

.auth-input:focus {
    border-color: var(--color-black);
}

.auth-input--error,
.auth-input--error:focus {
    border-color: var(--color-error-form);
}

.auth-input--password {
    padding-right: 42px;
}

.auth-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-ink-faint);
    font-size: 12px;
}

.auth-error {
    color: var(--color-error-form);
    font-size: 12px;
}

.auth-row {
    display: flex;
    justify-content: flex-end;
}

.auth-btn {
    width: 100%;
    border: none;
    border-radius: 12px;
    height: 48px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    font-family: 'DM Sans', sans-serif;
}

.auth-btn--primary {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 48px;
    padding: 9px 40px;
    border-radius: 12px;
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 22px;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s;
    background-color: var(--color-black);
    color: var(--color-surface);
    border: none;
    gap: 12px;
    width: 100%;
}

.auth-btn--primary:hover{
    opacity: 0.8;
}

.auth-form-reset-pass-button .auth-btn--primary{
    text-decoration: none;
}

.auth-btn--secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 48px;
    padding: 10px 12px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: normal;
    color: var(--color-black);
    white-space: nowrap;
}

.auth-btn--secondary:hover{
    border-color: var(--color-ink-muted);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.auth-divider__line {
    flex: 1;
    height: 1px;
    background: var(--color-border);
    opacity: 0.9;
}

.auth-divider__text {
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.12px;
    text-transform: uppercase;
    color: var(--color-ink-faint);
    white-space: nowrap;
}

.auth-footer {
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    line-height: 1.5;
    text-align: center;
    margin-top: 40px;
    color: var(--color-ink-faint);
}

.auth-footer.auth-footer-reg{
    margin-top: 20px;
}

.auth-footer a,
.auth-link {
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
    color: var(--color-link);
    text-decoration: none;
    transition: opacity 0.2s;
}

.auth-footer a:hover,
.auth-link:hover {
    opacity: 0.8;
}

.auth-layout-reset-pass-success-icon{
    display: flex;
    justify-content: center;
    width: 60px;
    height: 60px;
    background-color: rgb(16 185 129 / 10%);
    border-radius: 30px;
    align-items: center;
}

.auth-alert {
    margin-bottom: 14px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 14px;
}

.auth-alert--error {
    background: var(--color-error-form-surface);
    color: var(--color-error-form-ink);
    border: 1px solid var(--color-error-form-line);
}

.auth-alert--success {
    background: var(--color-brand-surface);
    color: var(--color-success-ink);
    border: 1px solid var(--color-success-line);
}

/*
 * Neither good news nor bad: "this browser is blocking cookies for this site". It is a
 * hint, not a refusal - the form below it still works - so it is deliberately quieter
 * than the error style, which reads as "you cannot continue".
 */
.auth-alert--info {
    background: var(--color-surface-subtle);
    color: var(--color-ink-muted);
    border: 1px solid var(--color-border);
}

.modal-overlay {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1100;
    padding: 16px;
}

/* Higher specificity than base.html.twig legacy `.modal` (fullscreen overlay). */
.modal-overlay .modal {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: calc(100% - 40px);
    max-width: 490px;
    height: auto;
    max-height: calc(100vh - 32px);
    overflow: auto;
    padding: 30px;
    background: var(--color-surface);
    border-radius: 16px;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
    z-index: auto;
}

.modal {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    width: calc(100% - 40px);
    max-width: 490px;
    padding: 30px;
    background: var(--color-surface);
    border-radius: 16px;
    box-shadow: 0 5px 12px rgba(0, 0, 0, 0.1);
}

.subscription__modal-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
}

.subscription__modal-title {
    font-family: "DM Sans", sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: var(--color-ink);
}

.subscription__modal-text {
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--color-ink-soft);
}

.subscription__modal-note {
    font-family: "DM Sans", sans-serif;
    font-size: 12px;
    color: var(--color-ink-soft);
    font-style: italic;
}
.subscription__modal-note2{
    margin-top: -10px;
  }
.subscription__modal-actions {
    display: flex;
    gap: 12px;
    width: 100%;
}

@media (max-width: 650px) {
    .subscription__modal-actions {
        flex-direction: column;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 8px;
    font-family: "DM Sans", sans-serif;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, border-color 0.2s, opacity 0.2s, color 0.2s, transform 0.1s;
    border: none;
    padding: 0 20px;
}

.btn:active {
    transform: scale(0.98);
}

.btn--md-compact {
    height: 44px;
    padding: 8px 30px;
    font-size: 12px;
    line-height: 16px;
    border-radius: 8px;
    gap: 12px;
}

.btn--dark {
    background-color: var(--color-ink-muted);
    color: var(--color-surface);
}

.btn--dark:hover {
    background-color: var(--color-ink);
}

.btn--outline-light {
    background-color: var(--color-surface);
    color: var(--color-ink-soft);
    border: 1px solid rgba(108, 117, 125, 0.4);
}

.btn--outline-light:hover {
    border-color: var(--color-ink);
    color: var(--color-ink);
}

.btn--full-width {
    width: 100%;
}

@media (max-width: 650px) {
    .auth-layout{
        padding-left: 20px;
        padding-right: 20px;
    }

    .auth-layout__header {
        padding-top: 40px;
        padding-bottom: 20px;
    }

    .auth-layout__title {
        font-size: 32px;
        padding: 0;
    }

    .auth-layout__subtitle {
        font-size: 16px;
        line-height: 24px;
    }
}


/* A dead end on an auth page: an expired reset link, or a check we could not make.
   See assets/auth/AuthNotice.jsx for why this is not an alert bar - nothing here is a
   field the person can fix, so it is written like the 404/500 pages: what happened, why
   it is normal, what to do, and the button that does it. */
.auth-layout--notice {
    justify-content: center;
}

.auth-layout--notice .auth-layout__content {
    padding: 40px 0 80px;
}

.auth-notice {
    box-sizing: border-box;
    width: 100%;
    max-width: 560px;
    padding: 36px 36px 32px;
    border: 1px solid var(--color-border);
    border-radius: 16px;
    background: var(--color-surface);
    /* One soft shadow, no hover state: the card is not interactive. */
    box-shadow: 0 5px 12px rgb(0 0 0 / 6%);
    text-align: left;
}

.auth-notice__mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    margin-bottom: 20px;
    border-radius: 14px;
}

/* Amber, not red: a link that ran out of time is the system working as designed, and
   painting it like a failure is what made people read this page as a broken site. */
.auth-notice__mark--expired {
    background: var(--color-warning-surface);
    color: var(--color-warning-ink);
}

.auth-notice__mark--fault {
    background: var(--color-error-form-surface);
    color: var(--color-error-form-ink);
}

.auth-notice__title {
    margin: 0 0 12px;
    font-family: "Source Serif Pro", serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-black);
}

.auth-notice__text {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-ink-faint);
}

.auth-notice__hints {
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
    font-family: "DM Sans", sans-serif;
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-slate-650);
}

.auth-notice__hints li {
    position: relative;
    padding: 10px 0 10px 18px;
}

.auth-notice__hints li + li {
    border-top: 1px solid var(--color-border);
}

/* A dot rather than a bullet glyph: it sits on the first line at any font size. */
.auth-notice__hints li::before {
    content: "";
    position: absolute;
    top: 18px;
    left: 2px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--color-border-strong);
}

.auth-notice__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 28px;
}

.auth-notice__action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 46px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: linear-gradient(
        180deg,
        var(--color-cta-gradient-start) 0%,
        var(--color-cta-gradient-end) 100%
    );
    font-family: "DM Sans", sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: var(--color-surface);
    text-decoration: none;
    /* Colour only, like the error pages: on a page that just failed, a control that
       lifts under the pointer reads as one more thing behaving oddly. */
    transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

.auth-notice__action:hover {
    background: linear-gradient(
        180deg,
        var(--color-cta-gradient-deep) 0%,
        var(--color-cta-gradient-end) 100%
    );
}

.auth-notice__action:active {
    background: var(--color-cta-gradient-end);
}

.auth-notice__action--ghost {
    background: var(--color-surface);
    border-color: var(--color-border-strong);
    color: var(--color-slate-650);
}

.auth-notice__action--ghost:hover {
    background: var(--color-surface-subtle);
    border-color: var(--color-border-hover);
    color: var(--color-ink-strong);
}

@media (max-width: 650px) {
    .auth-notice {
        padding: 28px 22px 24px;
        border-radius: 14px;
    }

    .auth-notice__title {
        font-size: 26px;
    }

    .auth-notice__actions {
        flex-direction: column;
    }

    .auth-notice__action {
        width: 100%;
    }
}

/* The verification-resend block on the sign-in card. Its own gap: the surrounding
   .auth-form spaces full-width inputs 30px apart, which around a countdown button, an
   inbox shortcut and two lines of copy reads as four unrelated things. */
.auth-form.auth-resend {
    gap: 12px;
}

/* "Change it" - a button, because it changes this page rather than navigating, and a
   link that goes nowhere is a link a keyboard user cannot trust. Styled as the text
   link it looks like. */
.auth-link-button {
    padding: 0;
    border: 0;
    background: none;
    font-family: "DM Sans", sans-serif;
    font-size: inherit;
    font-weight: 500;
    line-height: inherit;
    color: var(--color-link);
    text-decoration: none;
    cursor: pointer;
}

.auth-link-button:hover {
    opacity: 0.8;
}

/* A button counting down is not a dead button: it keeps the enabled shape and only
   loses the pointer, so nobody reads it as broken. */
.auth-btn--secondary:disabled {
    cursor: default;
    opacity: 0.65;
}
