/* ==========================================================
   Раздел «Рестораны»: фильтры и статус «Открыто / Закрыто»
   (inc/restorany-filters.php, assets/restorany-filters.js)
   ========================================================== */

/* ---------- Статус ---------- */
.rf-status {
    display: inline-flex; align-items: center; gap: 6px;
    font: 600 13px/1.3 'Inter', sans-serif;
    white-space: nowrap;
}
.rf-status::before {
    content: ''; width: 8px; height: 8px; border-radius: 50%; flex: none;
    background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 18%, transparent);
}
.rf-status.is-open   { color: #16a34a; }
.rf-status.is-soon   { color: #ea8a00; }
.rf-status.is-closed { color: #e5413b; }

/* в карточке «главное» записи — рядом с часами работы */
.rb-row dd .rf-status { display: flex; margin-top: 4px; }

/* ---------- Строка в карточке ленты ---------- */
.rf-info {
    display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px;
    padding: 0 20px 10px;
    font: 500 13px/20px 'Inter', sans-serif; color: #6b6e74;
}
.rf-info .rf-status { margin-right: 4px; }
.rf-info__sep { color: #c8cdd5; }
@media (max-width: 768px) { .rf-info { padding: 0 16px 10px; } }
@media (min-width: 600px) { #main .post-cards > .post-card .rf-info { padding: 0 16px 8px; } }
@container (max-width: 260px) {
    #main .post-cards > .post-card .rf-info { padding: 0 10px 6px; font-size: 12px; line-height: 17px; }
    #main .post-cards > .post-card .rf-info .rf-status { font-size: 12px; white-space: normal; }
    #main .post-cards > .post-card .rf-info__item,
    #main .post-cards > .post-card .rf-info__sep { display: none; }
}

/* ---------- Панель фильтров ---------- */
.rf {
    position: relative;
    background: #fff; border-radius: 16px;
    padding: 14px 16px 12px; margin: 0 0 12px;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.rf.is-loading { opacity: .6; pointer-events: none; transition: opacity .2s; }
.rf__row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* кнопки-выпадашки */
.rf-dd { position: relative; }
.rf-dd__btn {
    display: inline-flex; align-items: center; gap: 6px;
    height: 38px; padding: 0 14px; border: 1px solid #e3e6ea; border-radius: 10px;
    background: #fff; color: #1c1c1c; cursor: pointer;
    font: 500 14px/1 'Inter', sans-serif;
    max-width: 240px;
    transition: border-color .15s ease, background .15s ease;
}
.rf-dd__btn:hover { border-color: #c9ced6; }
.rf-dd__label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rf-dd__arrow { flex: none; color: #9e9fa3; transition: transform .2s ease; }
.rf-dd.is-open .rf-dd__arrow { transform: rotate(180deg); }
.rf-dd.is-chosen .rf-dd__btn { background: #eef5fd; border-color: #2d81e0; color: #1f6fcb; }
.rf-dd.is-chosen .rf-dd__arrow { color: #2d81e0; }

.rf-dd__panel {
    position: absolute; left: 0; top: calc(100% + 6px); z-index: 40;
    width: 300px; max-width: calc(100vw - 24px);
    background: #fff; border-radius: 14px;
    box-shadow: 0 12px 34px rgba(0,0,0,.16), 0 0 0 1px rgba(0,0,0,.05);
    display: flex; flex-direction: column;
    opacity: 0; visibility: hidden; transform: translateY(-4px);
    transition: opacity .15s ease, transform .15s ease, visibility .15s;
}
.rf-dd.is-open .rf-dd__panel { opacity: 1; visibility: visible; transform: none; }
.rf-dd__head { display: none; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.rf-dd__title { font-weight: 700; font-size: 17px; color: #1c1c1c; }
.rf-dd__close { border: 0; background: #f2f4f7; width: 32px; height: 32px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; color: #3b3d41; }

.rf-dd__search {
    margin: 10px 10px 4px; height: 38px; padding: 0 12px;
    border: 1px solid #e3e6ea !important; border-radius: 10px !important; background: #f7f8fa !important;
    font: 400 14px 'Inter', sans-serif; color: #1c1c1c; outline: none; box-shadow: none !important;
}
.rf-dd__search:focus { border-color: #2d81e0 !important; background: #fff !important; }
.rf-dd__list { max-height: 320px; overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.rf-dd__nothing { padding: 14px 10px; color: #9e9fa3; font-size: 14px; text-align: center; }

.rf-opt {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 8px; cursor: pointer;
    font-size: 14px; line-height: 1.3; color: #1c1c1c;
    margin: 0 !important;
}
.rf-opt[hidden] { display: none; }
.rf-opt:hover { background: #f2f4f7; }
.rf-opt input { position: absolute; opacity: 0; pointer-events: none; }
.rf-opt__box {
    flex: none; width: 18px; height: 18px; border-radius: 5px;
    border: 1.5px solid #c3c8d0; background: #fff;
    display: flex; align-items: center; justify-content: center;
    transition: background .12s ease, border-color .12s ease;
}
.rf-opt input:checked + .rf-opt__box { background: #2d81e0; border-color: #2d81e0; }
.rf-opt input:checked + .rf-opt__box::after {
    content: ''; width: 9px; height: 5px; margin-top: -2px;
    border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg);
}
.rf-opt input:focus-visible + .rf-opt__box { box-shadow: 0 0 0 3px rgba(45,129,224,.3); }
.rf-opt__label { flex: 1; min-width: 0; }
.rf-opt__n { color: #9e9fa3; font-size: 12px; font-variant-numeric: tabular-nums; }
.rf-opt.is-empty { opacity: .45; }

.rf-dd__foot { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #eef0f3; }
.rf-btn {
    flex: 1; height: 38px; border-radius: 10px; border: 0; cursor: pointer;
    font: 600 14px/1 'Inter', sans-serif;
    transition: background .15s ease;
}
.rf-btn--ghost { background: #f2f4f7; color: #3b3d41; }
.rf-btn--ghost:hover { background: #e7eaee; }
.rf-btn--primary { background: #2d81e0; color: #fff; }
.rf-btn--primary:hover { background: #1f6fcb; }

/* открыто / закрыто */
.rf-toggle {
    display: inline-flex; align-items: center; gap: 7px;
    height: 38px; padding: 0 14px; border-radius: 10px;
    border: 1px solid #e3e6ea; background: #fff;
    font: 500 14px/1 'Inter', sans-serif; color: #1c1c1c !important; text-decoration: none !important;
    transition: border-color .15s ease, background .15s ease;
}
.rf-toggle:hover { border-color: #c9ced6; }
.rf-toggle__dot { width: 8px; height: 8px; border-radius: 50%; background: #16a34a; }
.rf-toggle--closed .rf-toggle__dot { background: #e5413b; }
.rf-toggle__n { color: #9e9fa3; font-size: 12px; }
.rf-toggle--open.is-active { background: #ecfdf3; border-color: #16a34a; color: #12813b !important; }
.rf-toggle--closed.is-active { background: #fef0ef; border-color: #e5413b; color: #c42b25 !important; }
.rf-toggle.is-active .rf-toggle__n { color: inherit; opacity: .7; }

/* быстрые фильтры — как на restoran.ru */
.rf__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.rf__chips:empty { display: none; }
.rf-chip {
    display: inline-flex; align-items: center; gap: 7px;
    height: 34px; padding: 0 16px; border-radius: 999px;
    background: #eceef1; border: 1.5px solid transparent;
    font: 500 14px/1 'Inter', sans-serif; color: #1c1c1c !important; text-decoration: none !important;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}
.rf-chip:hover { background: #e2e5e9; }
.rf-chip:active { transform: scale(.97); }
.rf-chip__ico { font-size: 15px; line-height: 1; }
.rf-chip--wedding  { background: #fff; border-color: #7c5cd6; }
.rf-chip--birthday { background: #fff; border-color: #f0898a; }
.rf-chip--wedding:hover  { background: #f6f2ff; }
.rf-chip--birthday:hover { background: #fff3f3; }
.rf-chip.is-active { background: #2d81e0; border-color: #2d81e0; color: #fff !important; }
.rf-chip--wedding.is-active  { background: #7c5cd6; border-color: #7c5cd6; }
.rf-chip--birthday.is-active { background: #e5585a; border-color: #e5585a; }

/* найдено / выбранные */
.rf__summary {
    display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px;
    margin-top: 12px; padding-top: 12px; border-top: 1px solid #eef0f3;
    font-size: 14px; color: #3b3d41;
}
.rf__found b { color: #1c1c1c; }
.rf__tags { display: flex; flex-wrap: wrap; gap: 6px; }
.rf-tag {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 6px 4px 10px; border-radius: 8px; background: #eef5fd;
    font-size: 13px; color: #1f6fcb !important; text-decoration: none !important;
}
.rf-tag span { font-size: 16px; line-height: 1; opacity: .7; }
.rf-tag:hover span { opacity: 1; }
.rf__reset { margin-left: auto; color: #2d81e0 !important; font-weight: 500; text-decoration: none !important; }
.rf__reset:hover { text-decoration: underline !important; }

.rf-backdrop { display: none; }

/* ---------- Телефон: панель снизу ---------- */
@media (max-width: 640px) {
    .rf { border-radius: 12px; padding: 12px; margin-left: 0; margin-right: 0; }
    .rf__row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -12px; padding: 0 12px 2px; scrollbar-width: none; }
    .rf__row::-webkit-scrollbar { display: none; }
    .rf-dd, .rf-toggle { flex: none; }
    .rf-dd__btn, .rf-toggle { height: 36px; padding: 0 12px; font-size: 13px; }
    .rf__chips { flex-wrap: nowrap; overflow-x: auto; margin: 10px -12px 0; padding: 0 12px; scrollbar-width: none; }
    .rf__chips::-webkit-scrollbar { display: none; }
    .rf-chip { flex: none; height: 32px; padding: 0 13px; font-size: 13px; }
    .rf__reset { margin-left: 0; }

    .rf-dd { position: static; }
    .rf-dd__panel {
        position: fixed; left: 0 !important; right: 0 !important; bottom: 0; top: auto;
        width: 100%; max-width: none; max-height: 80vh;
        border-radius: 18px 18px 0 0; transform: translateY(100%);
        transition: transform .25s ease, visibility .25s, opacity .2s;
        z-index: 100001;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .rf-dd.is-open .rf-dd__panel { transform: none; }
    .rf-dd__head { display: flex; }
    .rf-dd__list { max-height: none; flex: 1; }
    .rf-opt { padding: 11px 10px; font-size: 15px; }
    .rf-btn { height: 44px; font-size: 15px; }

    .rf-backdrop:not([hidden]) {
        display: block; position: fixed; inset: 0; z-index: 100000;
        background: rgba(15, 18, 24, .45);
    }
    html.rf-lock, html.rf-lock body { overflow: hidden; }
}

/* ==========================================================
   SEO-посадочные: перелинковка, хабы, факты, ТОП, FAQ (inc/restorany-landings.php)
   ========================================================== */

.lp-nav {
    background: #fff; border-radius: 16px; padding: 18px 20px; margin-top: 16px;
    font-family: 'Inter', sans-serif;
}
.lp-nav__h { font-size: 20px !important; margin: 0 0 12px !important; color: #1c1c1c; }
.lp-nav__group + .lp-nav__group { margin-top: 14px; }
.lp-nav__title { font-size: 13px; font-weight: 600; color: #6b7280; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 8px; }
.lp-nav__title a { color: inherit !important; text-decoration: none !important; }
.lp-nav__title a:hover { color: #2d81e0 !important; }
.lp-nav__list { display: flex; flex-wrap: wrap; gap: 6px; }
.lp-chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 32px; padding: 0 12px; border-radius: 16px;
    background: #f3f4f6; color: #1c1c1c !important; font-size: 14px; line-height: 1;
    text-decoration: none !important; transition: background .15s, color .15s;
}
.lp-chip span { color: #9ca3af; font-size: 12px; }
.lp-chip:hover { background: #e8f1fc; color: #2d81e0 !important; }
.lp-chip--all { background: none; color: #2d81e0 !important; font-weight: 500; }
.lp-chip--hub { background: #eef2ff; }

/* Хаб */
.lp-hub { background: #fff; border-radius: 16px; padding: 18px 20px; margin-top: 16px; font-family: 'Inter', sans-serif; }
.lp-hub__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.lp-hub__card {
    display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; border-radius: 12px;
    background: #f7f8fa; text-decoration: none !important; transition: background .15s, transform .15s;
}
.lp-hub__card:hover { background: #e8f1fc; transform: translateY(-1px); }
.lp-hub__name { color: #1c1c1c; font-weight: 600; font-size: 15px; }
.lp-hub__n { color: #6b7280; font-size: 13px; }
.lp-hub__letter { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px solid #f0f1f3; }
.lp-hub__letter:last-child { border-bottom: 0; }
.lp-hub__l { flex: none; width: 24px; font-weight: 700; font-size: 18px; color: #2d81e0; }
.lp-hub__list { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.lp-hub__item { color: #1c1c1c !important; text-decoration: none !important; font-size: 15px; }
.lp-hub__item span { color: #9ca3af; font-size: 12px; }
.lp-hub__item:hover { color: #2d81e0 !important; }

/* Текст посадочной */
.lp-seo a { color: #2d81e0; }
.lp-facts { margin: 0 0 12px !important; padding-left: 20px !important; }
.lp-facts li { margin: 0 0 6px !important; }
.lp-top { margin: 0 0 12px !important; padding-left: 22px !important; }
.lp-top li { margin: 0 0 10px !important; }
.lp-top li > a { font-weight: 600; }
.lp-top__meta { display: block; color: #6b7280; font-size: 13px; }
.lp-top__st { display: block; margin-top: 2px; font-size: 13px; }
.lp-faq__item { border-top: 1px solid #f0f1f3; padding: 10px 0; }
.lp-faq__item:first-child { border-top: 0; padding-top: 0; }
.lp-faq__q { font-weight: 600; color: #1c1c1c; margin: 0 0 4px !important; }
.lp-faq__a { margin: 0 !important; }

@media (max-width: 640px) {
    .lp-nav, .lp-hub { border-radius: 12px; padding: 16px; }
    .lp-hub__grid { grid-template-columns: 1fr 1fr; }
    .lp-chip { height: 30px; font-size: 13px; }
}

/* Хаб подборок: ленты нет — сортировка не нужна */
.lp-hub-page .rb-sort { display: none; }
