/* Простейший вариант текста по центру (прелоадер в мои объявления) */
#my-listings .listings_table .table_body {
    position: relative;
}

#my-listings .listings_table .table_body.gr-preloader-active {
    color: transparent;
    pointer-events: none;
}

#my-listings .listings_table .table_body .gr-preloader-holder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Подкрашивание кнопки Избранное */
.favorite_btn.in_fav svg path {
    stroke: #DA033D;
    stroke-width: 2px;
}
.announcements .inner .image_main .favorite_btn.in_fav, .favorite_btn.in_fav {
	background: url("data:image/svg+xml,<svg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'><path d='M12 3.61829C12.6383 3.2571 13.4585 3 14.5 3C17 3 19 4.63979 19 8C19 13.3245 11.9124 17.074 10.3165 17.8508C10.167 17.9236 10.0922 17.96 10 17.96C9.90782 17.96 9.83303 17.9236 9.68346 17.8508C8.08757 17.074 1 13.3245 1 8C1 4.63979 3 3 5.5 3C9 3 10 5.90323 10 5.90323L10.3 6.6' stroke='%23DA033D' stroke-opacity='0.5' stroke-width='2.5' stroke-linecap='round' /></svg>") 50% no-repeat;
}

/* Аватар для последних комментариев (если user_avatar пустой) */
.last_comments_wrap .item .image .avatar-initials {
    width: 44px;
    height: 44px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    line-height: 1;
    color: #fff;
    user-select: none;
}

/* В форме поиска скрываем стрелки у полей выбора цены */
/* Chrome, Safari, Edge, Opera */
.field.price input::-webkit-outer-spin-button,
.field.price input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Firefox */
.field.price input[type=number] {
  -moz-appearance: textfield;
}

/* Превью изображений в форме подачи объявления */
.listing_upload_preview {
    margin-top: 12px;
}

.listing_upload_preview_list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.listing_upload_preview_item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 8px 10px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    background: #fff;
    cursor: grab;
    width: 110px;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

ul.listing_upload_preview_list li.listing_upload_preview_item:first-child {
    border: 1px solid rgba(0, 80, 74, 0.5);
}

.listing_upload_preview_item.dragging {
    opacity: 0.6;
}

.listing_upload_preview_item.drag-over {
    border-color: #00504a;
    background: rgba(0, 80, 74, 0.06);
}

.listing_upload_preview_image {
    width: 92px;
    height: 92px;
    border-radius: 6px;
    object-fit: cover;
    flex-shrink: 0;
    pointer-events: none;
    -webkit-user-drag: none;
}

.listing_upload_preview_meta {
    width: 100%;
    min-width: 0;
}

.listing_upload_preview_name {
    display: block;
    font-size: 12px;
    color: rgba(17, 17, 17, 0.8);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    padding-right: 18px;
}

.listing_upload_preview_remove {
    position: absolute;
    top: 2px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.listing_map_field {
    margin-top: 14px;
}

.listing_map_toggle {
    border: none;
    background: transparent;
    padding: 0;
    color: #00504a;
    font-size: 15px;
    text-decoration: underline;
    cursor: pointer;
}

.listing_map_block {
    margin-top: 10px;
}

.listing_map_address_label {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    color: rgba(17, 17, 17, 0.8);
}

.listing_map_address_input {
    width: 100%;
    margin-bottom: 10px;
    border: 1px solid rgba(17, 17, 17, 0.2);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.3;
}

.listing_map_address_input:focus {
    outline: none;
    border-color: #00504a;
    box-shadow: 0 0 0 2px rgba(0, 80, 74, 0.15);
}

.listing_map_canvas {
    width: 100%;
    height: 360px;
    border: 1px solid rgba(17, 17, 17, 0.2);
    border-radius: 8px;
    overflow: hidden;
}

.listing_map_hint {
    margin-top: 8px;
    font-size: 13px;
    color: rgba(17, 17, 17, 0.65);
}

.listing_map_marker {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #da033d;
    border: 2px solid #fff;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
    transform: translate(-50%, -50%);
}

/* Ссылка "Смотреть на карте" в карточке объявления */
.item_map_container {
    margin-top: 14px;
}

.item_map {
    margin-top: 14px;
    margin-bottom: 20px;
}

a.item_show_map {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #da033d;
    font-size: 17px;
    line-height: 1.2;
    text-decoration: none;
    border-bottom: 1px dotted rgba(218, 3, 61, 0.35);
    padding-bottom: 3px;
    margin-bottom: 20px;
}

a.item_show_map::before {
    content: '';
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12 22C12 22 19 15.6 19 10.2C19 6.22355 15.866 3 12 3C8.13401 3 5 6.22355 5 10.2C5 15.6 12 22 12 22Z' stroke='%23DA033D' stroke-width='1.8'/%3E%3Ccircle cx='12' cy='10' r='2.6' stroke='%23DA033D' stroke-width='1.8'/%3E%3C/svg%3E");
}

a.item_show_map:hover,
a.item_show_map:focus-visible {
    border-bottom-color: rgba(218, 3, 61, 0.7);
}

a.item_show_map:focus-visible {
    outline: none;
}

/* Dropdown сортировки в "Мои объявления" */
#my-listings .listings_filters {
    position: relative;
}

