/* ============================================================
   Kantor SEO Exchange Pair Page
   Использует существующие cx__* классы плагина.
   Здесь только то что отсутствует в kantor-rates-table.css.
   ============================================================ */

.kantor-seo-page {
    width: 100%;
    font-family: inherit;
}

.kantor-seo-page__inner {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

/* ── Заголовки ── */
.kantor-seo-page__h1 {
    font-size: clamp(22px, 4vw, 32px);
    font-weight: 700;
    color: #1a2340;
    margin: 32px 0 24px;
    line-height: 1.25;
}

.kantor-seo-page__h2 {
    font-size: 18px;
    font-weight: 600;
    color: #1a2340;
    margin: 0 0 12px;
}

/* ── Секции ── */
.kantor-seo-page__rate-block,
.kantor-seo-page__conversion,
.kantor-seo-page__chart-section,
.kantor-seo-page__other-cities,
.kantor-seo-page__pairs {
    margin-bottom: 40px;
}

.kantor-seo-page__conversion-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    margin-bottom: 40px;
}

.kantor-seo-page__conversion-grid .kantor-seo-page__conversion {
    margin-bottom: 0;
    min-width: 0;
}

.kantor-seo-page__currency-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    white-space: nowrap;
}

.kantor-seo-page__currency-label img {
    width: 24px;
    height: 18px;
    flex: 0 0 24px;
    object-fit: contain;
    border-radius: 2px;
}

/* ── График ── */
.kantor-seo-page__chart-tabs {
    margin-bottom: 16px;
}

.kantor-seo-page__chart-wrap {
    background: #fff;
    border: 1px solid #e8edf3;
    border-radius: 10px;
    padding: 16px;
    overflow: hidden;
}

.kantor-seo-page__chart-wrap canvas {
    width: 100% !important;
    max-height: 260px;
}

.kantor-seo-page__no-data {
    color: #8c9ab5;
    font-size: 14px;
    padding: 20px;
    background: #f4f7fb;
    border-radius: 8px;
    border: 1px dashed #d0d8e8;
}

/* ── Другие города: первые две ячейки объединяем ── */
.kantor-seo-page__other-cities .cx__row {
    grid-template-columns: 1fr 1fr 1fr;
}

/* ── Блок популярных пар ── */
.kantor-seo-page__pairs-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.kantor-seo-page__pair-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    background: #f4f7fb;
    border: 1.5px solid #e0e8f4;
    border-radius: 8px;
    text-decoration: none;
    color: #1a2340;
    font-size: 14px;
    font-weight: 600;
    transition: border-color .15s, background .15s, color .15s;
}

.kantor-seo-page__pair-link:hover {
    background: #eef5ff;
    border-color: #188de7;
    color: #188de7;
}

.kantor-seo-page__pair-link img {
    width: 24px;
    height: 18px;
    object-fit: contain;
    border-radius: 2px;
}

