
/* Frontend (public) styles */

:root {
  --brand-primary: #7c6cff;
  --brand-primary-soft: rgba(124, 108, 255, 0.08);
  --brand-text: #111827;
  --brand-muted: #6b7280;
  --radius-xl: 18px;
  --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.06);
  --transition-fast: 0.15s ease-in-out;
  --bg-soft: #f9fafb;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  color: var(--brand-text);
  background-color: #ffffff;
}

/* Header */

.site-header {
  border-bottom: 1px solid #e5e7eb;
  background-color: #ffffff;
}

.site-header .navbar-brand {
  font-weight: 600;
  color: var(--brand-primary);
}

.site-header .nav-link {
  font-size: 14px;
  color: var(--brand-muted);
}

.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: var(--brand-primary);
}

/* Bell */

.header-bell-link {
  position: relative;
  margin-right: 12px;
  text-decoration: none;
  color: inherit;
}

.header-bell-link span.icon {
  font-size: 1.1rem;
  line-height: 2;
}

.header-bell-link .badge {
  position: absolute;
  top: -4px;
  right: -8px;
  font-size: 9px;
  padding: 2px 5px;
  border-radius: 999px;
}

/* Listing card */

.ad-card {
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: #ffffff;
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(229, 231, 235, 0.9);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.ad-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
}

/* 4:3 thumbnail */

.ad-card-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #e5e7eb;
  overflow: hidden;
}

.ad-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Multiple photos (JS toggles .is-active) */

.ad-card-thumb-slide-group {
  position: relative;
  width: 100%;
  height: 100%;
}

.ad-card-thumb-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.ad-card-thumb-slide.is-active {
  opacity: 1;
}

/* Content */

.ad-card-body {
  padding: 10px 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ad-card-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--brand-text);
  text-decoration: none;
}

.ad-card-title:hover {
  color: var(--brand-primary);
  text-decoration: none;
}

.ad-card-price {
  font-weight: 600;
  font-size: 15px;
  color: var(--brand-primary);
}

.ad-card-meta {
  font-size: 11px;
  color: var(--brand-muted);
  display: flex;
  justify-content: space-between;
  gap: 6px;
}

/* Favorite */

.ad-card-fav-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.ad-card-fav-btn:hover {
  background: var(--brand-primary);
}

.ad-card-fav-btn.is-fav {
  background: var(--brand-primary);
}

/* Ad page gallery */

.ad-gallery {
  background: #000;
  border-radius: var(--radius-xl);
  overflow: hidden;
  position: relative;
}

.ad-gallery-main {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #000;
}

.ad-gallery-main img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background-color: #000;
}

.ad-gallery-thumbs {
  display: flex;
  gap: 6px;
  padding: 6px;
  overflow-x: auto;
  background: rgba(0, 0, 0, 0.9);
}

.ad-gallery-thumb {
  width: 64px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.6;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.ad-gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ad-gallery-thumb.is-active {
  opacity: 1;
  border-color: var(--brand-primary);
}

/* Fullscreen overlay */

.ad-gallery-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1050;
}

.ad-gallery-overlay.is-open {
  display: flex;
}

.ad-gallery-overlay img {
  max-width: 96vw;
  max-height: 92vh;
  object-fit: contain;
}

/* Arrows */

.ad-gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: rgba(15,23,42,0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.ad-gallery-arrow:hover {
  background: var(--brand-primary);
  transform: translateY(-50%) scale(1.05);
}

.ad-gallery-arrow.prev {
  left: 10px;
}

.ad-gallery-arrow.next {
  right: 10px;
}

/* Ad actions */

.ad-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.btn-main {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--brand-primary);
  color: #ffffff;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}

.btn-main:hover {
  background: #6355ff;
  box-shadow: 0 8px 22px rgba(99, 85, 255, 0.35);
  transform: translateY(-1px);
}

.btn-outline-soft {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid rgba(148,163,253,0.6);
  background: #ffffff;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-outline-soft:hover {
  background: var(--brand-primary-soft);
  box-shadow: 0 8px 18px rgba(148,163,253,0.2);
}

/* Show phone modal */

.show-phone-modal .modal-content {
  border-radius: 18px;
  border: none;
}

.show-phone-modal .modal-body {
  text-align: center;
  font-size: 15px;
}

/* Cabinet notifications */

.cabinet-notifications .list-group-item {
  padding-left: 0;
  padding-right: 0;
  border-color: #f3f4f6;
}

.cabinet-notifications .title {
  font-weight: 600;
  font-size: 13px;
  color: #111827;
}

.cabinet-notifications .date {
  font-size: 11px;
  color: var(--brand-muted);
}

.cabinet-notifications .text {
  font-size: 12px;
  color: #4b5563;
}

/* Cabinet nav */

.cabinet-nav .nav-link {
  font-size: 14px;
  color: var(--brand-muted);
  padding: 6px 0;
}

.cabinet-nav .nav-link.active {
  color: var(--brand-primary);
  font-weight: 500;
}

/* Responsive */

@media (max-width: 767.98px) {
  .ad-card-body {
    padding: 8px 10px 9px;
  }
}


/* Профиль / Верификация */

.cabinet-page-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 24px;
}

