/* Дочерние элементы появятся поочерёдно */
.amw-ru-active .contak_form_content>*,
.amw-ru-active .contak_form_content .wpcf7-form>* {
   opacity: 0;
   animation: modfade 0.6s ease forwards;
}

/* Порядок появления */
.amw-ru-active .amw-modal-content .amw-modal-left>*:nth-child(1) {
   animation-delay: 0.01s;
}

.amw-ru-active .contak_form_content .wpcf7-form>*:nth-child(2) {
   animation-delay: 0.05s;
}

.amw-ru-active .contak_form_content .wpcf7-form>*:nth-child(1) {
   animation-delay: 0.1s;
}

.amw-ru-active .contak_form_content .wpcf7-form>*:nth-child(2) {
   animation-delay: 0.15s;
}

.amw-ru-active .contak_form_content .wpcf7-form>*:nth-child(3) {
   animation-delay: 0.2s;
}

.amw-ru-active .contak_form_content .wpcf7-form>*:nth-child(4) {
   animation-delay: 0.25s;
}

.amw-ru-active .contak_form_content .wpcf7-form>*:nth-child(5) {
   animation-delay: 0.3s;
}

.amw-ru-active .contak_form_content .wpcf7-form>*:nth-child(6) {
   animation-delay: 0.35s;
}

/* Общая анимация */
@keyframes modfade {
   from {
      opacity: 0;
      transform: translateY(-12px);
   }

   to {
      opacity: 1;
      transform: translateY(0px);
   }
}

/*  */
.amw-ru-modal {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   display: flex;
   align-items: center;
   justify-content: center;
   z-index: 9999;
   visibility: hidden;
   opacity: 0;
   transition: all 0.4s ease;
}

.amw-ru-modal.amw-ru-active {
   visibility: visible;
   opacity: 1;
}

.amw-ru-modal-overlay {
   position: absolute;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background-color: rgba(0, 0, 0, 0.7);
   z-index: 1;
}

.amw-ru-modal-content {
   position: relative;
   background: #fff;
   z-index: 2;
   max-width: 90%;
   max-height: 90vh;
   overflow-y: auto;
   margin: 20px;
   transition: all 0.4s ease;
}

.amw-ru-close {
   position: absolute;
   top: 15px;
   right: 15px;
   width: 40px;
   height: 40px;
   background: none;
   border-radius: 50%;
   cursor: pointer;
   display: flex;
   z-index: 10;
   align-items: center;
   justify-content: center;
   transition: transform 0.3s ease, background 0.2s;
}

.amw-ru-close::before,
.amw-ru-close::after {
   content: "";
   position: absolute;
   width: 18px;
   height: 1px;
   background-color: #fff;
   transition: 0.3s ease;
}

.amw-ru-close::before {
   transform: rotate(45deg);
}

.amw-ru-close::after {
   transform: rotate(-45deg);
}

.amw-ru-close:hover {
   transform: rotate(90deg);
}

.amw-ru-close:hover::before,
.amw-ru-close:hover::after {
   background-color: var(--theme-palette-color-1);
}

/* width*/
.amw-ru-modal-content.size-small {
   width: 400px;
}

.amw-ru-modal-content.size-medium {
   width: 700px;
}

.amw-ru-modal-content.size-large {
   width: 900px;
}

.amw-ru-modal-content.size-full {
   width: 95%;
   max-width: 1200px;
}

/* color */
.amw-ru-modal-content.color-default {
   background: #fff;
   color: #333;
}

/* темная */
.amw-ru-modal-content.color-dark {
   background: #222;
   color: #fff;
}

.amw-ru-modal-content.color-dark .amw-ru-close {
   color: #fff;
}

/* Эффекты появления */
/* Появление (fade) */
.amw-ru-modal[data-effect="fade"] .amw-ru-modal-content {
   opacity: 0;
   transform: none;
}

.amw-ru-modal.amw-ru-active[data-effect="fade"] .amw-ru-modal-content {
   opacity: 1;
}

/* Сдвиг сверху (slide-top) */
.amw-ru-modal[data-effect="slide-top"] .amw-ru-modal-content {
   transform: translateY(-100px);
   opacity: 0;
}

.amw-ru-modal.amw-ru-active[data-effect="slide-top"] .amw-ru-modal-content {
   transform: translateY(0);
   opacity: 1;
}

/* Сдвиг снизу (slide-bottom) */
.amw-ru-modal[data-effect="slide-bottom"] .amw-ru-modal-content {
   transform: translateY(100px);
   opacity: 0;
}

.amw-ru-modal.amw-ru-active[data-effect="slide-bottom"] .amw-ru-modal-content {
   transform: translateY(0);
   opacity: 1;
}

/* Увеличение (zoom) */
.amw-ru-modal[data-effect="zoom"] .amw-ru-modal-content {
   transform: scale(0.7);
   opacity: 0;
}

.amw-ru-modal.amw-ru-active[data-effect="zoom"] .amw-ru-modal-content {
   transform: scale(1);
   opacity: 1;
}

/* 3D переворот (flip) */
.amw-ru-modal[data-effect="flip"] .amw-ru-modal-content {
   transform: perspective(1000px) rotateX(-90deg);
   transform-origin: top center;
   opacity: 0;
}

.amw-ru-modal.amw-ru-active[data-effect="flip"] .amw-ru-modal-content {
   transform: perspective(1000px) rotateX(0);
   opacity: 1;
}