/* Модальное окно для заявки на консультацию */

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal.show {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.modal-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  background: #ffffff;
  border-radius: 24px;
  padding: 32px;
  width: 100%;
  max-width: 480px;
  margin: 20px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  max-height: 90vh;
  overflow-y: auto;
}

.modal.show .modal-content {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.modal-title {
  font-family: "Unbounded", sans-serif;
  font-size: 24px;
  font-weight: 600;
  color: #101113;
  line-height: 1.3;
  margin: 0;
  padding-right: 16px;
}

.modal-subtitle {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #6B7280;
  margin: -16px 0 24px 0;
  line-height: 1.5;
}

.modal-close {
  background: none;
  border: none;
  padding: 12px;
  cursor: pointer;
  color: #6B7280;
  border-radius: 8px;
  transition: all 0.2s ease;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
}

.modal-close:hover {
  background: #F3F4F6;
  color: #374151;
}

.modal-close:active {
  background: #E5E7EB;
  transform: scale(0.95);
}

.modal-close svg {
  pointer-events: none;
}

.modal-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  z-index: 1;
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 16px 16px 16px 48px;
  border: 2px solid #E5E7EB;
  border-radius: 16px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #101113;
  background: #F9FAFB;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.form-input:focus {
  outline: none;
  border-color: #FCC419;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(252, 196, 25, 0.1);
}

.form-input.error {
  border-color: #EF4444 !important;
  background: #FEF2F2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-input.error:focus {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.form-input.error {
  animation: shake 0.5s ease-in-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-2px); }
  20%, 40%, 60%, 80% { transform: translateX(2px); }
}

.form-input::placeholder {
  color: #9CA3AF;
}

.form-textarea {
  width: 100%;
  padding: 16px;
  border: 2px solid #E5E7EB;
  border-radius: 16px;
  font-family: "Inter", sans-serif;
  font-size: 16px;
  color: #101113;
  background: #F9FAFB;
  transition: all 0.2s ease;
  resize: vertical;
  min-height: 100px;
  box-sizing: border-box;
}

.form-textarea:focus {
  outline: none;
  border-color: #FCC419;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(252, 196, 25, 0.1);
}

.form-textarea.error {
  border-color: #EF4444 !important;
  background: #FEF2F2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.form-textarea.error:focus {
  border-color: #EF4444 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2) !important;
}

.form-textarea.error {
  animation: shake 0.5s ease-in-out;
}

.form-textarea::placeholder {
  color: #9CA3AF;
}

.submit-button {
  width: 100%;
  padding: 16px 24px;
  background: #FCC419;
  border: none;
  border-radius: 16px;
  font-family: "Unbounded", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #101113;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.submit-button:hover {
  background: #F59E0B;
  transform: translateY(-1px);
  box-shadow: 0 10px 25px -5px rgba(252, 196, 25, 0.4);
}

.submit-button:active {
  transform: translateY(0);
}

