.custom-bm-btn-wrap {
    margin: 15px 0;
    width: 100%;
    display: block;
}

.custom-bm-btn-wrap .bp-messages-button,
.custom-bm-btn-wrap a,
.custom-bm-btn-wrap button {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important; 
    padding: 14px 20px !important;
    background-color: #f26522 !important; 
    color: #ffffff !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    text-decoration: none !important;
    border-radius: 8px !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 6px rgba(242, 101, 34, 0.2) !important;
    box-sizing: border-box !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
}

.custom-bm-btn-wrap .bp-messages-button:hover,
.custom-bm-btn-wrap a:hover,
.custom-bm-btn-wrap button:hover {
    background-color: #d8571c !important; 
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(242, 101, 34, 0.3) !important;
}

.tg-contact-form {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important; 
    max-width: 100% !important; 
    margin: 20px 0 !important;
    box-sizing: border-box !important;
}

.tg-contact-form input, 
.tg-contact-form textarea {
    width: 100% !important;
    padding: 14px !important;
    border: 1px solid #ddd !important;
    border-radius: 8px !important;
    box-sizing: border-box !important;
    font-size: 15px !important;
    font-family: inherit !important;
}

.tg-contact-form input:focus, 
.tg-contact-form textarea:focus {
    border-color: #2AABEE !important;
    outline: none !important;
}

.tg-contact-form button {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important; 
    padding: 14px 20px !important;
    background-color: #2AABEE !important; 
    color: white !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    box-shadow: 0 4px 6px rgba(42, 171, 238, 0.2) !important;
    transition: all 0.3s ease !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
}

.tg-contact-form button:hover {
    background-color: #1c92d2 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 12px rgba(42, 171, 238, 0.3) !important;
}

.tg-form-result {
    margin-top: 10px !important;
    font-weight: 600 !important;
    color: #333 !important;
    text-align: center !important;
}

.custom-auth-wrap {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
    width: 100%;
}

.social-login-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.custom-auth-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1; 
    min-width: 200px; 
    padding: 14px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none !important;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    box-sizing: border-box;
}

.tg-btn {
    background: #2AABEE;
    color: #fff !important;
    box-shadow: 0 4px 6px rgba(42, 171, 238, 0.2);
}

.tg-btn:hover {
    background: #1c92d2;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(42, 171, 238, 0.3);
}

.tg-btn svg {
    width: 22px;
    height: 22px;
    margin-right: 10px;
    fill: currentColor;
}

.tg-status-text {
    font-size: 13px;
    color: #657786;
    margin-top: 10px;
    text-align: center;
}

.tg-pulse-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    background: #ffb822;
    border-radius: 50%;
    margin-right: 5px;
    animation: authPulse 1.5s infinite;
}

@keyframes authPulse { 
    0% { opacity: 0.4; } 
    50% { opacity: 1; } 
    100% { opacity: 0.4; } 
}

.fc-wrapper {
    width: 100%;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
    background: #fdfdfd;
    border: 1px solid #eaeaea;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
    box-sizing: border-box;
}

.fc-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.fc-input {
    width: 100%;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 16px;
    transition: border-color 0.3s;
}

.fc-input:focus {
    border-color: #2AABEE;
    outline: none;
}

.fc-input-code {
    text-align: center;
    letter-spacing: 5px;
    font-size: 20px;
    font-weight: bold;
}

.fc-btn-send, .fc-btn-verify {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
}

