/* ==========================================================================
   modal.css — модальное окно заявки на вступление
   ========================================================================== */

.modal-window {
  position: fixed;
  top: 0; left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(59, 10, 96, 0.25);
  backdrop-filter: blur(5px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-box {
  background-color: #fff9e6;
  padding: 35px;
  border-radius: 4px;
  max-width: 450px;
  width: 100%;
  box-shadow: 0 10px 25px rgba(59, 10, 96, 0.2);
  text-align: center;
  position: relative;
  border: 1px solid #c9bca2;
  box-sizing: border-box;
  transform: scale(0.7);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-window:target {
  opacity: 1;
  visibility: visible;
}

.modal-window:target .modal-box {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 15px;
  right: 15px;
  text-decoration: none;
  color: #3b0a60;
  font-size: 24px;
  font-weight: bold;
}

.modal-box form {
  text-align: left;
  margin-top: 15px;
}

.modal-box h3 {
  margin: 0 0 20px 0;
  color: #3b0a60;
  font-size: 22px;
  text-align: center;
}

.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  color: #3b0a60;
  margin-bottom: 6px;
  font-weight: bold;
}

.form-group input[type="text"],
.form-group input[type="email"] {
  width: 100%;
  padding: 11px 14px;
  box-sizing: border-box;
  border: 1px solid #3b0a60;
  background-color: #fff;
  border-radius: 4px;
  font-size: 14px;
  color: #1a1a1a;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus:invalid {
  border-color: #d32f2f;
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.15);
}

.form-group input:focus:valid {
  border-color: #388e3c;
  box-shadow: 0 0 0 3px rgba(56, 142, 60, 0.15);
}

/* Файл */
.file-upload-wrapper {
  position: relative;
  display: block;
  margin-top: 5px;
}

.file-upload-label {
  display: block;
  padding: 11px 12px;
  background-color: #ebdcb2;
  border: 1px dashed #3b0a60;
  color: #3b0a60;
  font-size: 13px;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s;
}

.file-upload-label:hover {
  background-color: #dfcd9d;
}

.file-upload-wrapper input[type="file"] {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.modal-submit-btn {
  display: block;
  width: 100%;
  padding: 12px;
  background-color: #3b0a60;
  color: #fff9e6;
  border: none;
  font-size: 15px;
  font-weight: bold;
  border-radius: 4px;
  cursor: pointer;
  margin-top: 25px;
  transition: background-color 0.2s;
}

.modal-submit-btn:hover {
  background-color: #4a148c;
}

/* Экран успеха */
.modal-success-check { display: none; }

.modal-success-screen {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: #fff9e6;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  box-sizing: border-box;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
  z-index: 5;
}

.modal-success-check:checked ~ .modal-success-screen {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
}