/* ── Адаптив (общие элементы страницы) ── */
@media (max-width: 600px) {
    .kantor-seo-page__h1 {
        font-size: 20px;
    }
    .kantor-seo-page__h2 {
        font-size: 16px;
    }
    .kantor-seo-page__chart-tabs {
        overflow-x: auto;
        white-space: nowrap;
        display: flex;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .kantor-seo-page__conversion-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    .kantor-seo-page__pairs-grid {
        gap: 8px;
    }
    .kantor-seo-page__pair-link {
        font-size: 13px;
        padding: 8px 12px;
    }
    .kantor-seo-page__other-cities .cx__row {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* ============================================================
   Двухколоночный верхний блок: таблица курса + калькулятор
   Таблица ВСЕГДА первая (order:1), калькулятор ВСЕГДА второй
   (order:2) — и на десктопе, и на мобильном.
   ============================================================ */

.kantor-seo-page__top-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
    margin-bottom: 40px;
}

.kantor-seo-page__top-left {
    order: 1;
    width: 100%;
    min-width: 0;
}

.kantor-seo-page__top-right {
    order: 2;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-width: 0;
}

/* ── Обёртка калькулятора ── */
.kantor-seo-page__calc-wrap .conv__card {
    max-width: 100%;
    box-shadow: 0 2px 20px rgba(24,59,130,.08);
}

/* Кнопка заявки под калькулятором */
.kantor-seo-page__order-btn {
    display: block;
    width: 100%;
    margin-top: 12px;
    padding: 15px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(90deg, #188de7 0%, #1265c0 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: opacity .15s, transform .12s;
    font-family: inherit;
    letter-spacing: .02em;
}

.kantor-seo-page__order-btn:hover {
    opacity: .9;
    transform: translateY(-1px);
}

/* Скрываем лоадер калькулятора на SEO-странице когда он внутри колонки
   (чтобы не двигал лейаут при загрузке) */
.kantor-seo-page__calc-wrap .conv__loading {
    min-height: 0;
}

/* Форма заявки — скрыта, открывается через Fancybox */
.kantor-seo-page__order-form-wrap {
    display: none;
}

@media (max-width: 768px) {
    .kantor-seo-page__top-grid {
        gap: 24px;
    }
    .kantor-seo-page__top-right {
        max-width: 100%;
        margin: 0;
    }
}

/* ============================================================
   Таблицы "Przelicz X na Y" — обычная table-разметка.
   Шрифты и отступы заданы явно и не зависят от .cx__rate-val
   (который в других блоках плагина используется для крупной
   строки текущего курса — отсюда и «огромный» шрифт).
   ============================================================ */

.kantor-seo-page__conv-table {
    width: 100% !important;
    max-width: 100%;
    border-collapse: separate !important;
    border-spacing: 0 8px;
    table-layout: fixed !important;
}

.kantor-seo-page__conv-table thead {
    display: table-header-group !important;
}

.kantor-seo-page__conv-table tbody {
    display: table-row-group !important;
}

.kantor-seo-page__conv-table .cx__col-header,
.kantor-seo-page__conv-table .cx__row {
    display: table-row !important;
    grid-template-columns: none !important;
}

.kantor-seo-page__conv-table th,
.kantor-seo-page__conv-table td {
    display: table-cell !important;
    width: 50% !important;
    padding: 12px 10px;
    box-sizing: border-box;
    vertical-align: middle;
    overflow: hidden;
    text-align: center;
    background: #f4f7fb !important;
    border: none !important;
}

/* Заголовок — чуть темнее основного фона */
.kantor-seo-page__conv-table .cx__col-header th {
    background: #e9eef6 !important;
}

/* Скругление у крайних ячеек, чтобы строки выглядели как карточки */
.kantor-seo-page__conv-table tr th:first-child,
.kantor-seo-page__conv-table tr td:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.kantor-seo-page__conv-table tr th:last-child,
.kantor-seo-page__conv-table tr td:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.kantor-seo-page__conv-table .kantor-seo-page__currency-label,
.kantor-seo-page__conv-table .cx__rate-val {
    font-size: 15px !important;
    font-weight: 600;
    color: #1a2340;
    line-height: 1.3;
}

.kantor-seo-page__conv-table th .kantor-seo-page__currency-label {
    font-size: 14px !important;
    font-weight: 700;
    color: #6a7794;
    text-transform: uppercase;
    letter-spacing: .02em;
}

/* Флаг + текст — центрируем и не даём иконке "съезжать" */
.kantor-seo-page__conv-table .kantor-seo-page__currency-label {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    vertical-align: middle;
}

.kantor-seo-page__conv-table .kantor-seo-page__currency-label img {
    width: 20px;
    height: 15px;
    flex: 0 0 20px;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    object-fit: contain;
}

@media screen and (max-width: 600px) {
    .kantor-seo-page__conv-table th,
    .kantor-seo-page__conv-table td {
        padding: 10px 6px;
    }

    .kantor-seo-page__conv-table .kantor-seo-page__currency-label,
    .kantor-seo-page__conv-table .cx__rate-val {
        font-size: 13px !important;
    }

    .kantor-seo-page__conv-table th .kantor-seo-page__currency-label {
        font-size: 11px !important;
    }

    .kantor-seo-page__conv-table .kantor-seo-page__currency-label img {
        width: 16px;
        height: 12px;
        flex: 0 0 16px;
    }
}