.cabinet-subtitle {
  font-size: 22px;
  font-weight: 600;
}

.cabinet-card {
  background: #f7f8fa;
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.cabinet-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #111827;
}

.cabinet-card-text {
  font-size: 14px;
  color: #4b5563;
}

/* Pills / buttons */

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-pill-green {
  background: #16a34a;
  color: #ffffff;
}
.btn-pill-green:hover {
  background: #15803d;
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-pill-dark {
  background: #111827;
  color: #ffffff;
}
.btn-pill-dark:hover {
  background: #000000;
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-pill-blue {
  background: #2563eb;
  color: #ffffff;
}
.btn-pill-blue:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-pill-outline {
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
}
.btn-pill-outline:hover {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
  transform: translateY(-1px);
}

/* Индикатор верификации */

.verify-pill {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.verify-pill--ok {
  background-color: #22c55e;
}


/* ---------- Профиль / карточки ---------- */

.cabinet-page-title {
  font-size: 26px;
  font-weight: 600;
  margin-bottom: 24px;
}

.cabinet-subtitle {
  font-size: 22px;
  font-weight: 600;
}

.cabinet-card {
  background: #f7f8fa;
  border-radius: 18px;
  padding: 20px 24px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.03);
}

.cabinet-card-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 6px;
  color: #111827;
}

.cabinet-card-text {
  font-size: 14px;
  color: #4b5563;
}

/* ---------- Pills / buttons ---------- */

.btn-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: none;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-pill-green {
  background: #16a34a;
  color: #ffffff;
}
.btn-pill-green:hover {
  background: #15803d;
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-pill-dark {
  background: #111827;
  color: #ffffff;
}
.btn-pill-dark:hover {
  background: #000000;
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-pill-blue {
  background: #2563eb;
  color: #ffffff;
}
.btn-pill-blue:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
  color: #ffffff;
}

.btn-pill-outline {
  background: #ffffff;
  color: #111827;
  border: 1px solid #e5e7eb;
}
.btn-pill-outline:hover {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
  transform: translateY(-1px);
}

/* ---------- Индикатор верификации ---------- */

.verify-pill {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}
.verify-pill--ok {
  background-color: #22c55e;
}

/* ---------- Мои объявления (карточки) ---------- */

.myads-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}

.myad-card {
  display: block;
  padding: 10px 10px 12px;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  text-decoration: none;
  color: #111827;
  transition: all 0.18s ease;
}

.myad-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.10);
}

.myad-thumb-wrap {
  width: 100%;
  padding-top: 75%; /* 4:3 / чуть ближе к 3:4-1:1 под твой дизайн */
  border-radius: 14px;
  overflow: hidden;
  background: #f3f4f6;
  margin-bottom: 8px;
  position: relative;
}

