/*
* Система гостевых объявлений «НОЧЛЕГМОСКВА»
* V 1.4.7
* Сделано: Pi-Ti при помощи Алиса (Яндекс)  
* По заказу: Пароходик.рф  
* Для сайта: ночлег.москва
*/

/* Стили формы добавления сообщения */
form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: #f8fafc;
  padding: 25px;
  border-radius: 8px;
  border: 1px solid #e1e8ed;
  width: 100%;
  max-width: 100%;
}

form > * {
  margin-bottom: 20px;
}

form > *:last-child {
  margin-bottom: 0;
}

label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #2c3e50;
  font-size: 0.95rem;
}

/* Стили для выпадающего списка типа жилья */
select {
  padding: 10px;
  border: 1px solid #e1e8ed;
  border-radius: 4px;
  background: #fff;
  font-size: 0.95rem;
  color: #2c3e50;
  width: 100%;
  appearance: none;
  -moz-appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%237f8da8'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  background-size: 16px 16px;
}

/* Контейнер для выпадающего списка */
.housing-type-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Основные стили для полей ввода */
input, textarea, select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #d1d9e6;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  background-color: white;
  box-sizing: border-box;
}

input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}

/* Поле для загрузки фото */
.file-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
}

input[type="file"] {
  padding: 8px 0;
}

/* Кнопка отправки */
button {
  background: linear-gradient(135deg, #3498db, #2980b9);
  color: white;
  border: none;
  padding: 14px 20px;
  cursor: pointer;
  border-radius: 6px;
  font-size: 1.1rem;
  font-weight: 600;
  transition: all 0.3s ease;
  width: 100%;
  min-width: auto;
}

/*
* Система гостевых объявлений «НОЧЛЕГ.МОСКВА»
* V 1.4.5
* Сделано: Pi-Ti при помощи Алиса (Яндекс)  
* По заказу: Пароходик.рф  
* Для сайта: https://ночлег.москва
*/

button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

button:active {
  transform: translateY(0);
}

/* Разделитель между формой и сообщениями */
hr {
  border: none;
  height: 1px;
  background: linear-gradient(to right, transparent, #bdc3c7, transparent);
  margin: 40px 0;
}

/* Стили для валидации полей */
.required {
  border-color: #e74c3c !important;
  background-color: #fffcec;
}

.optional {
  border-color: #2ecc71 !important;
}

.required:focus {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.3);
}

.optional:focus {
  border-color: #27ae60;
  box-shadow: 0 0 0 3px rgba(46, 204, 113, 0.3);
}

input:invalid {
  border-color: #e74c3c;
}

input:valid {
  border-color: #2ecc71;
}

/* Визуальные группы формы */
.form-section {
  padding-bottom: 20px;
  margin-bottom: 25px;
  border-bottom: 1px dashed #e1e8ed;
}

.form-section:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* Заголовок секции (опционально) */
.section-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d1d9e6;
}

/* Стили для капчи */
.captcha-input {
  height: 40px;
  padding: 8px;
  font-size: 1.1rem;
  text-align: center;
  width: 100%;
}

.captcha-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Поле «Срок публикации» */
.duration-select {
  width: 100%;
  padding: 10px;
  border: 2px solid #d1d9e6;
  border-radius: 6px;
}

/* Адаптивность */
@media (max-width: 600px) {
  form {
    padding: 20px 15px;
  }
  
  form > * {
    margin-bottom: 15px; /* Меньший отступ на узких экранах */
  }
  
  input, textarea, select, button {
    width: 100%; /* Все элементы — на всю ширину */
    padding: 12px 10px; /* Компактные отступы */
  }
  
  .file-wrapper {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
}
