:root {
    --tg-bg: var(--tg-theme-bg-color, #FFFFFF);
    --tg-secondary-bg: var(--tg-theme-secondary-bg-color, #F7F7F7);
    --tg-text: var(--tg-theme-text-color, #000000);
    --tg-hint: var(--tg-theme-hint-color, #999999);
    --tg-link: #3171ff;
    --tg-button: #3171ff;
    --tg-button-text: var(--tg-theme-button-text-color, #ffffff);

    /* Status colors */
    --status-active: #27ae60;
    --status-paused: #95a5a6;
    --status-pending: #2980b9;
    --status-rejected: #e74c3c;
    /* --- ДОБАВЛЕНО --- */
    --status-awaiting-payment: #f39c12; /* Оранжевый */
    /* --- КОНЕЦ --- */
}
body {
    background-color: var(--tg-bg);
    color: var(--tg-text);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    transition: background-color 0.3s ease;
}
/* чтобы при запуске приложения не показывалось ненужное */
#app-loader {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh; /* На весь экран */
  font-size: 1.2em;
  color: #888;
  /* Убираем 'display: none' отсюда, он не нужен */
}
[v-cloak] {
  display: none;
}
.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 15px;
}
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: var(--tg-bg);
    padding-top: 15px;
    padding-bottom: 10px;
    margin: -15px -15px 15px -15px;
}
.search-group {
    display: flex;
    align-items: center;
    gap: 4px;
    background-color: var(--tg-secondary-bg);
    border-radius: 12px;
    padding: 4px;
    margin: 0 15px;
    box-sizing: border-box;
}
.search-container {
    position: relative;
    flex-grow: 1;
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--tg-hint);
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 12px 20px 12px 45px;
    border-radius: 10px;
    border: none;
    background-color: transparent;
    font-size: 16px;
    color: var(--tg-text);
    box-sizing: border-box;
    height: 44px;
}
.search-input:focus { outline: none; box-shadow: none; }
.search-input::placeholder { color: var(--tg-hint); }
.header-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
    height: 44px;
    width: 44px;
    box-sizing: border-box;
}
.header-button-icon {
    width: 24px;
    height: 24px;
    color: var(--tg-text);
}
.categories {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 15px;
    scrollbar-width: none; /* Firefox */
}
.categories::-webkit-scrollbar { display: none; } /* Safari and Chrome */
.categories button {
    flex-shrink: 0; padding: 8px 16px; border-radius: 20px; border: none;
    background-color: var(--tg-secondary-bg); color: var(--tg-text); font-size: 14px; cursor: pointer;
}
.categories button.active { background-color: var(--tg-button); color: var(--tg-button-text); }
.ad-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}
.ad-card {
background-color: var(--tg-secondary-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    cursor: pointer;
    /* Используем flex-колонку для структуры */
    display: flex; 
    flex-direction: column;
}
.ad-card-header { 
    position: relative; 
    /* Не даем изображению сжиматься */
    flex-shrink: 0; 
}
.ad-card-img, .ad-card-img-placeholder {
display: block; 
    width: 100%; 
    /* --- ВОЗВРАЩАЕМ aspect-ratio и object-fit --- */
    aspect-ratio: 1 / 1; /* Квадратное изображение */
    object-fit: cover;   /* Масштабируем с обрезкой */
    /* --- КОНЕЦ ВОЗВРАЩЕНИЯ --- */
    background-color: #eef1f4; 
}
.ad-card-body {
    padding: 10px; /* Вернем старый padding */
    display: flex; 
    flex-direction: column;
    flex-grow: 1; /* Занимает оставшееся место */
    justify-content: space-between; /* Распределяем пространство */
    text-align: left; /* Выравнивание по левому краю */
    gap: 4px; /* Небольшой отступ между текстом */
}
.ad-card-body > div:first-child { display: flex; flex-direction: column; text-align: center; }
.ad-card-price { 
    font-size: 16px; 
    font-weight: bold; /* <<< Возвращаем жирный */
    margin: 0; 
    color: var(--tg-text); 
    /* Добавляем эти свойства, чтобы текст не убегал вправо */
    white-space: nowrap;      /* Запрещаем перенос строки */
    overflow: hidden;         /* Скрываем то, что не влезло */
    text-overflow: ellipsis;  /* Ставим многоточие */
}
.ad-card-title {
    font-size: 14px;
    margin: 0;
    line-height: 1.3;
    /* --- ⬇️ УБИРАЕМ ОГРАНИЧЕНИЕ ВЫСОТЫ ⬇️ --- */
    /* height: calc(1.3em * 2); */
    /* --- ⬆️ УБИРАЕМ ОГРАНИЧЕНИЕ ВЫСОТЫ ⬆️ --- */
    overflow: hidden; /* Оставим overflow на всякий случай, если текст ну ОЧЕНЬ длинный */
    color: var(--tg-text);
    /* Добавим поддержку переноса слов */
    word-break: break-word; /* Или 'break-all' если нужно жестче */
    white-space: normal; /* Разрешаем перенос строк */
}
.ad-card-city { 
    font-size: 13px; 
    color: var(--tg-hint); 
    margin: 0; 
    /* Добавляем эти свойства, чтобы текст не убегал вправо */
    white-space: nowrap;      /* Запрещаем перенос строки */
    overflow: hidden;         /* Скрываем то, что не влезло */
    text-overflow: ellipsis;  /* Ставим многоточие */
}
.ad-card-actions { 
    display: flex; 
    flex-direction: column; 
    gap: 8px; 
    margin-top: 10px; /* Чуть уменьшим отступ */
}
.card-button {
    width: 100%;
    border: none;
    padding: 10px 15px;
    border-radius: 10px;
    font-size: 14px;
    /* --- ⬇️ ВОЗВРАЩАЕМ ЖИРНЫЙ ШРИФТ ⬇️ --- */
    font-weight: bold; /* Или 600 */
    /* --- ⬆️ ВОЗВРАЩАЕМ ЖИРНЫЙ ШРИФТ ⬆️ --- */
    cursor: pointer;
    text-align: center;
}
.card-button.button-primary {
    background-color: var(--tg-button);
    color: var(--tg-button-text);
}
.card-button.button-secondary {
    background-color: var(--tg-secondary-bg);
    color: var(--tg-button);
    border: 1px solid var(--tg-button);
}
.detail-image-container {
    /* размер фото в карточке
    width: 350px; */
    /* размер фото в карточке на весь размер контейнера */
    width: 100%;
    max-width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    border-radius: 12px;
    background-color: var(--tg-secondary-bg);
    margin: 0 auto 20px auto;
    position: relative;
    overflow: hidden;
}
.detail-image-container img { display: block; width: 100%; height: 100%; object-fit: contain; }
.image-overlay-buttons { position: absolute; top: 12px; right: 12px; z-index: 10;}
.overlay-button {
    background-color: #ffffff;
    border-radius: 10px;
    width: 36px; height: 36px; border: none;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; padding: 0; box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: var(--tg-hint);
}
.overlay-button svg { width: 20px; height: 20px; }
.detail-price { font-size: 28px; font-weight: bold; margin: 0 0 10px 0; }
.detail-title { font-size: 22px; font-weight: 600; margin: 0; }
.detail-subtitle { font-size: 15px; color: var(--tg-hint); margin: 4px 0 10px 0; }
.detail-divider { height: 1px; background-color: var(--tg-hint); opacity: 0.2; margin: 20px 0; border: none; }
.detail-description { color: var(--tg-text); line-height: 1.6; white-space: pre-wrap; overflow-wrap: break-word; }
.info-view {
    text-align: center;
    position: relative;
    padding-top: 50px;
}
.info-header h3 { font-size: 22px; font-weight: 600; }
.info-content { line-height: 1.6; white-space: pre-wrap; color: var(--tg-text); }
.info-content strong { display: block; font-size: 16px; font-weight: bold; margin: 15px 0 5px 0; }
.info-close-btn {
    position: absolute;
    top: 0;
    right: 0;
    width: 36px;
    height: 36px;
    background-color: #ffffff;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    color: var(--tg-hint);
}
.info-close-btn svg {
    width: 20px;
    height: 20px;
}
/* * FIX: Прижимаем кнопки в карточке к низу экрана
 */
.sticky-actions {
    position: fixed; /* Используем fixed для прилипания к viewport */
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--tg-theme-bg-color, #ffffff);
    padding: 16px;
    box-sizing: border-box;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 100;
    display: flex;
    flex-direction: column;
    gap: 10px;
    /* Ограничиваем ширину и центрируем */
    max-width: 720px; /* Убедись, что это совпадает с max-width у .page-content */
    margin-left: auto;
    margin-right: auto;
}
/* * Эта обертка для контента (фото, описание), 
 * которая будет прокручиваться.
 */

.detail-scroll-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
    /* --- ⬇️ УВЕЛИЧЬ ЭТО ЗНАЧЕНИЕ ЕЩЁ БОЛЬШЕ ⬇️ --- */
    padding-bottom: 220px; /* Попробуй это или больше, если нужно */
    /* --- ⬆️ УВЕЛИЧЬ ЭТО ЗНАЧЕНИЕ ЕЩЁ БОЛЬШЕ ⬆️ --- */
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
}