.fc-btn-send { background: #4a5568; color: #fff; }
.fc-btn-send:hover { background: #2d3748; }
.fc-btn-verify { background: #10B981; color: #fff; }
.fc-btn-verify:hover { background: #059669; }

.fc-msg {
    font-size: 13px;
    color: #e53e3e;
    margin-top: 8px;
    min-height: 18px;
}

.auth-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 25px 0;
    color: #a0aec0;
}

.auth-separator hr {
    flex: 1;
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 0;
}

.auth-separator span {
    padding: 0 15px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

@media (max-width: 768px) {
    
    .social-login-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .custom-auth-btn {
        width: 100%;
        min-width: 100%;
    }
    
    
    .fc-wrapper {
        padding: 15px;
    }
}

.directorist-single-info:has(.tg-contact-form),
.directorist-single-info__value:has(.tg-contact-form) {
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
    flex: 1 1 100% !important;
}

.theme-banner-content.theme-breadcrumb-banner,
.breadcrumb-wrapper {
    padding-top: 20px !important;    
    padding-bottom: 10px !important; 
    min-height: 0 !important;        
    background-color: #ffffff !important; 
    background-image: none !important;    
}

.theme-banner-content.theme-breadcrumb-banner::before,
.breadcrumb-wrapper::before {
    display: none !important;
    background: transparent !important;
}

:root {
  --dk-orange: #ff6a00;
  --dk-gold: #ffd200;
}

.custom-hero-banner {
  background-color: var(--dk-orange);
  background-image: none;
  box-shadow: 0 14px 40px rgba(255, 106, 0, 0.28);
  border-radius: 0 0 1.25rem 1.25rem;
  padding: clamp(1.5rem, 5vw, 2.75rem) clamp(1rem, 4vw, 1.5rem);
  margin-bottom: clamp(1rem, 3vw, 1.75rem);
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.custom-hero-banner > * { 
  position: relative; 
  z-index: 1; 
}

.custom-hero-banner h1, 
.custom-hero-banner h2, 
.custom-hero-banner .hero-text {
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.12);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .custom-hero-banner {
    width: 100vw;
    max-width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    text-align: center;
    border-radius: 0 0 16px 16px;
  }
}

@media (min-width: 769px) {
  .custom-hero-banner { 
    box-shadow: 5px 5px 5px 5px rgba(255, 106, 0, 0.22); 
  }
}

#dk-main-id.dk-main-wrapper { position: relative; width: 100%; margin-bottom: 0px; }
#dk-main-id .dk-logic-input { display: none; }
#dk-main-id .dk-frame {
  border: 3px solid var(--dk-orange);
  border-radius: 16px 16px 0 0;
  background: #fff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#dk-main-id .dk-section-letter {
  position: relative;
  padding: 6px;
  background: #fff;
  z-index: 10;
}
#dk-main-id .dk-founder-flex { display: flex; gap: 20px; align-items: flex-start; }
#dk-main-id .dk-photo {
  width: 80px; height: 80px;
  border-radius: 12px 12px 0 0; object-fit: cover; flex-shrink: 0;
}
#dk-main-id .dk-letter-limit {
  flex-grow: 1; height: 80px; overflow: hidden; transition: all 0.5s ease; position: relative;
}
#dk-main-id .dk-letter-full-text p { font-size: 16px; color: #000; margin-bottom: 12px; line-height: 1.4; }
#dk-main-id .dk-letter-limit::after {
  content: ""; position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(transparent, rgba(255, 255, 255, 0.99)); pointer-events: none; z-index: 2;
}
#dk-main-id .dk-glass-arrow {
  display: flex; justify-content: center; align-items: center;
  cursor: pointer; color: var(--dk-orange); transition: transform 0.4s ease;
  margin-top: -15px; position: relative; z-index: 10;
}
#dk-main-id .dk-glass-arrow svg { width: 120px; height: 25px; }
#dk-main-id #top-open:checked ~ .dk-frame .dk-letter-limit { height: auto; }
#dk-main-id #top-open:checked ~ .dk-frame .dk-letter-limit::after { display: none; }
#dk-main-id #top-open:checked ~ .dk-frame .dk-glass-arrow { transform: rotate(180deg); }

@media (max-width: 600px) {
  #dk-main-id .dk-founder-flex { flex-wrap: nowrap; gap: 10px; }
  #dk-main-id .dk-photo { border-radius: 12px; }
  #dk-main-id .dk-letter-limit { flex: 1 1 0; min-width: 0; }
  #dk-main-id .dk-glass-arrow { width: auto; margin-left: 90px; margin-top: -25px; }
  #dk-main-id .dk-glass-arrow svg { max-width: 100px; }
  #dk-main-id #top-open:checked ~ .dk-frame .dk-founder-flex { flex-wrap: wrap; }
  #dk-main-id #top-open:checked ~ .dk-frame .dk-letter-limit {
    flex-basis: 100%; height: auto; max-height: 250px;
    overflow-y: auto; margin-top: 10px; margin-left: 0;
  }
  #dk-main-id #top-open:checked ~ .dk-frame .dk-glass-arrow { width: 100%; margin-left: 0; }
}

