/* =====================================================================
   Round 11 — патч поверх style-local.css
   Унификация 4 кнопок хедера + страница /app/* (иконка / "..." / табы)
   ===================================================================== */

/* --------- 1. ХЕДЕР — единая кнопка-токен 36×auto ---------------------- */
.nk-header-action .nk-btn-group > li > .btn,
.nk-header-action .language-selector > .btn,
.nk-header-action .apps-download > .btn,
.nk-header-action .auth-btn,
.nk-header-action .navbar-toggle {
    height: 36px;
    min-height: 36px;
    padding: 0 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    box-shadow: none;
    transition: background-color .15s ease, border-color .15s ease;
}

/* убираем !important-перебивашки apps-download */
.nk-header-action .apps-download .btn {
    padding: 0 14px !important;
    height: 36px !important;
}

/* селектор языка: лёгкая пилюля, флаг 16px */
.nk-header-action .language-selector .btn {
    background: #eaf0ff;
    color: #2b5cfd;
    border: 0;
}
.nk-header-action .language-selector .btn img {
    width: 16px !important;
    height: 16px;
    border-radius: 3px;
    object-fit: cover;
}
.nk-header-action .language-selector .btn:hover {
    background: #dde6ff;
}

/* «Скачать» — единственный gradient-CTA, тот же 36px */
.nk-header-action .apps-download .btn-primary {
    background: linear-gradient(135deg, #2b5cfd 0%, #6e61f3 100%);
    border: 0;
    color: #fff;
}

/* «Войти» — тот же visual-вес что у RU, без border */
.nk-header-action .auth-btn,
#user-panel .auth-btn {
    background: #eaf0ff !important;
    border: 0 !important;
    color: #2b5cfd !important;
    padding: 0 12px !important;
    height: 36px !important;
    border-radius: 8px !important;
}
.nk-header-action .auth-btn:hover,
#user-panel .auth-btn:hover {
    background: #dde6ff !important;
    color: #2b5cfd !important;
}
.nk-header-action .auth-btn .icon {
    font-size: 16px;
    margin-right: 4px;
}

/* Бургер 36×36, без синей обводки, серая иконка */
.nk-navbar-toggle .btn,
.nk-header-action .navbar-toggle {
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 8px !important;
    color: #4b5563 !important;
}
.nk-navbar-toggle .btn:hover {
    background: #f3f4f6 !important;
    border-color: #d1d5db !important;
}
.nk-navbar-toggle .btn .icon {
    font-size: 18px !important;
    line-height: 1;
}

/* отступы между кнопками одинаковые */
.nk-header-action .nk-btn-group > li + li {
    margin-left: 8px;
}

@media (max-width: 991.98px) {
    .nk-header-action .nk-btn-group {
        gap: 8px;
    }
}

.user-skeleton-btn {
    width: 88px !important;
    height: 36px !important;
    border-radius: 8px !important;
}

/* --------- 2. СТРАНИЦА ПРИЛОЖЕНИЯ — иконка не плющит ------------------- */
.nash-big-icon,
.nash-big-icon-bg {
    width: 96px !important;
    height: 96px !important;
    border-radius: 22px;
    overflow: hidden;
    background: #f3f4f6;
    flex: 0 0 96px;
}
.nash-big-icon img,
.nash-big-icon-bg img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    font-size: 0 !important;
    color: transparent !important;
    text-indent: -9999px;
    background: #f3f4f6;
}
.nash-big-icon .icon-foreground {
    border-radius: 0 !important;
}
@media (max-width: 575.98px) {
    .nash-big-icon,
    .nash-big-icon-bg {
        width: 80px !important;
        height: 80px !important;
        flex: 0 0 80px;
    }
}

/* --------- 3. КНОПКИ «СКАЧАТЬ» и «…» НА /app/* ------------------------ */
.nk-banner .apps-download > .btn-primary,
#open-app.btn-primary {
    height: 44px;
    min-height: 44px;
    padding: 0 24px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.app-report-btn {
    width: 44px !important;
    height: 44px !important;
    min-width: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    background: #f3f4f6 !important;
    color: #4b5563 !important;
    border: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
.app-report-btn:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}
.app-report-btn .icon {
    font-size: 20px;
    line-height: 1;
    margin: 0;
}

/* --------- 4. TABS на /app/* — горизонтальный скролл ------------------ */
.nk-nav-tabs.nav-tabs-s2 .nav-tabs,
.tab-nav-scroll .nav-tabs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}
.nk-nav-tabs.nav-tabs-s2 .nav-tabs::-webkit-scrollbar { display: none; }

.nk-nav-tabs.nav-tabs-s2 .nav-tabs .nav-link {
    white-space: nowrap;
    flex: 0 0 auto;
}

/* --------- 5. КАРТОЧКИ ПРИЛОЖЕНИЙ — название не режем в 1 строку ------- */
@media (max-width: 575.98px) {
    .app-card-title {
        -webkit-line-clamp: 2 !important;
        white-space: normal !important;
        min-height: 2.4em !important;
    }
    .app-card-desc {
        display: -webkit-box !important;
        -webkit-line-clamp: 1 !important;
        -webkit-box-orient: vertical !important;
    }
}

/* --------- 6. Фолбэк-плейсхолдер для битых иконок --------------------- */
img[alt][src=""],
img:not([src]) {
    visibility: hidden;
}
