/* static/css/settings.css */

/* Локально только для /settings — не лезем в глобальные стили */
.st-wrap{
  width:100%;
  max-width: 720px;
  margin: 32px auto 48px;
  padding: 0 16px;
}

.st-card{
  background:#fff;
  border:1px solid #e6e6e6;
  border-radius:14px;
  padding:22px 22px 18px;
  box-shadow:0 6px 20px rgba(0,0,0,0.06);
}

.st-title{
  font-size:22px;
  font-weight:700;
  text-align:center;
  margin:0 0 14px;
  color:#222;
}

/* Сетка формы: 2 колонки на десктопе, 1 колонка на мобилке */
.st-form{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 18px;
  align-items:start;
}

.st-col{
  display:flex;
  flex-direction:column;
  gap:10px;
  padding:0;
}

.st-col-title{
  font-size:14px;
  font-weight:700;
  color:#333;
  margin:0 0 2px;
  text-align:left;
}

.st-field{
  display:flex;
  flex-direction:column;
  gap:6px;
}

.st-label{
  font-size:13px;
  color:#444;
  line-height:1.2;
}

/* Инпуты — максимально как на /change_pass */
.st-wrap input.st-input,
.st-wrap .st-input{
  width:100% !important;
  height:44px !important;
  padding:0 14px !important;
  border:1px solid #d8d8d8 !important;
  border-radius:10px !important;
  font-size:15px !important;
  outline:none !important;
  box-sizing:border-box !important;
  background:#fff !important;
  -webkit-appearance:none;
  appearance:none;
}

.st-wrap input.st-input:focus,
.st-wrap .st-input:focus{
  border-color:#2f8f63 !important;
  box-shadow:0 0 0 3px rgba(47,143,99,0.15) !important;
}

/* Линия "Юр. лицо" + чекбокс */
.st-legal-line{
  display:flex;
  align-items:center;
  gap:10px;
  margin: 6px 0 2px;
}

/* Кнопки: делаем универсально и для <button>, и для <a> */
.st-actions{
  margin-top:16px;
  display:grid;
  grid-template-columns: 1fr;
  gap:10px;
}

.st-btn{
  width:100%;
  height:44px;
  border:none;
  border-radius:10px;
  font-size:15px;
  font-weight:700;
  cursor:pointer;

  /* Центрируем текст идеально */
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
  text-align:center;

  /* Для ссылок */
  text-decoration:none;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}

/* Основная кнопка */
.st-btn-primary{
  background:#2f8f63;
  color:#fff;
}

.st-btn-primary:hover{ filter:brightness(0.96); }
.st-btn-primary:active{ transform:translateY(1px); }

/* Состояние disabled — темнее, чтобы не выглядело “прозрачным” */
.st-btn-primary:disabled,
.st-btn:disabled{
  background:#b9c2c9 !important;   /* темнее, чем было */
  color:#ffffff !important;
  cursor:not-allowed !important;
  filter:none !important;
  transform:none !important;
  opacity:1 !important;
}

/* Нижние кнопки */
.st-footer-actions{
  margin-top:14px;
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}

.st-btn-warn{
  background:#E56E2B;
  color:#fff;
}

.st-btn-danger{
  background:#D5284A;
  color:#fff;
}

.st-btn-warn:hover,
.st-btn-danger:hover{ filter:brightness(0.96); }

.st-btn-warn:active,
.st-btn-danger:active{ transform:translateY(1px); }

.st-note{
  margin-top:12px;
  font-size:12px;
  color:#777;
  text-align:center;
}

/* Мобилка */
@media (max-width: 640px){
  .st-wrap{ margin:18px auto 28px; }
  .st-card{ padding:16px 14px 14px; border-radius:12px; }
  .st-title{ font-size:18px; }
  .st-form{ grid-template-columns: 1fr; }
  .st-footer-actions{ grid-template-columns: 1fr; }
}

/* Очень узкие экраны */
@media (max-width: 380px){
  .st-wrap{ padding:0 10px; }
  .st-card{ padding:12px 10px 10px; }
  .st-wrap input.st-input,
  .st-wrap .st-input{ padding:0 12px !important; }
}

/* Гасим старые глобальные центровки/вмешательства именно тут */
.st-wrap .change_profile_settings div,
.st-wrap .change_profile_settings div div{
  display:block !important;
  padding:0 !important;
}

/* === Перебиваем глобальные стили profile.css для кнопок внутри /settings === */
.st-wrap .change_profile_settings button,
.st-wrap .change_profile_settings .st-btn{
  width: 100% !important;
  max-width: 360px !important;   /* чтобы на больших экранах не расползалась */
  margin-left: auto !important;
  margin-right: auto !important;
  display: block !important;
  background: linear-gradient(135deg, #1c9675, #2f80ed);

  height: 44px !important;
  padding: 0 14px !important;
  border-radius: 10px !important; /* как на смене пароля */
  font-size: 15px !important;
  font-weight: 700 !important;
  border: none !important;
  box-sizing: border-box !important;
}

/* на очень узких (360px) чуть уже по “воздуху” */
@media (max-width: 380px){
  .st-wrap .change_profile_settings button,
  .st-wrap .change_profile_settings .st-btn{
    max-width: 340px !important;
  }
}

