/**
 * App V8 visual polish v2 — white-first surfaces, shimmer skeletons, solid WebView chrome.
 * Подключается после theme + iframe_fit на live content-страницах и registration embed.
 */
html.shell-content,
html.ibrand-app-webview,
html.registration-embed {
    --color-page: #ffffff;
    --color-frame: #ffffff;
    --color-surface-soft: #ffffff;
}

html.shell-content body,
html.ibrand-app-webview body,
html.registration-embed body {
    background: #ffffff !important;
}

html.ibrand-app-webview #food-hub-app-container,
html.shell-content #food-hub-app-container,
html.ibrand-app-webview #shops-hub-app-container,
html.shell-content #shops-hub-app-container {
    background: #ffffff !important;
}

html.shell-content #restaurant-device-frame,
html.ibrand-app-webview #restaurant-device-frame {
    background: #ffffff !important;
}

html.guest-vitrina-embed .guest-vitrina-viewport {
    background: #ffffff !important;
    padding: 0 !important;
}

html.guest-vitrina-embed .guest-vitrina-content,
html.guest-vitrina-embed .guest-vitrina-frame {
    background: #ffffff !important;
}

html.guest-vitrina-embed .guest-vitrina-phone {
    background: #ffffff !important;
    border: 0 !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

html.registration-embed .phone-frame.app-shell-phone-frame,
html.registration-embed .registration-step-body {
    background: #ffffff !important;
}

.hub-media-skeleton {
    background: linear-gradient(90deg, #f3f4f6 0%, #ffffff 45%, #f3f4f6 90%) !important;
    background-size: 220% 100% !important;
    animation: app-v8-hub-shimmer 1.15s ease-in-out infinite;
}

.hub-partner-skeleton-card {
    pointer-events: none;
}

.hub-partner-caption-line {
    min-height: 1.25rem;
}

.hub-shop-skeleton-card,
.app-v8-list-skeleton-row {
    pointer-events: none;
}

.shell-pane-loader {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.92);
    z-index: 24;
    transition: opacity 0.18s ease;
}

.shell-pane-loader.hidden {
    display: none !important;
    opacity: 0;
    pointer-events: none;
}

.shell-pane-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--color-primary, #CC5553);
    border-radius: 50%;
    animation: app-v8-hub-shimmer-spin 0.8s linear infinite;
}

@keyframes app-v8-hub-shimmer-spin {
    to { transform: rotate(360deg); }
}

.ui-action-processing-overlay {
    position: absolute;
    inset: 0;
    z-index: 120;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.38);
    pointer-events: all;
}

.ui-action-processing-card {
    margin: 0 16px;
    max-width: 18rem;
    border-radius: 16px;
    background: #fff;
    padding: 16px 18px;
    text-align: center;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.18);
}

.ui-action-processing-spinner {
    width: 32px;
    height: 32px;
    margin: 0 auto 10px;
    border: 3px solid rgba(0, 0, 0, 0.08);
    border-top-color: var(--color-primary, #CC5553);
    border-radius: 50%;
    animation: app-v8-hub-shimmer-spin 0.8s linear infinite;
}

.ui-action-processing-text {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
}

@keyframes app-v8-hub-shimmer {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

html.ibrand-app-webview .glass-header,
html.ibrand-app-webview .hub-app-tabbar,
html.ibrand-app-webview .guest-vitrina-topbar,
html.ibrand-app-webview .guest-vitrina-tabbar,
html.shell-content .glass-header,
html.shell-content .hub-app-tabbar {
    background: rgba(255, 255, 255, 0.99) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

html.ibrand-app-webview img.hub-partner-cover,
html.shell-content img.hub-partner-cover,
html.ibrand-app-webview img.hub-partner-logo,
html.shell-content img.hub-partner-logo {
    image-rendering: auto;
}

html.ibrand-app-webview .partner-card,
html.shell-content .partner-card,
html.ibrand-app-webview .shop-card,
html.shell-content .shop-card {
    box-shadow:
        0 8px 22px rgba(15, 23, 42, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.98) !important;
}