#dk-main-id .dk-section-orange { background: var(--dk-orange); padding: 14px; text-align: center; }
#dk-main-id .dk-crimea-h1 { color: #fff; font-size: 26px; margin-bottom: 20px; font-weight: bold; line-height: 1.2; }
#dk-main-id .dk-btn-shiny {
  position: relative; display: inline-block; padding: 8px 16px;
  background: linear-gradient(135deg, var(--dk-gold) 0%, var(--dk-orange) 100%);
  color: #fff; font-weight: bold; font-size: 16px; border-radius: 16px;
  cursor: pointer; overflow: hidden; border: 2px solid #fff;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
#dk-main-id .dk-shimmer-effect {
  position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
}
@keyframes dk-shimmer-move { 0% { left: -100%; } 20% { left: 150%; } 100% { left: 150%; } }

.dk-guide-overlay {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%; 
  background: rgba(0, 0, 0, 0.15);
  z-index: 999999; display: none; opacity: 0; transition: opacity 0.4s; 
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}

.dk-guide-bubble {
  position: absolute; width: 280px; background: #fff; border: 3px solid var(--dk-orange);
  border-radius: 20px; padding: 20px; box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2); z-index: 1000000;
  text-align: center; font-weight: bold; color: #333; opacity: 0; visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.dk-guide-bubble.active { opacity: 1; visibility: visible; }
.dk-guide-bubble::after { content: ""; position: absolute; border: 12px solid transparent; }
.dk-guide-bubble[data-pos="bottom"]::after { top: -24px; left: 50%; margin-left: -12px; border-bottom: 12px solid var(--dk-orange); border-top: 0; }
.dk-guide-bubble[data-pos="top"]::after, .dk-guide-bubble[data-pos="down"]::after { bottom: -24px; left: 50%; margin-left: -12px; border-top: 12px solid var(--dk-orange); border-bottom: 0; }

.dk-tour-highlight {
  position: relative; z-index: 9999999; background: #fff; pointer-events: none;
  box-shadow: 0 0 0 5px #fff, 0 0 25px var(--dk-orange); border-radius: 5px;
}

