/* ==================== AURA: баннер обновления приложения ==================== */

.aura-app-update-banner {
    position: fixed;
    z-index: 10070;
    top: 0;
    left: 0;
    right: 0;
    padding: 10px 12px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    background: linear-gradient(135deg, #1e3a8a 0%, #4a6fff 100%);
    color: #fff;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.22);
    animation: aura-app-update-slide-down 0.32s ease-out;
}

.aura-app-update-banner--hidden {
    display: none !important;
}

@keyframes aura-app-update-slide-down {
    from {
        opacity: 0;
        transform: translateY(-100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aura-app-update-banner__inner {
    max-width: 920px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
}

.aura-app-update-banner__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.35;
    flex: 1 1 220px;
}

.aura-app-update-banner__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex-shrink: 0;
}

.aura-app-update-banner__btn {
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: transparent;
    color: #fff;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.aura-app-update-banner__btn--primary {
    background: #fff;
    color: #1e3a8a;
    border-color: #fff;
}

.aura-app-update-banner__btn:hover {
    filter: brightness(1.05);
}

.aura-app-update-toast {
    position: fixed;
    z-index: 10065;
    left: 50%;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%) translateY(12px);
    opacity: 0;
    pointer-events: none;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    padding: 10px 16px;
    border-radius: 10px;
    font-size: 13px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.aura-app-update-toast--show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ==================== AURA PWA (установка + подсказки iOS) ==================== */

.aura-pwa-install {
    position: fixed;
    z-index: 10060;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 12px 12px calc(12px + env(safe-area-inset-bottom, 0px));
    pointer-events: none;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
}

.aura-pwa-install--hidden {
    display: none !important;
}

.aura-pwa-install__card {
    pointer-events: auto;
    width: min(420px, 100%);
    background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
    border: 1px solid rgba(74, 111, 255, 0.22);
    border-radius: 18px;
    box-shadow:
        0 20px 50px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(255, 255, 255, 0.6) inset;
    padding: 16px 16px 14px;
    animation: aura-pwa-slide-up 0.38s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes aura-pwa-slide-up {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.aura-pwa-install__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 12px;
}

.aura-pwa-install__icon-wrap {
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #4a6fff 0%, #6b8cff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(74, 111, 255, 0.35);
}

.aura-pwa-install__icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    object-fit: contain;
    background: #fff;
}

.aura-pwa-install__title {
    margin: 0 0 4px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.25;
}

.aura-pwa-install__subtitle {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
    color: #64748b;
}

.aura-pwa-install__steps {
    margin: 0 0 14px;
    padding: 12px 14px;
    list-style: none;
    background: rgba(74, 111, 255, 0.06);
    border-radius: 12px;
    border: 1px solid rgba(74, 111, 255, 0.1);
}

.aura-pwa-install__steps li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.4;
    color: #334155;
    padding: 5px 0;
}

.aura-pwa-install__steps li + li {
    border-top: 1px solid rgba(74, 111, 255, 0.08);
}

.aura-pwa-install__step-num {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #4a6fff;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aura-pwa-install__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.aura-pwa-install__btn {
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 10px 16px;
    transition: background 0.15s ease, transform 0.1s ease;
}

.aura-pwa-install__btn:active {
    transform: scale(0.98);
}

.aura-pwa-install__btn--primary {
    background: #4a6fff;
    color: #fff;
    box-shadow: 0 4px 14px rgba(74, 111, 255, 0.35);
}

.aura-pwa-install__btn--primary:hover {
    background: #3d5fe6;
}

.aura-pwa-install__btn--ghost {
    background: transparent;
    color: #64748b;
}

.aura-pwa-install__btn--ghost:hover {
    color: #334155;
    background: rgba(15, 23, 42, 0.05);
}

.aura-pwa-install__close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.05);
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.aura-pwa-install__close:hover {
    background: rgba(15, 23, 42, 0.1);
    color: #334155;
}

.aura-pwa-install__card {
    position: relative;
}

.aura-pwa-install__hint {
    margin: 10px 0 0;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.aura-pwa-install__hint strong {
    color: #4a6fff;
    font-weight: 600;
}

/* Компактная подсказка в standalone (после установки) */
.aura-pwa-standalone-tip {
    position: fixed;
    top: calc(8px + env(safe-area-inset-top, 0px));
    left: 50%;
    transform: translateX(-50%);
    z-index: 10055;
    max-width: min(360px, calc(100vw - 24px));
    padding: 10px 14px;
    background: rgba(15, 23, 42, 0.92);
    color: #f8fafc;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
    animation: aura-pwa-slide-up 0.35s ease;
}

.aura-pwa-standalone-tip--hidden {
    display: none !important;
}

.aura-pwa-standalone-tip button {
    margin-left: 8px;
    border: none;
    background: #4a6fff;
    color: #fff;
    border-radius: 8px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}

@media (min-width: 769px) {
    .aura-pwa-install {
        bottom: 16px;
        right: 16px;
        left: auto;
        padding: 0;
        justify-content: flex-end;
    }

    .aura-pwa-install__card {
        width: 380px;
    }
}

[data-theme='dark'] .aura-pwa-install__card {
    background: linear-gradient(145deg, #1e293b 0%, #0f172a 100%);
    border-color: rgba(107, 140, 255, 0.25);
}

[data-theme='dark'] .aura-pwa-install__title {
    color: #f8fafc;
}

[data-theme='dark'] .aura-pwa-install__subtitle,
[data-theme='dark'] .aura-pwa-install__steps li,
[data-theme='dark'] .aura-pwa-install__hint {
    color: #94a3b8;
}

[data-theme='dark'] .aura-pwa-install__steps {
    background: rgba(74, 111, 255, 0.12);
    border-color: rgba(74, 111, 255, 0.2);
}
