/* ============================================================
   iskander-yandex.css
   Стили для кнопок «Искать в Яндексе», CTA и кнопки скачивания
   приложения «Яндекс с Алисой».
   ============================================================ */

/* ---------- Кнопки «Искать в Яндексе» ---------- */
.iskander-yandex-button {
    display: inline-block;
    background: #fc3f1d;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
    text-decoration: none !important;
    transition: background-color 0.15s ease, transform 0.1s ease;
    max-width: 100%;
    word-break: break-word;
}
.iskander-yandex-button:hover,
.iskander-yandex-button:focus {
    background: #e63616;
    color: #fff !important;
    text-decoration: none;
}
.iskander-yandex-button:active {
    transform: translateY(1px);
}

.iskander-yandex-button--footer {
    padding: 8px 16px;
    font-size: 14px;
}

.iskander-yandex-button--big {
    padding: 14px 28px;
    font-size: 17px;
    border-radius: 10px;
}

.iskander-yandex-button--inline {
    padding: 8px 16px;
    font-size: 14px;
}

/* Ссылка-«стрелка» */
.iskander-yandex-link {
    color: #fc3f1d !important;
    font-weight: 600;
    text-decoration: none;
    border-bottom: 1px dashed rgba(252, 63, 29, 0.5);
}
.iskander-yandex-link:hover {
    border-bottom-color: #fc3f1d;
    text-decoration: none;
}

/* ---------- CTA в блоке «ничего не найдено» ---------- */
.iskander-yandex-cta {
    margin: 20px 0 24px;
    padding: 20px;
    background: #fff5f2;
    border: 1px solid #ffd5cc;
    border-radius: 12px;
    text-align: center;
}
.iskander-yandex-cta__title {
    margin: 0 0 12px;
    font-weight: 600;
    font-size: 15px;
    color: #333;
}

/* CTA сверху при 0 результатов */
.iskander-yandex-cta--top {
    margin: 16px 0 24px;
    padding: 24px 20px;
    background: #fff5f2;
    border: 2px solid #fc3f1d;
    border-radius: 12px;
    text-align: center;
}
.iskander-yandex-cta--top .iskander-yandex-cta__title {
    margin: 0 0 14px;
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

/* ---------- Инлайн-CTA над результатами при малом количестве ---------- */
.iskander-yandex-inline-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 20px;
    padding: 14px 16px;
    background: #f7f7f7;
    border-radius: 10px;
    font-size: 14px;
}
.iskander-yandex-inline-cta__text {
    color: #444;
}

/* ---------- Подсказка под поисковой формой ---------- */
.iskander-yandex-hint {
    margin: 8px 0 0;
    font-size: 14px;
    color: #666;
    text-align: center;
}

/* ---------- Вторая кнопка «Я» рядом с основной ---------- */
.search-input-wrapper {
    display: flex;
    align-items: stretch;
    gap: 0;
}
.search-input-wrapper .field {
    flex: 1 1 auto;
    min-width: 0;
}
.search-input-wrapper .search-submit {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
.search-input-wrapper .search-submit-yandex {
    flex: 0 0 auto;
    padding: 0 16px;
    margin-left: 4px;
    background: #fc3f1d;
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
    font-size: 16px;
    transition: background-color 0.15s ease;
}
.search-input-wrapper .search-submit-yandex:hover {
    background: #e63616;
}

/* ---------- Атрибуция в блоке Википедии ---------- */
.wiki-attribution {
    font-size: 13px;
    color: #666;
    margin-top: 12px;
}

/* ============================================================
   Кнопка «Скачать Яндекс с Алисой» (современный дизайн)
   Показывается только на десктопе (≥ 769px),
   на мобильных скрыта.
   ============================================================ */
.yandex-app-block {
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.yandex-app-button {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px 12px 14px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.04),
        0 4px 16px rgba(0, 0, 0, 0.06);
    text-decoration: none !important;
    color: #1a1a1a !important;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
                 "Helvetica Neue", Arial, sans-serif;
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
    max-width: 100%;
}

.yandex-app-button:hover,
.yandex-app-button:focus-visible {
    transform: translateY(-2px);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.05),
        0 12px 32px rgba(252, 63, 29, 0.14);
    border-color: rgba(252, 63, 29, 0.35);
    color: #1a1a1a !important;
    text-decoration: none;
}

.yandex-app-button:active {
    transform: translateY(0);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.06),
        0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Иконка в фирменном круге */
.yandex-app-button__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fc3f1d 0%, #ff6a3d 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(252, 63, 29, 0.28);
}

/* Текст: две строки */
.yandex-app-button__text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1.25;
    min-width: 0;
}

.yandex-app-button__title {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
    white-space: nowrap;
}

.yandex-app-button__subtitle {
    font-size: 12.5px;
    color: #6b6b6b;
    margin-top: 2px;
    white-space: nowrap;
}

/* Стрелка справа */
.yandex-app-button__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #9b9b9b;
    transition: transform 0.18s ease, color 0.18s ease;
    flex: 0 0 auto;
}

.yandex-app-button:hover .yandex-app-button__arrow,
.yandex-app-button:focus-visible .yandex-app-button__arrow {
    color: #fc3f1d;
    transform: translateX(3px);
}

/* ============================================================
   Адаптив
   ============================================================ */
@media (max-width: 768px) {
    .iskander-yandex-button--big {
        display: block;
        text-align: center;
        padding: 14px 18px;
        font-size: 16px;
    }
    .iskander-yandex-inline-cta {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

    /* Скрываем кнопку скачивания Яндекса на мобильных */
    .yandex-app-block {
        display: none !important;
    }
}

/* ============================================================
   Тёмная тема браузера
   ============================================================ */
@media (prefers-color-scheme: dark) {
    .yandex-app-button {
        background: #1f1f1f;
        border-color: rgba(255, 255, 255, 0.08);
        color: #f5f5f5 !important;
    }
    .yandex-app-button__title {
        color: #f5f5f5;
    }
    .yandex-app-button__subtitle {
        color: #a0a0a0;
    }
    .yandex-app-button:hover,
    .yandex-app-button:focus-visible {
        color: #f5f5f5 !important;
    }
}