/* Стили для модального окна */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: #f8f6f0;
  margin: 2% auto;  
  padding: 0;
  border-radius: 12px;
  width: 90%;
  max-width: 450px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background-color: #ebdddf;
  color: #59427a;
  padding: 20px 20px 12px 20px;
  border-radius: 12px 12px 0 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: bold;
  color: #bd6bb7;
  text-align: center;
  flex: 1;
}

.close {
  color: #999;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
  width: 20px;
  text-align: center;
}

.close:hover {
  color: #666;
}

.modal-body {
  padding: 0 20px 20px 20px;
  background-color: #ebdddf;
}

.form-group {
  margin-bottom: 15px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: normal;
  color: #333;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e0e0e0;
  border-radius: 6px;
  font-size: 14px;
  background-color: white;
  box-sizing: border-box;
  color: #333;
  font-family: inherit;
  resize: vertical;
  min-height: 40px;
}

.form-group textarea {
  min-height: 60px;
  line-height: 1.5;
  transition: height 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #59427a;
  box-shadow: 0 0 0 2px rgba(89, 66, 122, 0.1);
}

.submit-btn {
  width: 100%;
  background-color: #59427a;
  color: white;
  padding: 12px;
  border: 2px solid #9c7fc5;
  border-radius: 6px;
  font-size: 15px;
  font-weight: normal;
  cursor: pointer;
  margin-top: 10px;
  transition: background-color 0.2s ease;
}

.submit-btn:hover {
  background-color: #4a3563;
}

/* Адаптивность */
@media (max-width: 768px) {
  .modal-content {
    margin: 1% auto;
    width: 95%;
    max-height: 95vh;
  }
  
  .modal-header {
    padding: 15px 15px 10px 15px;
  }
  
  .modal-header h2 {
    font-size: 1.2rem;
  }
  
  .modal-body {
    padding: 15px;
  }
  
  .form-group {
    margin-bottom: 12px;
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 0.5% auto;
    width: 98%;
    max-height: 98vh;
  }
  
  .modal-header {
    padding: 12px 12px 8px 12px;
  }
  
  .modal-header h2 {
    font-size: 1.1rem;
  }
  
  .modal-body {
    padding: 12px;
  }
  
  .form-group {
    margin-bottom: 10px;
  }
  
  .form-group input,
  .form-group textarea {
    padding: 8px 10px;
    min-height: 36px;
  }
  
  .form-group textarea {
    min-height: 50px;
  }
}
