/* ============================================
   SPA View System v3.0
   Layout moved to layout.css
   ============================================ */

/* Блокировка скролла при открытых модальных окнах (bottom-sheet, publish-sheet) */
/* НЕ используется для generation-launcher - там свой скролл */
body.modal-open,
body.sheet-open {
    overflow: hidden !important;
}

/* App view и launcher moved to layout.css */

/* Launcher content */
.launcher-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

/* ✅ Кнопка закрытия - используется глобальная app-header с headerBackBtn */

/* Контейнер превью (поднят выше) */
.launcher-preview-container {
    width: 100%;
    max-width: var(--content-max-width);
    margin: 0 auto 8px auto;
}

/* Название стиля в шапке (app-header-left, после кнопки назад) */
.launcher-style-name {
    font-size: 15px;
    font-weight: 600;
    color: #FFFFFF;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    margin-left: 12px;
}

/* Превью стиля (фиксированная ширина под изображение) */
.launcher-preview {
    width: 248px;
    margin: 0 auto;
    position: relative;
}

/* Wrapper с динамическим цветным ореолом (из палитры изображения) */
.launcher-preview-wrapper {
    width: 248px;
    height: 328px;
    border-radius: 32px;
    box-sizing: border-box;
    position: relative;
    /* box-shadow устанавливается динамически через JS */
}

.launcher-preview img {
    width: 248px;
    height: 328px;
    border-radius: 32px;
    object-fit: cover;
    display: block;
    background: #000000;
}

/* Саб-меню под превью (ширина как превью) */
.launcher-submenu {
    width: 248px;
    margin: 8px auto 0;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Бейдж автора справа (компактный) */
.launcher-creator-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px 4px 6px;
    width: fit-content;

    /* Фон с blur */
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;

    /* Кликабельный */
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

/* Шиммер эффект - блеск слева направо раз в 3 секунды */
.launcher-creator-badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 100%
    );
    animation: shimmerSweep 3s ease-in-out infinite;
    pointer-events: none;
}

@keyframes shimmerSweep {
    0% {
        left: -100%;
    }
    20% {
        left: 100%;
    }
    100% {
        left: 100%;
    }
}

.launcher-creator-badge:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
}

.launcher-creator-badge:active {
    transform: scale(0.97);
}

/* Стрелочка справа */
.launcher-creator-badge::after {
    content: '→';
    font-size: 12px;
    color: rgba(255, 255, 255, 0.5);
    margin-left: 2px;
    position: relative;
    z-index: 1;
}

.launcher-creator-avatar {
    width: 20px;
    height: 20px;
    border-radius: 5px;
    object-fit: cover;
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.launcher-creator-name {
    font-size: 11px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.9);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 120px;
    position: relative;
    z-index: 1;
}

/* Заголовок */
.launcher-header {
    text-align: center;
    margin-bottom: 8px;
}

.launcher-header h1 {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 2px 0;
    line-height: 1.2;
}

.launcher-header p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    line-height: 1.3;
}

/* Profiles section в launcher */
.generation-launcher-view .profiles-selector {
    margin: 4px 0;
}

/* ✅ Launcher specific: блок селектора прижат к низу */
.generation-launcher-view .models-selector-section {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: var(--app-container-max);
    padding: 16px var(--content-padding-mobile) 20px;
    border-radius: 32px 32px 0 0;
    box-sizing: border-box;
    background: rgba(15, 15, 25, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

@media (min-width: 641px) {
    .generation-launcher-view .models-selector-section {
        padding: 16px var(--content-padding-desktop) 20px;
    }
}

/* Launcher content: увеличенный padding-bottom для компенсации фиксированного селектора */
.generation-launcher-view .launcher-content {
    padding-bottom: 220px;
}

/* Кнопка создать в launcher - использует глобальный стиль из components.css */

/* Bottom nav styles in common.css - no duplication */

/* Предотвращение FOUC (Flash of Unstyled Content) */
body:not(.spa-ready) .app-view:not(#view-home) {
    display: none !important;
}

body.spa-ready .app-view.hidden {
    display: none !important;
}