#my-listings .listings_filters .my_listings_sort_dropdown {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 220px;
    padding: 6px;
    border: 1px solid rgba(17, 17, 17, 0.15);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
    z-index: 50;
}

#my-listings .listings_filters .my_listings_sort_option {
    width: 100%;
    border: none;
    border-radius: 8px;
    background: transparent;
    text-align: left;
    padding: 10px 12px;
    color: rgba(17, 17, 17, 0.9);
    cursor: pointer;
}

#my-listings .listings_filters .my_listings_sort_option:hover,
#my-listings .listings_filters .my_listings_sort_option:focus-visible {
    background: rgba(0, 80, 74, 0.09);
    color: #00504a;
    outline: none;
}

.user_cabinet_section .listings_table .table_body .table_row .table_col span.rejection_reason {
    color: #da033d;
    font-size: 13px;
    line-height: 1.3;
    font-style: italic;
    display: block;
}

#my-listings .listings_table .table_body .table_row .table_col .btn_item_sold {
    margin-left: 8px;
    padding: 4px 10px;
    border: 1px solid #00504a;
    border-radius: 8px;
    background: #fff;
    color: #00504a;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    vertical-align: middle;
}

#my-listings .listings_table .table_body .table_row .table_col .btn_item_sold:disabled {
    opacity: 0.6;
    cursor: default;
}

#my-listings .listings_table .table_body .table_row .table_col .btn_item_sold:hover:not(:disabled) {
    background: rgba(0, 80, 74, 0.09);
}

/* Колонка «Подключенные опции» */
#my-listings .listings_table .table_header .table_col:nth-child(4),
#my-listings .listings_table .table_body .table_row .table_col:nth-child(4) {
    flex: 0 0 180px;
    text-align: left;
}

#my-listings .listings_table .table_body .table_row .table_col .listing_connected_options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

#my-listings .listings_table .table_body .table_row .table_col .listing_connected_option {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 13px;
    line-height: 1.3;
}

#my-listings .listings_table .table_body .table_row .table_col .listing_connected_option_label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    color: #da033d;
}

#my-listings .listings_table .table_body .table_row .table_col .listing_connected_option_label svg {
    flex-shrink: 0;
}

#my-listings .listings_table .table_body .table_row .table_col .listing_connected_option_until {
    display: inline; /* или block / inline-block, в зависимости от желаемой верстки */
    padding-left: 22px;
    font-size: 12px;
    color: rgba(17, 17, 17, 0.6);
}

/* Колонка «Управление» и кнопка Премиум */
#my-listings .listings_table .table_header .table_col:nth-child(5),
#my-listings .listings_table .table_body .table_row .table_col:nth-child(5) {
    flex: 0 0 130px;
    text-align: left;
}

#my-listings .listings_table .table_header .table_col:nth-child(6),
#my-listings .listings_table .table_body .table_row .table_col:nth-child(6) {
    flex: 0 0 160px;
    text-align: left;
}

#my-listings .listings_table .table_header .table_col:nth-child(7),
#my-listings .listings_table .table_body .table_row .table_col:nth-child(7) {
    flex: 0 0 140px;
}

#my-listings .listings_table .table_header .table_col:nth-child(8),
#my-listings .listings_table .table_body .table_row .table_col:nth-child(8) {
    flex: 0 0 24px;
    text-align: right;
}