/* Добавьте этот стиль, если у вас его ещё нет */
/* Он нужен, чтобы контейнер .detail-view, который содержит и прокручиваемый контент, и кнопки,
   имел правильную высоту и позволял прокручивать до нужного места. */
.detail-view {
    display: flex;          /* Используем flexbox */
    flex-direction: column; /* Элементы друг под другом */
    /* height: 100%;           *ВАЖНО: Занимает 100% высоты родителя (.page-content)* */
    overflow: hidden;       /* Запрещаем прокрутку этого контейнера */
    box-sizing: border-box;
}
.static-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 25px;
    padding-bottom: 0;
}
.action-button {
    background-color: #3171ff;
    border: none; padding: 15px; border-radius: 12px; font-size: 16px;
    font-weight: bold; cursor: pointer; width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    box-sizing: border-box;
}
.action-button.loading {
    cursor: not-allowed;
    opacity: 0.8;
}
.loader-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
.button-primary { background-color: var(--tg-button); color: var(--tg-button-text); }
.approve-button { background-color: #2cce6f; color: white; }
.edit-button { background-color: #FFA500; color: white; }
.delete-button { background-color: #DC143C; color: white; }
.reject-button { background-color: #DC143C; color: white; }
.cancel-button { background-color: #DC143C; color: white; }
.edit-view h2 { margin-top: 0; font-size: 24px; }
.form-group { margin-bottom: 15px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 14px; color: var(--tg-hint); font-weight: 500; }
.form-input, .form-textarea {
    width: 100%; padding: 12px; border: none; border-radius: 8px;
    background-color: var(--tg-secondary-bg); color: var(--tg-text);
    font-size: 16px; box-sizing: border-box; font-family: inherit;
}
.form-textarea { min-height: 100px; resize: vertical; }
.form-hint-inline {
    font-size: 13px;
    color: var(--tg-hint);
    margin: 5px 0 0 5px;
}
.footer {
    background-color: var(--tg-secondary-bg);
    padding: 30px 15px;
    margin-top: 30px;
}
.footer-container {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 25px;
}
.footer-section { display: flex; flex-direction: column; gap: 12px; }
.footer-title { font-size: 14px; color: var(--tg-hint); margin: 0; font-weight: 400; text-transform: none; }
.footer-links { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 20px; }
.footer-link { text-decoration: none; color: var(--tg-text); font-size: 15px; font-weight: 500; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.link-emoji { font-size: 20px; width: 24px; text-align: center; }
.footer-socials { display: flex; gap: 15px; flex-wrap: wrap; }
.footer-phone { font-size: 20px; font-weight: 600; color: var(--tg-text); cursor: pointer; }
.footer-credits { text-align: center; color: var(--tg-hint); font-size: 14px; padding-bottom: 0; margin-top: 10px; }
.panel-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.4);z-index:1000;opacity:0;transition:opacity .3s ease;pointer-events:none}.side-panel{position:fixed;top:0;right:0;width:80%;max-width:320px;height:100vh;background-color:#fff;z-index:1001;transform:translateX(100%);transition:transform .3s ease;padding:20px;box-sizing:border-box;display:flex;flex-direction:column;gap:30px;overflow-y:auto}.panel-overlay.is-open{opacity:1;pointer-events:auto}.side-panel.is-open{transform:translateX(0)}.side-panel-header{display:flex;align-items:center;gap:12px;margin-bottom:0}.side-panel-logo-rect{width:auto;height:40px;display:flex;align-items:center;flex-shrink:0}.side-panel-logo-rect img{height:100%;width:auto;object-fit:contain;display:block}.side-panel-title{font-size:16px;font-weight:600;color:#000}.side-panel-links-container,.side-panel-section{display:flex;flex-direction:column;gap:15px}.side-panel-subtitle{font-size:13px;color:#8e8e93;font-weight:400;flex-basis:100%;}.side-panel-links{display:flex;flex-direction:column;gap:20px}.side-panel-link{text-decoration:none;color:#000;display:flex;align-items:center;gap:15px;font-size:16px;font-weight:500}.side-panel-phone{font-size:18px;font-weight:600;cursor:pointer;color:#000}.side-panel-socials{display:flex;gap:15px;flex-wrap: wrap;}
.modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background-color:rgba(0,0,0,.5);display:flex;align-items:center;justify-content:center;z-index:2500}
.modal-window{
    background-color: #ffffff;
    padding:20px; border-radius:14px;
    width:90%; max-width:340px; box-shadow:0 4px 20px rgba(0,0,0,.15); position:relative;
}
.modal-close-btn{position:absolute;top:10px;right:10px;width:30px;height:30px;border:none;background:0 0;cursor:pointer;padding:0;z-index:10}.modal-close-btn::before{content: '\2716';font-size:16px;color:var(--tg-hint)}.modal-window.contact-modal{text-align:center;padding:30px 25px}.contact-modal-title{font-size:17px;font-weight:600;margin-top:0;margin-bottom:25px;color:var(--tg-text)}.contact-modal-body{display:flex;flex-direction:column;gap:18px;margin-bottom:0}.contact-item{font-size:17px;color:var(--tg-hint);cursor:pointer}.contact-item a{text-decoration:none;color:inherit}.contact-item .contact-value{font-weight:500;color:var(--tg-link)}

/* .social-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; padding: 10px; box-sizing: border-box; color: #fff; }
.social-icon.tg { background-color: #2aabee; }
.social-icon.vk { background-color: #0077ff; }
.social-icon.yt { background-color: red; }
.social-icon svg { width: 100%; height: 100%; } */

/* --- Стили для иконок соцсетей (SVG с фоном) --- */

/* Общие стили для контейнера иконки (ссылки <a>) */
.social-icon {
    display: block; /* Чтобы размеры работали */
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    border-radius: 12px; /* Закругленные углы */
    text-decoration: none;
    transition: opacity 0.2s;
    overflow: hidden; /* Обрезаем, если SVG больше контейнера */
}

.social-icon:hover {
    opacity: 0.9;
}

/* Стили для изображения SVG внутри ссылки */
.social-icon img {
    display: block; /* Убирает лишние отступы под картинкой */
    width: 100%;    /* Заполняет контейнер по ширине */
    height: 100%;   /* Заполняет контейнер по высоте */
    object-fit: cover; /* Масштабирует SVG, чтобы покрыть контейнер */
}

/* --- КОНЕЦ СТИЛЕЙ ДЛЯ ИКОНОК --- */


/* Фикс для иконок в боковой панели */
.side-panel .social-icon {
  flex-shrink: 0; /* Запрещаем растягиваться */
  /* Размеры уже заданы в .social-icon, можно не дублировать */
  /* width: 48px; */
  /* height: 48px; */
}
/* Разрешаем перенос иконок в боковой панели */
.side-panel-socials {
  display: flex;
  gap: 10px;      /* Отступ между иконками */
  flex-wrap: wrap; /* Разрешаем перенос */
}

/* --- ИЗМЕНЕНО: Добавлены стили для иконок разных типов --- */
.toast-notification{
    position:fixed;
    bottom:85px; /* Выше основной кнопки TWA */
    left:50%;
    transform:translateX(-50%);
    background-color:rgba(44, 44, 46, 0.85); /* Полупрозрачный темный фон */
    color:#fff;
    padding:10px 20px;
    border-radius:8px;
    z-index:3000;
    font-size:14px;
    display:flex;
    align-items:center;
    gap:8px;
    backdrop-filter: blur(5px); /* Размытие фона для iOS-стиля */
    -webkit-backdrop-filter: blur(5px);
    fill: none;
}
.toast-notification svg{color:#34c759;} /* Зеленая иконка по умолчанию (success) */
.toast-notification.info svg { color: #007aff; } /* Синяя для info */
.toast-notification.error svg { color: #ff3b30; } /* Красная для error */
/* --- КОНЕЦ ИЗМЕНЕНИЯ --- */

.toast-enter-active,.toast-leave-active{transition:opacity .3s,transform .3s}.toast-enter-from,.toast-leave-to{opacity:0;transform:translate(-50%,10px)}.sort-modal-overlay{position:fixed;top:0;left:0;width:100%;height:100%;background:rgba(0,0,0,.4);z-index:1500;display:flex;align-items:flex-start;justify-content:center}.sort-modal-window{background:#fff;width:100%;max-width:none;border-radius:0 0 12px 12px;padding:0;box-sizing:border-box;margin-top:0;box-shadow:0 4px 20px rgba(0,0,0,.15);transition:transform .3s ease}.fade-enter-from .sort-modal-window,.fade-leave-to .sort-modal-window{transform:translateY(-100%)}.sort-modal-header{display:block;padding:15px 15px 10px;font-size:16px;font-weight:600;color:#000;border-bottom:none}.sort-modal-options{display:flex;flex-direction:column;padding:5px 15px 15px}.sort-modal-option{display:flex;align-items:center;padding:12px 0;border-bottom:none;cursor:pointer}.sort-modal-option input[type=radio]{-webkit-appearance:none;appearance:none;width:22px;height:22px;border:2px solid #c7c7cc;border-radius:50%;margin-right:15px;position:relative;flex-shrink:0}.sort-modal-option input[type=radio]:checked{border-color:var(--tg-button)}.sort-modal-option input[type=radio]:checked::after{content:'';display:block;width:12px;height:12px;background-color:var(--tg-button);border-radius:50%;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.sort-modal-option span{font-size:16px;color:#000}
.scroll-top-button{position:fixed;left:15px;bottom:15px;width:48px;height:48px;background-color:#fff;color:var(--tg-hint);border-radius:12px;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;box-shadow:0 4px 12px rgba(0,0,0,.1);z-index:999}.scroll-top-button svg{width:24px;height:24px}
.loader,.placeholder{text-align:center;color:var(--tg-hint);margin-top:50px;font-size:16px}.fade-enter-active,.fade-leave-active{transition:opacity .2s ease}.fade-enter-from,.fade-leave-to{opacity:0}
.form-group-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #fff;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.form-group-toggle label {
    margin-bottom: 0;
    font-weight: 500;
    color: var(--tg-text);
}
.toggle-container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.toggle-switch {
    width: 52px;
    height: 32px;
    background-color: #e9e9eb;
    border-radius: 16px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}
.toggle-switch.active {
    background-color: #34c759;
}
.toggle-handle {
    width: 28px;
    height: 28px;
    background-color: white;
    border-radius: 50%;
    position: absolute;
    top: 2px;
    left: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: transform 0.2s ease-in-out;
}
.toggle-switch.active .toggle-handle {
    transform: translateX(20px);
}
.toggle-label {
    font-size: 16px;
    font-weight: 500;
    color: var(--tg-text);
    width: 80px;
}
/* Style for Admin Status Filters */
.status-filter {
    display: flex;
    gap: 6px; /* Reduced gap */
    margin-bottom: 15px;
    padding: 5px;
    background-color: var(--tg-secondary-bg);
    border-radius: 8px;
    overflow-x: auto; /* Allow horizontal scroll on small screens */
    scrollbar-width: none; /* Firefox */
}
.status-filter::-webkit-scrollbar { display: none; } /* Safari and Chrome */
.status-filter button {
    flex-grow: 1;
    flex-shrink: 0; /* Prevent buttons from shrinking too much */
    padding: 8px 10px; /* Adjusted padding */
    border: none;
    border-radius: 6px;
    font-size: 13px; /* Slightly smaller font */
    font-weight: 500;
    cursor: pointer;
    background-color: transparent;
    color: var(--tg-text);
    white-space: nowrap; /* Prevent wrapping */
}
.status-filter button.active {
    background-color: var(--tg-bg);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    color: var(--tg-button); /* Highlight active button */
}
.pc-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px 10px;
}
.pc-header-top h2 {
    margin: 0;
    font-size: 22px;
}
.create-ad-btn {
    background-color: var(--tg-button);
    color: var(--tg-button-text);
    border: none;
    padding: 8px 16px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
}
.pc-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pc-item-wrapper {
    display: flex;
    flex-direction: column;
    background-color: var(--tg-secondary-bg);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    overflow: hidden; /* Ensure button corners are rounded */
}
.pc-item {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
}
.pc-item-photo, .pc-item-photo-placeholder {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}
.pc-item-photo-placeholder {
    background-color: #eef1f4;
}
.pc-item-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    overflow: hidden;
}
.pc-item-info {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center vertically */
    flex-grow: 1; /* Take available space */
}
.pc-item-price {
    font-size: 16px;
    font-weight: 600;
}
.pc-item-title {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pc-item-city {
    font-size: 13px;
    color: var(--tg-hint);
}
.pc-item-status {
    font-size: 13px;
    font-weight: 500;
    margin-top: 5px;   /* Added top margin */
    padding-top: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pc-item-status.active { color: var(--status-active); }
.pc-item-status.paused { color: var(--status-paused); }
.pc-item-status.pending { color: var(--status-pending); }
.pc-item-status.rejected { color: var(--status-rejected); }
/* --- ДОБАВЛЕНО --- */
.pc-item-status.awaiting_payment { color: var(--status-awaiting-payment); }
/* --- КОНЕЦ --- */
.rejection-reason-icon {
    width: 16px;
    height: 16px;
    background-color: var(--status-rejected);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
}
.pc-item-actions {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 5px;
}
.pc-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-size: 18px;
    background-color: var(--tg-bg);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pc-action-btn.edit { color: #f39c12; }
.pc-action-btn.pause { color: #3498db; }
.pc-action-btn.play { color: #2ecc71; }
.pc-action-btn.delete { color: #e74c3c; }
.pc-item-full-action {
    padding: 0 12px 12px 12px;
}
.pc-item-full-action .action-button {
    min-height: 44px;
    padding: 10px;
}
.pc-item-full-action .loader-spinner {
    width: 18px;
    height: 18px;
    border-width: 2px;
}
.photo-uploader {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    background-color: var(--tg-secondary-bg);
    padding: 10px;
    border-radius: 8px;
}
.photo-preview {
    width: 80px;
    height: 80px;
    position: relative;
}
.photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}
.remove-photo-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: rgba(0,0,0,0.6);
    color: white;
    border: 1px solid white;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}
.add-photo-label {
    width: 80px;
    height: 80px;
    background-color: var(--tg-bg);
    border: 2px dashed var(--tg-hint);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.add-photo-label span {
    font-size: 40px;
    color: var(--tg-hint);
    font-weight: 200;
}
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 25px;
}
.pagination button {
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background-color: var(--tg-secondary-bg);
    color: var(--tg-button);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pagination button svg {
    width: 22px;
    height: 22px;
}
.pagination button:disabled {
    color: var(--tg-hint);
    cursor: not-allowed;
    opacity: 0.7;
}
.pagination span {
    font-size: 15px;
    font-weight: 500;
    color: var(--tg-hint);
}

/* --- Стили для Слайдера Swiper --- */
/* Стиль для одиночного фото. */
.detail-photo-single {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Фото покрывает контейнер */
}
/* Основной контейнер Swiper. */
.ad-swiper {
    width: 100%;
    height: 100%;
}
.ad-swiper .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}
.ad-swiper .swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Фото покрывает слайд */
}
/* Стилизация пагинации (точки) */
.ad-swiper .swiper-pagination-bullet {
    background-color: rgba(0, 0, 0, 0.3); /* Полупрозрачные темные точки */
    opacity: 1;
}
.ad-swiper .swiper-pagination-bullet-active {
    background-color: var(--tg-button, #3171ff); /* Активная точка в цвет кнопки */
}
/* --- КОНЕЦ БЛОКА ДЛЯ SWIPER --- */



/* --- Код для прижатия подвала --- */

/* 1. Задаем html и body высоту 100%, 
   у вас 'margin: 0' для body уже есть, это отлично. */
html, body {
  height: 100%;
}

/* 2. Делаем главный контейнер #app гибким (flex)
   и растягиваем его на всю высоту */
#app {
  display: flex;
  flex-direction: column; /* Элементы друг под другом */
  min-height: 100%;      /* Минимальная высота - 100% */
}

/* 3. Заставляем .page-content (блок с объявлениями)
   растягиваться и занимать всё свободное место */
.page-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 15px;
    flex-grow: 1; 

    /* --- ДОБАВЬТЕ ЭТИ ДВЕ СТРОКИ --- */
    width: 100%;
    box-sizing: border-box; /* Гарантирует, что padding не добавит лишней ширины */
}

/* 4. Гарантируем, что ваш компонент <app-footer>
   (которому назначен класс .footer) не будет сжиматься */
app-footer {
  flex-shrink: 0;
}