#wjcallback-modal {
    position: fixed;
    text-align: center;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: block;
    -webkit-overflow-scrolling: touch;
    outline: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background-color:rgba(0, 0, 0, 0);
    -webkit-transition: background .5s ease-out;
    -moz-transition: background .5s ease-out;
    -o-transition: background .5s ease-out;
    transition: background .5s ease-out;
}

#wjcallback-modal.show {
    display: block;
    background-color:rgba(0, 0, 0, 0.5);
    overscroll-behavior: contain;
}

#wjcallback-modal .wjcallbackform {
    display: inline-flex;
    position: relative;
    width: auto;
    min-width: 290px;
    text-align: left;
    box-sizing: border-box;
    background: #FFF;
    opacity: 0;
    -webkit-transition: opacity .5s ease-out;
    -moz-transition: opacity .5s ease-out;
    -o-transition: opacity .5s ease-out;
    transition: opacity .5s ease-out;
    margin-top: 15px;
    margin-bottom: 15px;
}

.wjcallback-body-scrolloff {
    overflow: hidden;
}

#wjcallback-modal.show .wjcallbackform {
    opacity: 1;
}

.wjcallbackform .form-validate {
    margin: 0;
}

.wjcallbackform .form-validate .modal-body {
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
}

.wjcallbackform .form-validate input[type="text"],
.wjcallbackform .form-validate textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 15px;
    display: block;
    height: auto;
}

.wjcallbackform .form-validate textarea {
    margin-bottom: 5px;
}

.wjcallbackform .control-group.tos_box {
    display: inline-flex;
    flex-direction: row-reverse;
}

.wjcallbackform .form-validate .informtext {
    padding-bottom: 20px;
}

.wjcallbackform .modal-dialog {
    margin: 0 auto;
}

.wjcallbackform .modal-content {
    border: none;
}

.wjcallbackform .modal-header {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1rem;
    border-bottom: 1px solid #dfe3e7;
}

.wjcallbackform .modal-header .modal-title {
    font-size: 1.5em;
    line-height: 120%;
}

.wjcallbackform .modal-header .close {
    font-size: 2em;
    line-height: 1rem;
    cursor: pointer;
}


/* Preloader
*********************************************/
#wjcallback-loader {
	position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
	background: rgba(0, 0, 0, 0.5);
	z-index: 1060;
}

#wjcallback-loader::after {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0088cc;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 2s linear infinite;
	position: fixed;
	margin: -40px auto 0;
	top: 50%;
	left: 0;
	right: 0;
	content: "";
}

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

/* Media
*********************************************/
@media only screen and (max-width : 480px) {
    #wjcallback-modal .wjcallbackform {
        margin: 15px;
    }
}
/* ===== КНОПКА ВЫЗОВА ФОРМЫ - ГРАДИЕНТ ===== */
.wjcallback-link {
  display: inline-block;
  background: linear-gradient(135deg, #003d80 0%, #3377b8 100%);
  color: #ffffff !important;
  padding: 14px 36px;
  border-radius: 8px;
  text-decoration: none !important;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 61, 128, 0.25);
}

.wjcallback-link:hover {
  background: linear-gradient(135deg, #003d80 0%, #4a8bc7 100%);
  color: #ffffff !important;
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 61, 128, 0.35);
}

.wjcallback-link:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 61, 128, 0.25);
}

/* ===== ЦЕНТРИРОВАНИЕ КНОПКИ ===== */
.wjcallback-link-wrapper {
  text-align: center;
  margin: 30px 0;
}