#my-listings .listings_table .table_body .table_row .table_col .del {
    display: inline-block;
    vertical-align: top;
    width: 24px;
    height: 24px;
    cursor: pointer;
    background: url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M18.083 6.00391C18.6334 6.04977 19.042 6.53263 18.9961 7.08301L18.1494 17.249C18.0199 18.8038 16.7202 19.9998 15.1602 20H4.83984C3.27977 19.9998 1.98015 18.8038 1.85059 17.249L1.00391 7.08301C0.958041 6.53263 1.36662 6.04977 1.91699 6.00391C2.46737 5.95804 2.95023 6.36662 2.99609 6.91699L3.84375 17.083C3.88693 17.6012 4.31994 17.9998 4.83984 18H15.1602C15.6801 17.9998 16.1131 17.6012 16.1562 17.083L17.0039 6.91699C17.0498 6.36662 17.5326 5.95804 18.083 6.00391ZM10 7C10.5523 7 11 7.44772 11 8V15C11 15.5523 10.5523 16 10 16C9.44771 16 9 15.5523 9 15V8C9 7.44772 9.44771 7 10 7ZM10 0C10.5523 0 11 0.447715 11 1V2H19C19.5523 2 20 2.44772 20 3C20 3.55228 19.5523 4 19 4H1C0.447715 4 0 3.55228 0 3C0 2.44772 0.447715 2 1 2H9V1C9 0.447715 9.44771 0 10 0Z' fill='%23111111' fill-opacity='0.5'/%3E%3C/svg%3E%0A") 50% no-repeat;
}

#my-listings .listings_table .table_body .table_row .table_col .btn_item_premium {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid #da033d;
    border-radius: 8px;
    background: #fff;
    color: #da033d;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    text-decoration: none;
    vertical-align: middle;
    transition: background 0.2s;
}

#my-listings .listings_table .table_body .table_row .table_col .btn_item_premium:hover {
    background: rgba(218, 3, 61, 0.08);
}

#my-listings .listings_table .table_body .table_row .table_col .btn_item_premium svg {
    flex-shrink: 0;
}

/* Toast-уведомления */
.market-toast-container {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 0 20px;
    box-sizing: border-box;
    pointer-events: none;
}

.market-toast {
    pointer-events: auto;
    width: 100%;
    max-width: min(360px, calc(100vw - 40px));
    padding: 12px 16px;
    text-align: center;
    border-radius: 10px;
    border: 1px solid rgba(17, 17, 17, 0.12);
    background: #fff;
    color: rgba(17, 17, 17, 0.92);
    font-size: 14px;
    line-height: 1.4;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.14);
    cursor: pointer;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.market-toast--visible {
    opacity: 1;
    transform: translateY(0);
}

.market-toast--hiding {
    opacity: 0;
    transform: translateY(8px);
}

.market-toast--success {
    border-color: rgba(0, 80, 74, 0.35);
    background: #f3faf9;
    color: #00504a;
}

.market-toast--error {
    border-color: rgba(218, 3, 61, 0.35);
    background: #fff5f7;
    color: #b00233;
}

.market-toast--info {
    border-color: rgba(17, 17, 17, 0.12);
    background: #fff;
}

.date_bottom {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px 12px;
    justify-content: space-between;
    font-size: 12px;
    color: #888;
}

.comment_item .comment_container {
    display: flex;
  	justify-content: space-between;
}
  
.comment_item .box {
}

.glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    margin: -1% 40%;
    width: 100px;
}

.card_block .detals_block .params .col .row strong.cf_val_bold {
    font-weight: 700;
}

.comment_block .inner a.item {
    text-decoration: none;
}

.field label span.required_field {
    color: #da033d;
    margin-right: 3px;
}

/* Категория в форме редактирования — только просмотр */
.edit_listing_form .edit_category_name {
    padding: 10px 12px;
    border: 1px solid #d6d6d6;
    border-radius: 6px;
    background: #f5f5f5;
    color: #333;
    line-height: 1.4;
}

/* Поле с кнопкой действия (очистка e-mail) */
.edit_listing_form .field_with_action {
    display: flex;
    gap: 8px;
    align-items: stretch;
}

.edit_listing_form .field_with_action input {
    flex: 1;
    min-width: 0;
}

.edit_listing_form .btn_clear_email {
    flex-shrink: 0;
    padding: 0 14px;
    border: 1px solid rgba(17, 17, 17, 0.15);
    border-radius: 6px;
    background: #f5f5f5;
    color: #333;
    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
}

.edit_listing_form .btn_clear_email:hover:not(:disabled) {
    background: #ebebeb;
}