@keyframes dk-flash-anim {
  0%, 100% { box-shadow: 0 0 0 5px #fff, 0 0 20px var(--dk-orange); transform: scale(1); }
  50% { box-shadow: 0 0 0 10px #fff, 0 0 40px var(--dk-orange); transform: scale(1.02); }
}

.dk-tour-flash { animation: dk-flash-anim 0.4s ease-in-out 3; }
.dk-tour-flash-short { animation: dk-flash-anim 0.3s ease-in-out 1; }

.dk-guide-next {
  margin-top: 15px; display: inline-block; padding: 10px 25px; background: var(--dk-orange);
  color: #fff; border-radius: 50px; cursor: pointer; font-size: 13px; text-transform: uppercase; transition: 0.2s;
}

.dk-guide-next:hover { transform: scale(1.05); }

.dk-guide-bubble[data-step="0"] { border-color: #2fb45a; }
.dk-guide-bubble[data-step="0"][data-pos="bottom"]::after { border-bottom-color: #2fb45a; }
.dk-guide-bubble[data-step="0"] .dk-guide-next { background: #2fb45a; }

@media (max-width: 767px) {
    .hide-on-mobile, 
    .hide-on-mobile * { 
        display: none !important; 
    }
}

@media (min-width: 768px) {
    .hide-on-desktop, 
    .hide-on-desktop * { 
        display: none !important; 
    }
}

@media (max-width: 767px) {
    .directorist-search-contents .directorist-search-form-action {
        gap: 18px;
    }

    .directorist-search-form-action__filter,
    .directorist-search-form-action__submit {
        flex: 0 0 auto;
        width: auto;
        margin: 0 2px;
    }

    .directorist-search-form-action__filter .directorist-filter-btn,
    .directorist-search-form-action__submit .directorist-btn-search {
        height: 44px;
        padding-left: 12px;
        padding-right: 12px;
        font-size: 15px;
        white-space: nowrap;
        line-height: 1.2;
        box-sizing: border-box;
    }

    .directorist-search-form-action__filter .directorist-icon-mask {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 1199px) {
    .directorist-user-dashboard__nav {
        -webkit-transition: all 0.8s ease !important;
        transition: all 0.8s ease !important;
    }
    
    .directorist-shade {
        -webkit-transition: all 0.8s ease !important;
        transition: all 0.8s ease !important;
    }
}

@media (min-width: 1200px) {
    .directorist-user-dashboard__nav {
        align-self: flex-start !important; 
        height: max-content !important;    
        padding-bottom: 20px !important;   
    }
}

/* dash-width-fix-v1: begin */
/* ---------------------------------------------------------------
   ШИРИНА КАБИНЕТА — приведена к колонке сайта.

   Проблема: кабинет стоит в .directorist-container-fluid, у которого
   в ядре Directorist width:100% без max-width, а .directorist-row
   тянется через min-width:100% и отрицательные margin. Из-за этого
   содержимое растягивалось на всю ширину экрана.

   Решение: ограничиваем рабочую колонку кабинетом сайта (1320px),
   гасим отрицательные margin, таблицу скроллим внутри неё.

   ВАЖНО: html { overflow-x: hidden } здесь НЕ применяем —
   он ломает position:sticky у шапки сайта (пропадал зазор).
   --------------------------------------------------------------- */

/* 1. Рабочая колонка кабинета = колонка сайта, по центру */
.directorist-user-dashboard .directorist-container-fluid,
.directorist-dashboard .directorist-container-fluid {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

/* 2. Ряд кабинета: убираем min-width:100% и вылет за контейнер */
.directorist-user-dashboard .directorist-row {
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
}

.directorist-user-dashboard .directorist-row > * {
    padding-left: 0;
    padding-right: 0;
}

/* 3. Таблица объявлений: на узком экране скроллим её саму, не страницу */
.directorist-user-dashboard-tabcontent {
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* 4. Медиа не шире своей колонки */
img,
iframe,
video {
    max-width: 100%;
}

/* 5. На мобильных контейнер кабинета — во всю ширину с отступами */
@media (max-width: 767px) {
    .directorist-user-dashboard .directorist-container-fluid {
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .directorist-user-dashboard-tabcontent {
        border-radius: 8px;
    }
}
/* dash-width-fix-v1: end */

/* dash-profile-fix-v1: begin */
/* ---------------------------------------------------------------
   КАБИНЕТ: карточка профиля над сеткой кабинета.

   Проблема: карточка (аватар + имя + бейдж роли) вставлена прямо в
   #content.site-content, минуя .theme-container, и не имеет ни класса,
   ни max-width — только inline-стили. Растягивалась на весь экран.

   Решение: ограничиваем её колонкой сайта по тем же inline-стилям.
   --------------------------------------------------------------- */

#content > div[style*="margin-bottom: 30px"][style*="gap: 15px"],
#primary > div[style*="margin-bottom: 30px"][style*="gap: 15px"],
.theme-container > div[style*="margin-bottom: 30px"][style*="gap: 15px"] {
    max-width: 1320px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

@media (max-width: 767px) {
    #content > div[style*="margin-bottom: 30px"][style*="gap: 15px"],
    #primary > div[style*="margin-bottom: 30px"][style*="gap: 15px"] {
        max-width: 100%;
        margin-left: 12px;
        margin-right: 12px;
        box-sizing: border-box;
    }
}
/* dash-profile-fix-v1: end */

/* dash-empty-state-v1: begin */
/* ---------------------------------------------------------------
   ПУСТОЕ СОСТОЯНИЕ «МОИ ОБЪЯВЛЕНИЯ».

   Разметку выводит functions.php (фильтр the_content): текст и
   ссылка на создание объявления. Здесь только оформление.

   Призыв — обычная текста-ссылка в цвете бренда, не кнопка:
   на мобильных она остаётся в пределах экрана даже внутри
   широкой скроллящейся таблицы.
   --------------------------------------------------------------- */

.dlk-empty-state {
    padding: 26px 16px;
    text-align: center;
}

.dlk-empty-state__text {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.4;
}

.dlk-empty-state__link {
    color: #ff6a00 !important;
    font-size: 16px;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
    -webkit-tap-highlight-color: transparent;
}

.dlk-empty-state__link:hover,
.dlk-empty-state__link:focus {
    color: #e65f00 !important;
    text-decoration: underline;
}

/* Мобильные: компактнее и выровнено по левому краю ячейки */
@media (max-width: 767px) {
    .dlk-empty-state {
        padding: 20px 0;
        text-align: left;
    }

    .dlk-empty-state__text {
        font-size: 15px;
    }

    .dlk-empty-state__link {
        display: inline-block;
        font-size: 15px;
        line-height: 1.4;
    }
}
/* dash-empty-state-v1: end */

/* dash-tg-box-v1: begin */
/* ---------------------------------------------------------------
   ПРОФИЛЬ: блок привязки Telegram в кабинете.

   Разметка приходит с инлайн-стилями (рамка #eee, отсутпы 20px,
   кнопка во всю ширину), поэтому перебиваем их точечно.

   Что делаем:
   1) рамка — нативный цвет Telegram (#0088cc) на всех экранах;
   2) на мобильных — кнопка компактнее (не во всю ширину);
   3) на мобильных — меньше отступы вокруг блока.
   --------------------------------------------------------------- */

/* 1. Рамка в фирменном цвете Telegram */
#tg-bind-box {
    border: 2px solid #0088cc !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-sizing: border-box;
}

/* Кнопка наследует бренд-цвет и скруглую форму */
#tg-bind-btn {
    background-color: #0088cc !important;
    border-radius: 6px !important;
    -webkit-tap-highlight-color: transparent;
}

#tg-bind-btn:hover,
#tg-bind-btn:focus {
    background-color: #0077b3 !important;
}

/* 2–3. Мобильные: компактная кнопка и плотные отступы */
@media (max-width: 767px) {
    #tg-bind-box {
        max-width: 100% !important;
        margin: 12px auto !important;
        padding: 12px !important;
    }

    /* Подпись над кнопкой — чуть мельче и с меньшим зазором */
    #tg-bind-box > div:first-child {
        margin-bottom: 8px !important;
        font-size: 12px !important;
    }

    /* Кнопка по контенту, а не на всю ширину */
    #tg-bind-btn {
        display: inline-block !important;
        width: auto !important;
        max-width: 100% !important;
        padding: 9px 18px !important;
        font-size: 14px !important;
        line-height: 1.2 !important;
    }

    /* Меньше отступов между карточкой профиля, блоком TG и кабинетом */
    #tg-bind-box + .directorist-user-dashboard,
    #tg-bind-box ~ .directorist-user-dashboard {
        margin-top: 0 !important;
    }

    .directorist-user-dashboard-tabcontent {
        margin-top: 8px !important;
    }

    /* Профиль: сжимаем вертикальные зазоры между группами полей */
    .directorist-user-profile-box .directorist-card__body {
        padding: 14px !important;
    }

    .directorist-user-info-wrap > div {
        margin-bottom: 12px !important;
    }

    .directorist-user-info-wrap .directorist-form-group {
        margin-bottom: 10px !important;
    }

    .directorist-user-info-wrap .directorist-form-group:last-child {
        margin-bottom: 0 !important;
    }

    /* Двухколоночные группы полей на мобильных — в одну колонку */
    .directorist-user-full-name,
    .directorist-user-first-name,
    .directorist-user-email,
    .directorist-user-site-url,
    .directorist-user-password {
        display: block !important;
    }

    /* Блок фото профиля — меньше отступ снизу */
    .directorist-image-profile-wrap {
        margin-bottom: 12px !important;
    }

    .directorist-user-profile-edit {
        margin-bottom: 12px !important;
    }
}
/* dash-tg-box-v1: end */
