.deldia-auth,
.deldia-auth-review {
    --deldia-auth-bg: #f4f2f0;
    --deldia-auth-text: #42342e;
    --deldia-auth-muted: #847069;
    --deldia-auth-accent: #f8470a;
    --deldia-auth-white: #fff;
    color: var(--deldia-auth-text);
}

.deldia-auth-page,
.deldia-auth-page #page {
    background: var(--deldia-auth-bg, #f4f2f0);
}

.deldia-auth-page .site-footer {
    display: none;
}

.deldia-auth-page .site-header {
    padding: 15px 0;
}

.deldia-auth-page .site-header__wrap {
    min-height: 32px;
}

.deldia-auth-page .header-right {
    gap: 24px;
}

.deldia-auth-page .site-favorites {
    display: none;
}

.deldia-auth-page .site-account {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
}

.deldia-auth-page .site-account svg {
    width: 20px;
    height: 20px;
}

.deldia-auth-page .language-switcher {
    font-weight: 400;
}

.deldia-auth-page .language-switcher__current-arr svg {
    width: 10px;
    height: 6px;
}

.deldia-auth {
    min-height: calc(100dvh - 62px);
    padding: 32px 16px 48px;
    background: var(--deldia-auth-bg);
    font-family: "Deldia Noto Serif", NotoSerif, "Noto Serif", serif;
}

.deldia-auth__inner {
    width: 100%;
    max-width: 361px;
    margin: 0 auto;
}

.deldia-auth__welcome,
.deldia-auth__authenticated {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.deldia-auth__illustration {
    display: block;
    width: min(311px, 100%);
    height: auto;
    aspect-ratio: 311 / 166;
    object-fit: contain;
    margin: 0 auto;
}

.deldia-auth h1 {
    margin: 0 0 8px;
    color: var(--deldia-auth-text);
    font-family: NotoSerif, "Noto Serif", serif;
    font-size: 32px;
    font-weight: 800;
    line-height: 44px;
    letter-spacing: 0;
}

.deldia-auth__benefits {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
    color: var(--deldia-auth-muted);
    font-family: "Deldia Noto Serif", NotoSerif, "Noto Serif", serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
}

.deldia-auth__benefits li {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.deldia-auth__benefits li::before {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border: 1px solid #e6e2e0;
    border-radius: 50%;
    background: url("../images/benefit-check.svg") center / 12px 12px no-repeat;
    content: "";
}

.deldia-auth__actions {
    width: 100%;
    margin-top: 24px;
}

.deldia-google-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 48px;
    min-height: 48px;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 24px;
    background: transparent;
    box-shadow: none;
}

.deldia-google-button > div,
.deldia-google-button iframe {
    max-width: 100% !important;
}

.deldia-google-button:focus,
.deldia-google-button:focus-visible,
.deldia-google-button:focus-within,
.deldia-google-button iframe:focus,
.deldia-google-button iframe:focus-visible,
.deldia-google-button iframe:active {
    border: 0;
    outline: 0;
    box-shadow: none;
}

.deldia-auth__privacy {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    margin: 16px 0 0;
    color: var(--deldia-auth-muted);
    font-family: "Deldia Inter", Inter, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0;
}

.deldia-auth__lock {
    display: block;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
    object-fit: contain;
}

.deldia-auth__error {
    min-height: 0;
    margin: 10px 0 0;
    color: #9c2f18;
    font-family: "Deldia Inter", Inter, sans-serif;
    font-size: 13px;
    line-height: 1.45;
}

.deldia-auth__error:empty {
    display: none;
}

.deldia-auth__authenticated p {
    color: var(--deldia-auth-muted);
    font-size: 16px;
}

.deldia-auth__account-action,
.deldia-auth__logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    border-radius: 24px;
    font-family: "Deldia Inter", Inter, sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.deldia-auth__account-action {
    margin-top: 16px;
    background: var(--deldia-auth-accent);
    color: #fff;
}

.deldia-auth__logout {
    margin-top: 8px;
    color: var(--deldia-auth-text);
}

.site-account {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    color: #6d5147;
}

.site-account svg {
    width: 22px;
    height: 22px;
}

.site-account.is-authenticated::after {
    position: absolute;
    top: 0;
    right: 0;
    width: 7px;
    height: 7px;
    border: 2px solid #f4f2f0;
    border-radius: 50%;
    background: var(--deldia-auth-accent, #f8470a);
    content: "";
}

.deldia-auth-review[hidden] {
    display: none;
}

.deldia-auth-review {
    position: fixed;
    inset: 0 auto 0 50%;
    z-index: 100000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: min(100%, 400px);
    overflow: hidden;
    transform: translateX(-50%);
    font-family: "Deldia Noto Serif", NotoSerif, "Noto Serif", serif;
}

.deldia-auth-review,
.deldia-auth-review *,
.deldia-auth-review *::before,
.deldia-auth-review *::after {
    box-sizing: border-box;
}

.deldia-auth-review__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}

.deldia-auth-review__sheet {
    position: relative;
    z-index: 1;
    display: block;
    width: calc(100% - 30px);
    min-height: 340px;
    margin-top: min(162px, max(24px, calc((100dvh - 340px) / 2)));
    padding: 40px 24px;
    overflow: visible;
    border-radius: 24px;
    background: var(--deldia-auth-bg);
    outline: none;
}

.deldia-auth-review__close {
    position: absolute;
    top: 16px;
    right: 16px;
    display: grid;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 6px;
    border: 0;
    border-radius: 50%;
    background: transparent;
    place-items: center;
    cursor: pointer;
}

.deldia-auth-review__close img {
    display: block;
    width: 20px;
    height: 20px;
}

.deldia-auth-review__login {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 24px;
    text-align: center;
}

.deldia-auth-review__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.deldia-auth-review__message-icon {
    display: block;
    width: 48px;
    height: 48px;
    margin: 0 0 8px;
}

.deldia-auth-review__intro h2 {
    margin: 0 0 8px;
    color: var(--deldia-auth-text);
    font-family: "Deldia Noto Serif", NotoSerif, "Noto Serif", serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 0;
}

.deldia-auth-review__intro p {
    width: 100%;
    max-width: 281px;
    margin: 0;
    color: var(--deldia-auth-muted);
    font-family: "Deldia Noto Serif", NotoSerif, "Noto Serif", serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.4;
    letter-spacing: 0;
}

.deldia-auth-review__actions {
    width: 100%;
}

.deldia-auth-review button:focus-visible,
.deldia-auth a:focus-visible,
.site-account:focus-visible {
    outline: 3px solid var(--deldia-auth-accent);
    outline-offset: 3px;
}

body.deldia-auth-modal-open {
    overflow: hidden;
}

@media (min-width: 768px) {
    .deldia-auth-review {
        top: 40px;
        bottom: 52px;
        border-radius: 20px;
    }

    .deldia-auth-review__sheet {
        margin-top: min(122px, max(24px, calc((100% - 340px) / 2)));
        box-shadow: 0 18px 60px rgba(54, 28, 18, 0.22);
    }
}

@media (prefers-reduced-motion: no-preference) {
    .deldia-auth-review__sheet {
        animation: deldia-auth-dialog-in 180ms ease-out;
    }
}

@media (prefers-reduced-motion: reduce) {
    .deldia-auth-review *,
    .deldia-auth * {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

@keyframes deldia-auth-dialog-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}
