/* client/styles/pages/profile.css */

/* Корневой контейнер профиля */
.profile-page {
  padding: 24px 16px 40px; /* отступ сверху/снизу, чтобы не накладываться на шапку и навигацию */
  background: #fff;
  min-height: calc(100vh - var(--header-h) - var(--nav-h) - 48px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  transition: opacity 0.5s cubic-bezier(.4,0,.2,1), transform 0.5s cubic-bezier(.4,0,.2,1);
}
.profile-page.show {
  opacity: 1;
  transform: none;
}

/* Карточка с текущим профилем */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 2px solid var(--header-bg);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.profile-card img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--header-bg);
}

.profile-card p {
  margin: 4px 0;
  font-size: 14px;
  color: #333;
}

.profile-card strong {
  color: var(--header-bg);
}

/* Заголовок формы */
.profile-page h2 {
  font-size: 18px;
  margin-bottom: 12px;
  color: #222;
}

/* Обёртка каждого поля */
.field {
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: opacity 0.3s ease, height 0.3s ease, margin-bottom 0.3s ease;
}

/* Когда нужно показать поле */
.field.show {
  opacity: 1;
  height: auto;
  margin-bottom: 16px;
}

/* Метка поля */
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  color: #555;
}

/* Селект */
.field select {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  font-family: inherit;
  font-size: 14px;
  color: #333;
  background: #fafafa;
  border: 2px solid #ddd;
  border-radius: 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.field select:focus {
  outline: none;
  background: #fff;
  border-color: var(--header-bg);
}

/* Кнопка сохранить */
.pr-save {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: 8px;
  background: #bdbdbd; /* Серый цвет по умолчанию */
  color: #f5f5f5;
  font-size: 16px;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: not-allowed; /* Курсор "недоступно" по умолчанию */
  transition: background 0.2s ease, opacity 0.2s;
  opacity: 0.7; /* Полупрозрачная по умолчанию */
}
.pr-save:disabled {
  background: #bdbdbd;
  color: #f5f5f5;
  cursor: not-allowed;
  opacity: 0.7;
}
.pr-save:not(:disabled) {
  background: #43a047; /* Зеленый цвет только когда активна */
  color: #fff;
  opacity: 1;
  cursor: pointer; /* Обычный курсор когда активна */
}
.pr-save:hover:not(:disabled) {
  background: #388e3c;
}

/* Лоадер */
.loader {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100px;
  font-size: 16px;
  color: #666;
}
