/* ========== ОКНО АНКЕТЫ ========== */

#profileOverlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1100;
}

#profileWindow {
  background: white;
  width: 90%;
  max-width: 600px;
  max-height: 85vh;
  border-radius: 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
}

#profileContent {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

/* ========== ПОЛНОЭКРАННЫЙ ПРОСМОТР ФОТО ========== */
/* Открывается по клику на фото анкеты (см. js/profile.js) — поверх #profileOverlay
   (z-index выше), а не в новой вкладке браузера; закрывается крестиком, кликом по
   тёмному фону или Esc. */
#photoLightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  /* Выше любого другого оверлея в проекте (жалобы/тикеты/админка — все на 1000-1200,
     см. остальные css-файлы) — лайтбокс теперь открывается и из них тоже (см.
     js/admin.js, js/reports.js, js/tickets.js), должен рисоваться поверх ВСЕГДА,
     независимо от порядка в DOM (при равных z-index побеждает более поздний элемент
     в разметке, а не тот, что открыт последним). */
  z-index: 5000;
}

#photoLightbox.open {
  display: flex;
}

#photoLightboxImg {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 8px;
}

#closePhotoLightbox {
  position: absolute;
  top: 16px;
  right: 16px;
}

.photo-lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: white;
  font-size: 32px;
  line-height: 1;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.3s;
}

.photo-lightbox-arrow:hover {
  background: rgba(255, 255, 255, 0.3);
}

.photo-lightbox-arrow-left {
  left: 16px;
}

.photo-lightbox-arrow-right {
  right: 16px;
}

/* ========== ФОТО ========== */

.profile-photos-row {
  display: flex;
  flex-wrap: wrap; /* слоты фиксированной ширины (110px, см. .profile-photo-slot ниже)
                       без переноса гарантированно вылезали за узкий (мобильный) #profileWindow */
  gap: 10px;
  margin-bottom: 16px;
}

.profile-photo-slot {
  width: 110px;
  height: 110px;
  border-radius: 10px;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}

.profile-photo-filled {
  background: #f7f8fc;
}

.profile-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  display: block;
}

.profile-photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  font-size: 12px;
  cursor: pointer;
  line-height: 1;
}

.profile-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 2px dashed #ccc;
  color: #999;
  font-size: 12px;
  cursor: pointer;
  padding: 8px;
  box-sizing: border-box;
}

.profile-photo-empty:hover {
  border-color: #667eea;
  color: #667eea;
}

/* ========== ТЕКСТОВЫЕ ПОЛЯ ========== */

.profile-about-textarea {
  min-height: 100px;
  resize: vertical;
  font-family: inherit;
}

.profile-about-text {
  white-space: pre-wrap;
  line-height: 1.5;
  color: #444;
}

.profile-save-success {
  margin-left: 10px;
  color: #388e3c;
  font-weight: 600;
  font-size: 13px;
}

/* ========== СТЕНА АНКЕТЫ ========== */

.wall-section h4 {
  margin: 0 0 10px;
}

.wall-composer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #eee;
}

.wall-composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.wall-photo-pick-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  max-width: 60%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.wall-visibility-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #666;
}

.wall-visibility-row select {
  flex: 1;
}

.wall-posts {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wall-post {
  background: #f7f8fc;
  border: 1px solid #e6e8f0;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.wall-post-photo {
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
  margin-bottom: 8px;
  cursor: pointer;
}

.wall-post-text {
  white-space: pre-wrap;
  line-height: 1.4;
  color: #444;
  margin: 0 0 8px;
}

.wall-post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #e6e8f0;
  font-size: 12px;
  color: #999;
}

.wall-post-delete {
  border: none;
  background: none;
  cursor: pointer;
  font-size: 14px;
  color: #c0392b;
  line-height: 1;
  padding: 2px 4px;
}
