/* Окно демо авторизации сайта (templates/site/chunk/demoAuth.html.twig, изменение site-demo-private). */
.demo-auth .modal-content {
    border: 0;
    border-radius: 1.25rem;
    padding: 0.5rem;
}

.demo-auth__lead {
    text-align: center;
    font-size: 1.0625rem;
    margin-bottom: 1rem;
}

.demo-auth__field {
    position: relative;
}

.demo-auth__phone {
    letter-spacing: 0.02em;
    padding-left: 3rem;
}

/* Флаг страны из маски номера (как в кабинете); без маски — пусто. */
.demo-auth__flag {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    font-size: 1.25rem;
    line-height: 1;
    pointer-events: none;
}

/* Колонка «или | QR» — только на компьютере достаточной ширины (изменение phone-qr-and-mask). */
.demo-auth__or,
.demo-auth__qr {
    display: none;
}

.demo-auth__main {
    min-width: 0;
}

@media (hover: hover) and (pointer: fine) and (min-width: 768px) {
    .demo-auth--wide .modal-dialog {
        max-width: 760px;
    }

    .demo-auth__columns:not([hidden]) {
        display: flex;
        gap: 1.5rem;
    }

    .demo-auth__main {
        flex: 1;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    .demo-auth__or {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        color: #8a929c;
        font-size: 0.8125rem;
    }

    .demo-auth__or span {
        flex: 1;
        width: 1px;
        background: #e5e7eb;
    }

    .demo-auth__qr {
        display: flex;
        flex: none;
        flex-direction: column;
        justify-content: center;
        width: 220px;
        text-align: center;
    }
}

.demo-auth__qr-code {
    width: 176px;
    height: 176px;
    margin: 0 auto;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}

.demo-auth__qr-code svg {
    display: block;
    width: 100%;
    height: 100%;
}

.demo-auth__qr-title {
    margin: 0.875rem 0 0;
    font-size: 0.9375rem;
    font-weight: 600;
}

.demo-auth__qr-text {
    margin: 0.25rem 0 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    color: var(--bs-secondary-color, #6c757d);
}

.demo-auth__code {
    margin: 0.25rem 0 0.75rem;
    text-align: center;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 2.5rem;
    font-weight: 600;
    letter-spacing: 0.2em;
    font-variant-numeric: tabular-nums;
}

.demo-auth__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin: 1.25rem 0 1rem;
}

.demo-auth__links a {
    display: block;
    border-radius: 0.875rem;
    transition: transform 0.15s ease;
}

.demo-auth__links a:active {
    transform: scale(0.94);
}

.demo-auth__links img {
    display: block;
    width: 56px;
    height: 56px;
    border-radius: 0.875rem;
}

.demo-auth__wait {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.875rem;
    color: var(--bs-secondary-color, #6c757d);
}

.demo-auth__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background: var(--bs-primary, #33b89f);
    animation: demo-auth-pulse 1.2s ease-in-out infinite;
}

@keyframes demo-auth-pulse {
    50% {
        opacity: 0.3;
    }
}

.demo-auth__check {
    width: 56px;
    height: 56px;
    margin: 0.5rem auto 1rem;
    fill: none;
    stroke: var(--bs-primary, #33b89f);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.demo-auth__error {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    background: rgba(220, 53, 69, 0.08);
    color: #b02a37;
    font-size: 0.9375rem;
    text-align: center;
}

@media (prefers-reduced-motion: reduce) {
    .demo-auth__dot {
        animation: none;
    }

    .demo-auth__links a {
        transition: none;
    }
}
