/*HEADER */
.container-new {
    margin-right: auto;
    margin-left: auto;
    max-width: 90%;
}

.adress-header-new {
    margin-bottom: 35px;
    line-height: 40px;
}

.title-new {
    color: #000000;
    font-weight: 600;    
    font-size: 40px;
}

/*FILTERS */
.filters-new {
    margin-bottom: 25px;
}

.filters-wrap-new {
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Разрешаем перенос на новую строку */
    position: relative;
    gap: 15px;
}

.filter-new {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-new h6 {
    white-space: nowrap;
    margin: 0;
    font-size: 16px;
}

.filter-new p {
    margin: 0;
    position: relative;
    display: flex;
    align-items: center;
}

.filter-new img {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none; /* чтобы не мешала клику по select */
    width: 11px; /* подстройте под свой размер */
    height: auto;
}

.filter-new:last-child {
    margin-left: auto;
    white-space: normal; /* Разрешаем перенос для кнопок */
}

.filter-new a {
    display: inline-block;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    height: 40px;
    line-height: 18px;
}

.reset-btn-new {
    /* background: #f0f0f0; */
    color: #000000;
    margin-right: 10px;
}

.shown-btn-new {
    background: #007bff;
    color: #fff;
    /* color: #8001b3; */
}

.custom-select {
    position: relative;
    width: 290px;
    height: 40px;
}

.custom-select[disabled] {
    opacity: 0.6;
    pointer-events: none;
}

.select-selected {
    padding: 8px;
    border: none;
    border-radius: 7px;
    height: 40px;
    cursor: pointer;
    position: relative;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    font-size: 15px;
    color: #000000;
}

.select-selected::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border: 2px solid #666;
    border-width: 0 2px 2px 0;
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.2s;
}

.custom-select.active .select-selected::after {
    transform: translateY(-50%) rotate(225deg);
}

.select-items {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #f4f4f4;
    border-radius: 4px;
    margin-top: 4px;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 1000;
}

.custom-select.active .select-items {
    display: block;
}

.select-items div {
    padding: 8px 10px;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 15px;
}

.select-items div:hover {
    background: #f4f4f4;
}

.select-items div.selected {
    color: #000000;
    font-weight: 500;
}
.metro-circle {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 8px;
    vertical-align: middle;
}

.metro-circle-transfer {
    background-size: 100% 100%;
}

.select-selected .metro-circle {
    width: 8px;
    height: 8px;
    margin-right: 6px;
}

.select-items div .metro-circle {
    width: 10px;
    height: 10px;
    margin-right: 8px;
}

.select-selected span,
.select-items div span:last-child {
    display: inline-block;
    vertical-align: middle;
}

/*MAP */
.outer-items-new {
    width: 100%;
    margin-bottom: 60px;
    position: relative;
}

/* Контейнер поиска */
.search-container {
    margin-bottom: 15px;
    top: 0;
    background: #fff;
    
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    z-index: 1000;
}

/* Поле поиска */
.address-search {
    width: 100%;
    border: none;
    border-radius: 15px;
    box-sizing: border-box;
    background-color: #F4F4F4;
    padding: 16px;
    color: #6B7280;
    font-size: 16px;
    text-align: left; /* Курсор слева */
    min-width: 0;
}

.address-search::placeholder {
    color: #6B7280;
    text-align: start;
    font-size: 18px;
}

/* Сообщение "Нет совпадений" */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 30px;
    text-align: center;
    border: 1px solid #EEEEEE;
    border-radius: 15px;

}

.no-results-icon {
    width: 31px;
    height: 31px;
    margin-bottom: 15px;
    opacity: 0.7;
}

.no-results-text {
    font-size: 16px;
    color: #D51C37;
}

.row-map-new {
    display: flex;
    gap: 20px;
    justify-content: space-between;
}

.map-wrap-new {
    flex: 1; /* Карта занимает всё доступное пространство */
    min-width: 0; /* Предотвращает переполнение */
    border-radius: 15px;
}