.myad-thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.myad-price {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.myad-title {
  font-size: 14px;
  color: #111827;
}

/* Статусы */

.myad-status {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 500;
  margin-bottom: 4px;
}

.myad-status--active {
  background: #dcfce7;
  color: #166534;
}

.myad-status--pending {
  background: #fef9c3;
  color: #854d0e;
}

.myad-status--removed {
  background: #fee2e2;
  color: #991b1b;
}

.myad-status--blocked {
  background: #fee2e2;
  color: #7f1d1d;
}

.myad-status--await {
  background: #e0f2fe;
  color: #075985;
}

.myad-status--reserved {
  background: #e0f2fe;
  color: #1d4ed8;
}

.myad-status--sold {
  background: #e5e7eb;
  color: #111827;
}

.myad-status--archived {
  background: #f3f4f6;
  color: #6b7280;
}



.cabinet-subtitle-sm {
  font-size: 18px;
  font-weight: 600;
}

.verify-list li {
  font-size: 14px;
  margin-bottom: 4px;
  color: #4b5563;
}
.verify-list li .v-check {
  display: inline-block;
  width: 18px;
  text-align: center;
  color: #22c55e;
  margin-right: 4px;
}
.verify-list li:not(.ok) .v-check {
  color: #d1d5db;
}

.verify-bullets {
  font-size: 14px;
  color: #4b5563;
}
.verify-bullets li {
  margin-bottom: 4px;
}
/* Иконка избранного на странице объявления */
.ad-fav-form {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 20;
  margin: 0;
}

.ad-fav-btn {
  border: none;
  padding: 0;
  background: transparent;
  cursor: pointer;
  line-height: 1;
}

.ad-fav-btn svg {
  width: 24px;
  height: 24px;
  fill: transparent;
  stroke: #111;
  stroke-width: 2;
  transition: fill .18s ease, stroke .18s ease, transform .12s ease;
}

.ad-fav-btn:hover svg {
  transform: scale(1.05);
}

.ad-fav-btn.active svg {
  fill: #ff3366;
  stroke: #ff3366;
}


.settings-page {
  max-width: 960px;
}

.settings-tabs {
  margin-bottom: 1.5rem;
}

.settings-tab {
  width: 140px;
  height: 120px;
  border-radius: 18px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 10px;
  text-decoration: none;
  background: #f6f7fb;
  color: #111827;
  transition: all .18s ease;
}

.settings-tab-icon svg {
  width: 26px;
  height: 26px;
  fill: #9ca3af;
}

.settings-tab-title {
  font-size: 14px;
  font-weight: 500;
}

.settings-tab.active {
  background: #e5f5ef;
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.16);
}

.settings-tab.active .settings-tab-icon svg {
  fill: #2563eb;
}

.settings-tab.disabled {
  opacity: .5;
  cursor: default;
}

/* Блоки настроек — с чёрной обводкой */

.settings-block {
  padding: 18px 20px;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #d9d9d9;   /* ЧЕРНАЯ ОБВОДКА */
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
}

.settings-toggle-row {
  padding: 10px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-top: 1px solid #f3f4f6;
}

.settings-toggle-row:first-of-type {
  border-top: none;
}

.extra-small {
  font-size: 11px;
}

.settings-form .form-control,
.settings-form .input-group-text {
  border-radius: 12px;
  font-size: 14px;
}

/* Иконки в шапке кабинета */
.header-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  margin: 0;
  padding: 0;
  border-radius: 50%;
  text-decoration: none;
  background: #2f2f2f;
}

.header-icon-link span {
  display: block;
}

.icon-heart,
.icon-bell,
.icon-chat {
  width: 16px;
  height: 16px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
}

/* можно заменить на свои svg/png */
.icon-heart {
  mask: url('/assets/img/icons/heart.svg') no-repeat center;
  -webkit-mask: url('/assets/img/icons/heart.svg') no-repeat center;
  background-color: #9ca3af;
}
.icon-bell {
  mask: url('/assets/img/icons/bell.svg') no-repeat center;
  -webkit-mask: url('/assets/img/icons/bell.svg') no-repeat center;
  background-color: #9ca3af;
}
.icon-chat {
  mask: url('/assets/img/icons/chat.svg') no-repeat center;
  -webkit-mask: url('/assets/img/icons/chat.svg') no-repeat center;
  background-color: #9ca3af;
}

.header-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 999px;
}

/* Блок профиля в сайдбаре */

.cabinet-profile {
  padding: 14px 10px 12px;
  border-radius: 18px;
  /*  border: 1px solid #000;*/
  background-color: #ffffff;
 /* box-shadow: 0 4px 10px rgba(15, 23, 42, 0.06);*/
}

.cabinet-avatar-wrapper {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.cabinet-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cabinet-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffcf8a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 26px;
  color: #000;
}

.cabinet-avatar-upload {
  margin: 0;
}

.cabinet-avatar-upload label {
  cursor: pointer;
  font-size: 11px;
}

.cabinet-rating .star {
  color: #d1d5db;
  font-size: 14px;
}
.cabinet-rating .star.filled {
  color: #fbbf24;
}
.cabinet-rating span {
  vertical-align: middle;
}
.cabinet-avatar-form {
  margin: 0;
}

.cabinet-avatar-wrapper {
  position: relative;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer; /* рука */
}

.cabinet-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cabinet-avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffcf8a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 26px;
  color: #000;
}

.cabinet-avatar-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  opacity: 0;
  transition: opacity .18s ease;
  cursor: pointer; /* рука */
}

.cabinet-avatar-wrapper:hover .cabinet-avatar-overlay {
  opacity: 1;
}

.avatar-crop-container {
  max-height: 400px;
  overflow: hidden;
}

/* рейтинг как был */
.cabinet-rating .star {
  color: #d1d5db;
  font-size: 14px;
}
.cabinet-rating .star.filled {
  color: #fbbf24;
}
