.restoo-authentication {
    --restoo-ui-font-family: inherit;
    --restoo-ui-accent: #1f5f99;
    --restoo-ui-accent-hover: #194d7c;
    --restoo-ui-accent-soft: #eef5fb;
    --restoo-ui-text: #182737;
    --restoo-ui-text-muted: #5f6f7f;
    --restoo-ui-border: #d7dce2;
    --restoo-ui-border-strong: #bfc9d4;
    --restoo-ui-surface: #ffffff;
    --restoo-ui-surface-muted: #f6f8fa;
    --restoo-ui-danger: #a12525;
    --restoo-ui-focus: #78aee0;
    --restoo-ui-radius: 0.875rem;
    --restoo-ui-shadow: 0 0.75rem 2rem rgb(24 39 55 / 10%);
    --restoo-ui-spacing: 1rem;
    box-sizing: border-box;
    color: var(--restoo-ui-text);
    display: grid;
    font-family: var(--restoo-ui-font-family);
    inline-size: 100%;
    justify-items: center;
    line-height: 1.6;
    padding: clamp(0.75rem, 3vw, 2rem);
}

.restoo-authentication *,
.restoo-authentication *::before,
.restoo-authentication *::after {
    box-sizing: inherit;
}

.restoo-authentication [hidden] {
    display: none !important;
}

.restoo-authentication__card {
    background: var(--restoo-ui-surface);
    border: 1px solid var(--restoo-ui-border);
    border-radius: var(--restoo-ui-radius);
    box-shadow: var(--restoo-ui-shadow);
    color: var(--restoo-ui-text);
    inline-size: min(100%, 30rem);
    padding: clamp(1.25rem, 4vw, 2rem);
}

.restoo-authentication__title {
    color: var(--restoo-ui-text);
    font-size: clamp(1.25rem, 4vw, 1.625rem);
    font-weight: 800;
    line-height: 1.5;
    margin: 0 0 0.5rem;
    text-align: center;
}

.restoo-authentication__description,
.restoo-authentication__mobile,
.restoo-authentication__timer {
    color: var(--restoo-ui-text-muted);
    line-height: 1.8;
    margin: 0 0 var(--restoo-ui-spacing);
    text-align: center;
}

.restoo-authentication__mobile {
    background: var(--restoo-ui-surface-muted);
    border: 1px solid var(--restoo-ui-border);
    border-radius: calc(var(--restoo-ui-radius) * 0.7);
    color: var(--restoo-ui-text);
    font-weight: 700;
    padding: 0.7rem 0.85rem;
}

.restoo-authentication__timer {
    font-size: 0.95rem;
    font-weight: 700;
}

.restoo-authentication__form {
    display: grid;
    gap: var(--restoo-ui-spacing);
}

.restoo-authentication__label {
    color: var(--restoo-ui-text);
    display: grid;
    font-weight: 700;
    gap: 0.5rem;
    text-align: right;
}

.restoo-authentication__input {
    appearance: none;
    background: var(--restoo-ui-surface);
    border: 1px solid var(--restoo-ui-border-strong);
    border-radius: calc(var(--restoo-ui-radius) * 0.7);
    color: var(--restoo-ui-text);
    font: inherit;
    inline-size: 100%;
    min-block-size: 3rem;
    padding: 0.7rem 0.8rem;
    transition: border-color 120ms ease, box-shadow 120ms ease, background-color 120ms ease;
}

.restoo-authentication__input:hover {
    border-color: var(--restoo-ui-accent);
}

.restoo-authentication__input--mobile,
.restoo-authentication__input--otp {
    direction: ltr;
    text-align: left;
}

.restoo-authentication__input--otp {
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.35em;
    text-align: center;
}

.restoo-authentication__input:focus-visible,
.restoo-authentication__button:focus-visible,
.restoo-authentication__consent input:focus-visible {
    outline: 3px solid var(--restoo-ui-focus);
    outline-offset: 2px;
}

.restoo-authentication__consent {
    align-items: flex-start;
    color: var(--restoo-ui-text-muted);
    display: flex;
    font-size: 1rem;
    gap: 0.625rem;
    line-height: 1.9;
}

.restoo-authentication__consent input {
    accent-color: var(--restoo-ui-accent);
    block-size: 1.25rem;
    flex: 0 0 auto;
    inline-size: 1.25rem;
    margin-block-start: 0.2rem;
}

.restoo-authentication__policy-link {
    color: var(--restoo-ui-accent);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 0.15em;
}

.restoo-authentication__button {
    appearance: none;
    border: 1px solid transparent;
    border-radius: calc(var(--restoo-ui-radius) * 0.7);
    cursor: pointer;
    font: inherit;
    font-weight: 800;
    inline-size: 100%;
    min-block-size: 3rem;
    padding: 0.7rem 1rem;
    transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.restoo-authentication__button + .restoo-authentication__button {
    margin-block-start: 0.625rem;
}

.restoo-authentication__button--primary {
    background: var(--restoo-ui-accent);
    color: #fff;
}

.restoo-authentication__button--primary:hover:not(:disabled) {
    background: var(--restoo-ui-accent-hover);
}

.restoo-authentication__button--secondary {
    background: var(--restoo-ui-surface);
    border-color: var(--restoo-ui-border-strong);
    color: #25445f;
}

.restoo-authentication__button--secondary:hover:not(:disabled) {
    background: var(--restoo-ui-accent-soft);
    border-color: var(--restoo-ui-accent);
    color: var(--restoo-ui-accent-hover);
}

.restoo-authentication__button:active:not(:disabled) {
    transform: translateY(1px);
}

.restoo-authentication__button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.restoo-authentication__message {
    color: var(--restoo-ui-danger);
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.7;
    margin: 0;
    min-block-size: 0;
    text-align: center;
}

.restoo-authentication__message:empty,
.restoo-authentication__live:empty {
    display: none;
}

.restoo-authentication__message--visible {
    background: #fff6f6;
    border: 1px solid #efcaca;
    border-radius: calc(var(--restoo-ui-radius) * 0.65);
    display: block;
    padding: 0.7rem 0.85rem;
}

.restoo-authentication__live {
    block-size: 1px;
    inline-size: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    white-space: nowrap;
    clip-path: inset(50%);
}

@media (prefers-reduced-motion: reduce) {
    .restoo-authentication__input,
    .restoo-authentication__button {
        transition: none;
    }
}

@media (max-width: 30rem) {
    .restoo-authentication {
        padding: 0.75rem;
    }

    .restoo-authentication__card {
        border-radius: calc(var(--restoo-ui-radius) * 0.8);
        padding: 1.125rem;
    }
}


.restoo-authentication--template-compact .restoo-authentication__card {
    inline-size: min(100%, 26rem);
    padding: 1rem;
}

.restoo-authentication--template-compact {
    --restoo-ui-spacing: 0.75rem;
}

.restoo-authentication--template-soft .restoo-authentication__card {
    border-color: transparent;
    box-shadow: 0 1rem 2.5rem rgb(24 39 55 / 8%);
}

.restoo-authentication--template-soft .restoo-authentication__input,
.restoo-authentication--template-soft .restoo-authentication__button--secondary {
    background: var(--restoo-ui-surface-muted);
}