/* Контейнер со списком адресов */
.adress-wrap-new {
    flex: 0 0 450px; /* Фиксированная ширина для адресов */
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    background: #fff;
    padding: 20px;
    overflow-y: auto;
}


/* Каждый элемент адреса */
.adress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    border-radius: 15px;
    background: #ffffff;
    margin-bottom: 10px;
    transition: all 0.2s ease;
    border: 1px solid #EEEEEE;
}

/* Стили для текста адреса */
.adr-w {
    flex: 1;
}

.adr-w p {
    margin: 0;
    padding: 0;
}

.adr {
    color: #6B7280;
    display: block;
    font-size: 15px;
    line-height: 24px;
}

.city-name {
    font-weight: 600;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

/* Стили для метро */
.metro {
    font-size: 13px;
    color: #6B7280;
    vertical-align: middle;
    font-size: 15px;
    line-height: 24px;
}

/* Стили для блока с золотом (если используется) */
.gold-wrap {
    min-width: 60px;
    text-align: right;
    font-weight: bold;
    color: #d4af37;
    align-self: flex-start; /* Прижимаем к верху */
    display: flex;
    justify-content: flex-end;
    align-items: flex-start;
    padding-top: 4px; /* Небольшой отступ сверху для выравнивания */
}

/* Шеврон справа */
.chevron {
    width: 30px;
    height: 30px;
    cursor: pointer;
    transition: transform 0.3s ease;
    display: flex;
    align-items: flex-start; /* Прижимаем содержимое к верху */
    justify-content: center;
}

.chevron img {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
    align-self: flex-start; /* Иконка тоже вверху */
}

/* Расширенная информация - отдельный блок снизу */
/* Общий контейнер для адреса и деталей */
.address-container {
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    background: #fff;
}

/* Основной элемент адреса */
.adress-item {
    padding: 16px 16px 0 16px;
    border: none;
    border-radius: 0;
    background: inherit;
    position: relative;
    z-index: 1;
}

.address-container:not(.expanded) .adress-item {
    border-radius: 12px;
}

/* Расширенная информация */
.address-details {
    padding: 0 16px 16px 16px;
    border: none;
    border-radius: 0;
    background: inherit;
    display: none;
}

.address-container.expanded .address-details {
    display: block;
    border-radius: 0 0 12px 12px;
}

/* Общие стили для расширенного состояния */
.address-container.expanded {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.address-container.expanded .adress-item {
    border-radius: 12px 12px 0 0;
}
/* Кнопки действий */
.address-actions {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.btn-call,
.btn-write {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 5px 10px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
    height: 40px;
    flex: 1;
    cursor: pointer;
}

.btn-call {
    background: #F2CC38;
    color: white;
    display: flex;
    gap: 5px;
    font-size: 15px;
    line-height: 24px;

}

.btn-write {
    background: #000000;
    color: white;
    display: flex;
    gap: 5px;
    font-size: 15px;
    line-height: 24px;
}

/* Режим работы */
.work-hours {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    padding: 12px;
    background: #f5f5f5;
    border-radius: 8px;
    font-size: 14px;
}

.work-label {
    font-weight: 600;
    color: #333;
}

.work-time {
    color: #666;
}

/* Что принимает ломбард */
.accepts-section {
    margin-top: 12px;
}

.accepts-title {
    font-weight: 700;
    color: #172439;
    margin-bottom: 12px;
    font-size: 18px;
    align-content: center;
    text-align: left;
}

.accepts-items {
    gap: 12px;
    display: flex;
    justify-content: space-evenly;
}

.accepts-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 2px;

    font-size: 13px;
    color: #555;
}

.accepts-icon {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
    padding: 10px;
    border-radius: 100%;
    background-color: #F4F4F4;
}

.accepts-icon img {
    width: 50px;
    height: 50px;
}

.accepts-text {
    font-size: 15px;
    color: #000000;
    width: 100px;
    text-align: center;
}

.select-items {
    scrollbar-color: #F5E6AC #ffffff !important;
}
 
.adress-wrap-new {
    scrollbar-color: #F5E6AC #F4F4F4 !important;
}

/* Модальное окно */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;

}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 20px 30px;
    border-radius: 12px;
    text-align: center;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
        position: relative; /* КРИТИЧЕСКИ ВАЖНО для правильной работы absolute */
    padding-bottom: 50px; /* Место внизу под уведомление */
}