.edit_listing_form .btn_clear_email:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Миниатюры при редактировании объявления */
.preview_item {
    cursor: grab;
    transition: transform 0.2s ease;
    touch-action: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.preview_item:active {
    cursor: grabbing;
}

.preview_item.dragging {
    opacity: 0.5;
    transition: none;
}

.preview_item.over {
    border: 2px dashed #3498db; /* Подсветка цели при наведении */
    transform: scale(1.05);
}

.preview_item img {
    pointer-events: none;
    -webkit-user-drag: none;
}

/* Блокировка выделения текста на время touch-перестановки фото */
body.touch-reorder-active,
body.touch-reorder-active * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

.touch-reorder-ghost {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}

/* Превью изображения при наведении на название объявления */
.listing_image_preview {
    position: fixed;
    pointer-events: none;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.15s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    overflow: hidden;
    background: white;
}

.listing_image_preview img {
    display: block;
    width: 120px;
    height: 120px;
    object-fit: cover;
}

/* Группы в выпадающих списках */
.ts-dropdown .optgroup-header {
	font-weight: bold;
}

/* Информация о заказе на странице оплаты Premium */
.premium_order_data {
	max-width: 560px;
	margin: 0 0 20px;
	padding: 20px 24px;
	border: 1px solid rgba(0, 80, 74, 0.14);
	border-radius: 10px;
	background: #f3faf9;
}

.premium_order_data > p {
	margin: 0 0 14px;
	padding-bottom: 12px;
	border-bottom: 1px solid rgba(0, 80, 74, 0.12);
	font-weight: 600;
	font-size: 1.05em;
	color: #00504a;
}

.premium_order_data dl {
	display: grid;
	grid-template-columns: minmax(120px, 160px) 1fr;
	gap: 10px 20px;
	margin: 0;
}

.premium_order_data dt {
	margin: 0;
	color: #6b7280;
	font-size: 0.95em;
	line-height: 1.45;
}

.premium_order_data dd {
	margin: 0;
	color: #1a1a1a;
	font-weight: 500;
	line-height: 1.45;
	word-break: break-word;
}

.premium_order_total {
	display: inline-flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 4px 6px;
	margin: 0 0 8px;
	padding: 12px 18px;
	border-radius: 8px;
	background: #00504a;
	color: #fff;
	font-size: 1.05em;
	line-height: 1.3;
}

.premium_order_total strong {
	font-size: 1.35em;
	font-weight: 700;
}

@media (max-width: 480px) {
	.premium_order_data {
		padding: 16px;
	}

	.premium_order_data dl {
		grid-template-columns: 1fr;
		gap: 2px 0;
	}

	.premium_order_data dt {
		margin-top: 8px;
		font-size: 0.85em;
	}

	.premium_order_data dt:first-child {
		margin-top: 0;
	}
}

/* Автокомплит поиска */
.search-autocomplete-field {
	position: relative;
	z-index: 2;
}

.search-autocomplete {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	max-height: 360px;
	overflow-y: auto;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	border: 1px solid rgba(0, 0, 0, 0.08);
	z-index: 20;
}

.search-autocomplete__item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 12px;
	color: inherit;
	text-decoration: none;
	transition: background 0.15s;
}

.search-autocomplete__item:hover,
.search-autocomplete__item--active {
	background: #f3f6f9;
}

.search-autocomplete__image {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	border-radius: 8px;
	overflow: hidden;
	background: #f3f6f9;
}

.search-autocomplete__image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.search-autocomplete__content {
	flex: 1 1 auto;
	min-width: 0;
}

.search-autocomplete__title {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	color: #1a1a1a;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.search-autocomplete__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	margin-top: 4px;
	font-size: 13px;
	line-height: 1.3;
	color: #666;
}

.search-autocomplete__category {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.search-autocomplete__price {
	flex: 0 0 auto;
	font-weight: 600;
	color: #00504a;
	white-space: nowrap;
}

.search-autocomplete__status {
	padding: 16px;
	text-align: center;
	font-size: 14px;
	line-height: 1.4;
	color: #666;
}

.search-autocomplete__status--loading {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.search-autocomplete__status--error {
	color: #da033d;
}

.search-autocomplete__spinner {
	width: 18px;
	height: 18px;
	border: 2px solid #e5e9ed;
	border-top-color: #da033d;
	border-radius: 50%;
	animation: search-autocomplete-spin 0.7s linear infinite;
}

@keyframes search-autocomplete-spin {
	to {
		transform: rotate(360deg);
	}
}