.submit-button:disabled {
  background: #E5E7EB;
  color: #9CA3AF;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.button-text {
  transition: opacity 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.button-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #101113;
  border-top: 2px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.privacy-notice {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #6B7280;
  text-align: center;
  margin: 16px 0 0 0;
  line-height: 1.4;
}

.privacy-link {
  color: #FCC419;
  text-decoration: underline;
  transition: all 0.2s ease;
  font-weight: 500;
}

.privacy-link:hover {
  color: #F59E0B;
  text-decoration: none;
}

.privacy-link:visited {
  color: #FCC419;
}

/* Сообщение об успешной отправке */
.success-message {
  text-align: center;
  padding: 32px 0;
}

.success-icon {
  margin: 0 auto 24px;
  width: 160px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.success-text {
  margin: 24px 0 32px 0;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.3s forwards;
}

.success-main {
  font-family: "Inter", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #101113;
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.success-sub {
  font-family: "Inter", sans-serif;
  font-size: 14px;
  color: #6B7280;
  margin: 0;
  line-height: 1.5;
}

.success-button {
  background: #FCC419;
  border: none;
  border-radius: 16px;
  padding: 16px 24px;
  font-family: "Unbounded", sans-serif;
  font-size: 16px;
  font-weight: 500;
  color: #101113;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 160px;
  justify-content: center;
  opacity: 0;
  animation: fadeInUp 0.6s ease-out 0.6s forwards;
}

.success-button:hover {
  background: #F59E0B;
  transform: translateY(-1px);
  box-shadow: 0 8px 25px -5px rgba(252, 196, 25, 0.4);
}

.success-button:active {
  transform: translateY(0);
}

.success-button svg {
  transition: transform 0.2s ease;
}

.success-button:hover svg {
  transform: translateX(2px);
}

/* Стили для изображения самолетика */
.plane-image {
  width: 160px;
  height: auto;
  max-width: 100%;
  opacity: 0;
  animation: flyIn 1s ease-out forwards;
}

/* Анимация для самолетика */
@keyframes flyIn {
  0% {
    transform: translateX(-60px) translateY(30px) rotate(-15deg);
    opacity: 0;
  }
  60% {
    transform: translateX(-10px) translateY(-5px) rotate(5deg);
    opacity: 0.8;
  }
  100% {
    transform: translateX(0) translateY(0) rotate(0deg);
    opacity: 1;
  }
}

/* Анимация появления текста */
@keyframes fadeInUp {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  .modal-content {
    margin: 8px;
    padding: 16px !important;
    border-radius: 16px !important;
    max-height: 92vh !important;
  }
  
  .modal-header {
    margin-bottom: 16px !important;
  }
  
  .modal-title {
    font-size: 18px !important;
    line-height: 1.3 !important;
    padding-right: 12px !important;
  }
  
  .modal-subtitle {
    font-size: 13px !important;
    margin: -12px 0 16px 0 !important;
  }
  
  .modal-close {
    padding: 8px !important;
    min-width: 36px !important;
    min-height: 36px !important;
  }
  
  .modal-form {
    gap: 12px !important;
  }
  
  .form-input,
  .form-textarea {
    font-size: 14px !important;
    padding: 12px 12px 12px 40px !important;
    border-radius: 12px !important;
  }
  
  .input-icon {
    left: 12px !important;
    width: 18px !important;
    height: 18px !important;
  }
  
  .form-textarea {
    padding: 12px !important;
    min-height: 80px !important;
  }
  
  .submit-button {
    padding: 12px 20px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
    margin-top: 4px !important;
  }
  
  .privacy-notice {
    font-size: 12px !important;
    margin: 12px 0 0 0 !important;
  }
  
  .success-message {
    padding: 20px 0 !important;
  }
  
  .success-icon {
    width: 110px !important;
    height: 73px !important;
    margin-bottom: 16px !important;
  }
  
  .plane-image {
    width: 110px !important;
  }
  
  .success-text {
    margin: 16px 0 20px 0 !important;
  }
  
  .success-main {
    font-size: 14px !important;
    margin-bottom: 8px !important;
  }
  
  .success-sub {
    font-size: 12px !important;
  }
  
  .success-button {
    padding: 12px 20px !important;
    font-size: 14px !important;
    border-radius: 12px !important;
    min-width: 140px !important;
  }
}

@media (max-width: 480px) {
  .modal-content {
    margin: 5px;
    padding: 14px !important;
    max-height: 94vh !important;
  }
  
  .modal-header {
    margin-bottom: 14px !important;
  }
  
  .modal-title {
    font-size: 16px !important;
    line-height: 1.3 !important;
  }
  
  .modal-subtitle {
    font-size: 12px !important;
    margin: -10px 0 14px 0 !important;
  }
  
  .modal-form {
    gap: 10px !important;
  }
  
  .form-input {
    padding: 10px 10px 10px 36px !important;
    font-size: 14px !important;
  }
  
  .input-icon {
    left: 10px !important;
    width: 16px !important;
    height: 16px !important;
  }
  
  .form-textarea {
    padding: 10px !important;
    min-height: 70px !important;
  }
  
  .submit-button {
    padding: 10px 16px !important;
    font-size: 13px !important;
  }
  
  .plane-image {
    width: 90px !important;
  }
  
  .success-icon {
    width: 90px !important;
    height: 60px !important;
  }
  
  .success-main {
    font-size: 13px !important;
  }
  
  .success-sub {
    font-size: 11px !important;
  }
  
  .success-button {
    padding: 10px 16px !important;
    font-size: 13px !important;
    min-width: 120px !important;
  }
}

/* Анимации появления */
@keyframes modalFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    transform: translateY(30px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal.show {
  animation: modalFadeIn 0.3s ease;
}

.modal.show .modal-content {
  animation: modalSlideIn 0.3s ease;
}