/* ===== КОНТЕЙНЕР ФОРМЫ С ГРАДИЕНТНОЙ РАМКОЙ ===== */
.wjcallback-modal-content {
  background-color: #ffffff;
  border-radius: 12px;
  border: 2px solid transparent;
  background-image: 
    linear-gradient(#ffffff, #ffffff),
    linear-gradient(135deg, #003d80 0%, #3377b8 100%);
  background-origin: border-box;
  background-clip: padding-box, border-box;
  box-shadow: 0 8px 32px rgba(0, 61, 128, 0.15);
  padding: 35px;
}

/* ===== ГРУППИРОВКА ПОЛЕЙ ===== */
.form-group {
  margin-bottom: 18px;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* ===== СТИЛЬ ПОЛЕЙ ВВОДА ===== */
.wjcallback-form input[type="text"],
.wjcallback-form input[type="email"],
.wjcallback-form input[type="tel"],
.wjcallback-form input[type="number"],
.wjcallback-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e0e6f0;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background-color: #f8f9fc;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.wjcallback-form input[type="text"]:focus,
.wjcallback-form input[type="email"]:focus,
.wjcallback-form input[type="tel"]:focus,
.wjcallback-form input[type="number"]:focus,
.wjcallback-form textarea:focus {
  border-color: #3377b8;
  background-color: #ffffff;
  outline: none;
  box-shadow: 0 0 0 4px rgba(51, 119, 184, 0.1);
}

.wjcallback-form textarea {
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
}

/* ===== КНОПКА ОТПРАВКИ - ГРАДИЕНТ ===== */
.wjcallback-form button[type="submit"],
.btn-primary,
.wjcallback-submit {
  width: 100%;
  background: linear-gradient(135deg, #003d80 0%, #3377b8 100%);
  color: #ffffff !important;
  padding: 14px 30px;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 10px;
  box-shadow: 0 4px 12px rgba(0, 61, 128, 0.25);
  text-decoration: none !important;
}

.wjcallback-form button[type="submit"]:hover,
.btn-primary:hover,
.wjcallback-submit:hover {
  background: linear-gradient(135deg, #003d80 0%, #4a8bc7 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 61, 128, 0.35);
  color: #ffffff !important;
}

.wjcallback-form button[type="submit"]:active,
.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 61, 128, 0.25);
}

/* ===== МЕТКИ ПОЛЕЙ (LABELS) ===== */
.wjcallback-form label {
  display: block;
  margin-bottom: 8px;
  color: #003d80;
  font-weight: 600;
  font-size: 14px;
}

/* ===== ОБЯЗАТЕЛЬНЫЕ ПОЛЯ (*) ===== */
.wjcallback-form label .required {
  color: #c73e1d;
  margin-left: 2px;
}

/* ===== СТИЛЬ МОДАЛЬНОГО ОКНА ===== */
.wjcallback-modal {
  background: rgba(0, 0, 0, 0.5);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.wjcallback-modal.show {
  display: flex;
}

.wjcallback-modal-dialog {
  background: white;
  border-radius: 12px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0, 61, 128, 0.2);
}

/* ===== ЗАГОЛОВОК МОДАЛЬНОГО ОКНА ===== */
.wjcallback-modal-header {
  background: linear-gradient(135deg, #003d80 0%, #3377b8 100%);
  color: white;
  padding: 20px 25px;
  border-radius: 12px 12px 0 0;
  border-bottom: none;
}

.wjcallback-modal-header h2,
.wjcallback-modal-header h3,
.wjcallback-modal-header h4 {
  margin: 0;
  font-size: 18px;
  color: white;
}

/* ===== КНОПКА ЗАКРЫТИЯ ===== */
.wjcallback-close,
.wjcallback-modal-close {
  background: none;
  border: none;
  color: #999;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  transition: color 0.3s ease;
  padding: 0;
  line-height: 1;
}

.wjcallback-close:hover,
.wjcallback-modal-close:hover {
  color: #3377b8;
}

/* ===== АДАПТИВ ===== */
@media (max-width: 768px) {
  .wjcallback-modal-content {
    padding: 25px;
  }

  .wjcallback-link {
    padding: 12px 28px;
    font-size: 14px;
  }

  .wjcallback-form input[type="text"],
  .wjcallback-form input[type="email"],
  .wjcallback-form input[type="tel"],
  .wjcallback-form textarea {
    padding: 11px 12px;
    font-size: 16px; /* Предотвращает зум на iPhone при фокусе */
  }

  .wjcallback-form button[type="submit"],
  .btn-primary {
    padding: 12px 20px;
    font-size: 14px;
  }

  .wjcallback-modal-dialog {
    width: 95%;
  }
}

/* ===== PLACEHOLDER СТИЛЬ ===== */
.wjcallback-form input::placeholder,
.wjcallback-form textarea::placeholder {
  color: #999;
  opacity: 1;
}

/* ===== ОТКЛЮЧЁННЫЕ КНОПКИ ===== */
.wjcallback-link:disabled,
.wjcallback-form button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}