.modal-content h3 {
    margin-top: 0;
    font-size: 18px;
    color: #333;
}

#modalPhone {
    font-size: 20px;
    font-weight: bold;
    margin: 10px 0;
    color: #007bff;
}

.call-link {
    display: inline-block;
    margin-top: 10px;
    color: #007bff;
    text-decoration: none;
    font-weight: bold;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.phones-container {
    margin-top: 15px;
    text-align: center;
}

.modal-phone-link {
    display: block;
    margin: 12px 0;
    font-size: 19px;
    font-weight: bold;
    color: #0066cc;
    text-decoration: none;
    line-height: 1.4;
    padding: 6px 0;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.modal-phone-link:hover {
    background-color: #f5f9ff;
    text-decoration: underline;
}

.modal-phone-link:active {
    background-color: #e6f0ff;
}

.copy-notification {
    position: absolute;
    bottom: 15px;      /* Отступ от НИЖНЕГО края .modal-content */
    left: 50%;
    transform: translateX(-50%);
    background: #4CAF50;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.25s ease;
    white-space: nowrap; /* Запрещает перенос текста на новую строку */
    z-index: 100;        /* Чтобы уведомление было поверх всего внутри модалки */
    pointer-events: none; /* Чтобы не мешало кликать на номера */
}


.copy-notification.show {
    opacity: 1;
}

@media (max-width: 1350px) {
    .filters-wrap-new {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    
    .filter-new {
        width: 100%;
        justify-content: space-between;
    }
    
    .custom-select {
        max-width: 100%;
    }
    
    .filter-new:last-child {
        margin-left: 0;
        display: flex;
        justify-content: flex-end;
        gap: 10px;
    }
    
    .filter-new a {
        padding: 8px 16px;
        font-size: 15px;
    }

    .custom-select {
        width: 100% !important; /* Растягиваем на всю ширину */
        max-width: 100%;
    }

    .filter-new h6 {
        flex: 0 0 200px; /* Фиксированная ширина заголовков */
        white-space: nowrap;
        margin: 0;
        font-size: 16px;
    }
}

/* Адаптивность - при уменьшении экрана адреса падают под карту */
@media (max-width: 992px) {
    .row-map-new {
        flex-wrap: wrap; /* Включаем перенос только на маленьких экранах */
    }
    
    .map-wrap-new {
        flex: 0 0 100%; /* Карта занимает всю ширину */
    }
    
    .adress-wrap-new {
        flex: 0 0 100%; /* Адреса тоже занимают всю ширину */
        margin-top: 20px; /* Отступ сверху при переносе */
    }
}

@media (max-width: 480px) {

   .filter-new {
        flex-direction: column; /* Заголовок над селектом */
        align-items: flex-start; /* Выравнивание по левому краю */
        gap: 8px; /* Отступ между заголовком и селектом */
    }
    
    .filter-new h6 {
        flex: unset !important; /* Сбрасываем фиксированную ширину */
        margin: 0;
        width: 100%; /* Заголовок на всю ширину */
    }
    
    .custom-select {
        width: 100% !important; /* Селект на всю ширину */
        max-width: 100%;
    }
    
    .filter-new a {
        padding: 6px 12px;
        font-size: 13px;
    }
    
    .select-selected {
        font-size: 14px;
        padding: 8px 10px;
    }
    
    /* Кнопки "Сбросить" тоже на всю ширину */
    .filter-new:last-child {
        width: 100%;
        justify-content: flex-end;
    }
    
    .filter-new:last-child a {
        width: 100%;
        text-align: center;
    }


    /* Шеврон остаётся справа */
    .gold-wrap {
        min-width: 50px;
        padding-top: 0;
        justify-content: flex-end !important;
    }
    
    .chevron {
        width: 28px;
        height: 28px;
        align-items: center !important; /* Центрируем по вертикали */
        justify-content: flex-end !important;
    }
    
    .chevron img {
        width: 14px;
        height: 14px;
        align-self: center !important; /* Центрируем иконку */
    }
    
    /* Уменьшаем иконки в расширенном варианте */
    .accepts-icon {
        width: 50px !important;
        height: 50px !important;
        padding: 8px !important;
    }
    
    .accepts-icon img {
        width: 35px !important;
        height: 35px !important;
    }
    
    .accepts-text {
        font-size: 12px !important;
        width: 80px !important;
    }
    
    /* Кнопки действий */
    .address-actions {
        flex-direction: column;
        gap: 8px !important;
    }
    
    .btn-call,
    .btn-write {
        height: 36px !important;
        font-size: 13px !important;
        padding: 6px 12px !important;
    }
    
    .btn-call img,
    .btn-write img {
        width: 16px !important;
        height: 16px !important;
    }
    
    /* Отступы */
    .adress-item {
        padding: 12px 12px 0 12px !important;
    }
    
    .address-details {
        padding: 0 12px 12px 12px !important;
    }
    
    .accepts-title {
        font-size: 16px !important;
        margin-bottom: 10px !important;
    }
    
    .accepts-items {
        gap: 8px !important;
        flex-wrap: wrap; /* Разрешаем перенос на новую строку */
        justify-content: center !important;
    }
    
    .accepts-item {
        gap: 6px !important;
        padding: 0 !important;
    }
    
    /* Уменьшение шрифтов */
    .city-name {
        font-size: 14px !important;
        margin-bottom: 3px !important;
    }
    
    .adr {
        font-size: 13px !important;
        line-height: 20px !important;
    }
    
    .metro {
        font-size: 12px !important;
        line-height: 20px !important;
    }
    
    /* Метро кружок */
    .metro-circle {
        width: 8px !important;
        height: 8px !important;
    }
    
    .metro-circle-transfer {
        width: 12px !important;
        height: 8px !important;
    }
    
    /* Заголовок секции */
    .accepts-title {
        font-size: 15px !important;
    }
}

/* Адаптив для мобильных */
@media screen and (max-width: 480px) {
  .form-footer {
    padding: 0 10px !important;
  }
  
  .forms-field-label1 {
    font-size: 13px !important;
    line-height: 1.3 !important;
    margin-bottom: 8px !important;
    display: block !important;
  }
  
  .form-field-large {
    width: 100% !important;
    max-width: 100% !important;
    font-size: 14px !important;
    padding: 12px !important;
    box-sizing: border-box !important;
  }
  
  .sum-percent {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 10px !important;
    font-size: 14px !important;
    line-height: 1.3 !important;
  }
  
  .wpforms-submit-container {
    width: 100% !important;
    text-align: center !important;
  }
  
  .wpforms-submit-container .forms-submit {
    width: 100% !important;
    max-width: 280px !important;
    font-size: 14px !important;
/*     padding: 12px 20px !important; */
    white-space: normal !important;
    word-wrap: break-word !important;
    box-sizing: border-box !important;
  }
}

/* Для очень маленьких экранов */
@media screen and (max-width: 320px) {
  .form-footer {
    padding: 0 5px !important;
  }
  
  .forms-field-label1 {
    font-size: 12px !important;
  }
  
  .form-field-large {
    padding: 10px !important;
    font-size: 13px !important;
  }
  
  .sum-percent {
    font-size: 13px !important;
  }
  
  .forms-submit {
    max-width: 100% !important;
/*     padding: 10px 15px !important;
 */    font-size: 13px !important;
  }
}