.iti {
  --iti-path-flags-1x: url('/api/public/images/iti/flags.webp');
  --iti-path-flags-2x: url('/api/public/images/iti/flags@2x.webp');
  --iti-path-globe-1x: url('/api/public/images/iti/globe.webp');
  --iti-path-globe-2x: url('/api/public/images/iti/globe@2x.webp');
}

.atira-form-html,
.atira-form-html * {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.atira-theme-input,
.atira-theme-send-button-shared {
  font-family: inherit;
}

.atira-theme-header {
  width: 100%;
  padding: 1rem 0.5rem;
  min-height: 4rem;
  align-content: center;
}

.atira-theme-header h1 {
  font-size: 2rem;
  text-align: center;
}

.atira-logo-wrapper {
  width: 7rem;
}

.atira-logo-wrapper .atira-logo {
  width: 100%;
}

#atira-form-modal-close {
  background-color: transparent;
  border: 0;
  cursor: pointer;
  font-size: 2rem;
  position: absolute;
  top: 1rem;
  right: 1rem;
  transition: all 0.2s ease-in-out;
}

#atira-form-modal-close:hover {
  opacity: 0.7;
}

.atira-form-html[dir='rtl'] #atira-form-modal-close {
  left: 1rem;
  right: auto;
}

.atira-modal-content {
  background-color: #fefefe;
  margin: auto;
  padding: 2rem;
  border: 1px solid #888;
  width: 95%;
  border-radius: 1rem;
  position: relative;
}

@keyframes appear-text {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

#atira-form-modal-response {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 600;
  margin-top: 1rem;
  opacity: 0;
  transform: translateY(10px);
  animation: appear-text 0.4s ease forwards;
  animation-delay: 0.9s;
}

#atira-form-modal-response::selection {
  background-color: #803588;
  color: #fff;
}

/* Checkmark and its animation */
@keyframes draw-check-1 {
  to {
    transform: rotate(45deg) scaleY(1);
  }
}

@keyframes draw-check-2 {
  to {
    transform: rotate(-45deg) scaleY(1);
  }
}

.atira-modal-checkmark {
  width: 64px;
  height: 64px;
  position: relative;
  rotate: 270deg;
  margin: auto;
  background-color: #803588;
  border-radius: 50%;
}

.atira-modal-checkmark::before,
.atira-modal-checkmark::after {
  content: '';
  position: absolute;
  background-color: #fff;
  border-radius: 4px;
  transform-origin: left top;
}

.atira-modal-checkmark::before {
  width: 6px;
  height: 25px;
  left: 30px;
  top: 6px;
  transform: rotate(45deg) scaleY(0);
  animation: draw-check-1 0.3s ease forwards;
}

.atira-modal-checkmark::after {
  width: 6px;
  height: 43px;
  left: 12px;
  top: 25px;
  transform: rotate(-45deg) scaleY(0);
  animation: draw-check-2 0.3s ease forwards 0.3s;
}
/*  */

/* X mark and its animation */
@keyframes draw-x-1 {
  to {
    transform: rotate(45deg) scaleY(1);
  }
}

@keyframes draw-x-2 {
  to {
    transform: rotate(-45deg) scaleY(1);
  }
}

.atira-modal-xmark {
  width: 64px;
  height: 64px;
  position: relative;
  margin: auto;
  background-color: #d32f2f;
  border-radius: 50%;
}

.atira-modal-xmark::before,
.atira-modal-xmark::after {
  content: '';
  position: absolute;
  background-color: #fff;
  border-radius: 4px;
  width: 6px;
  height: 48px;
}

.atira-modal-xmark::after {
  top: 13px;
  left: 48px;
  transform-origin: left top;
  transform: rotate(45deg) scaleY(0);
  animation: draw-x-1 0.3s ease-out forwards;
}

.atira-modal-xmark::before {
  top: 13px;
  left: 12px;
  transform-origin: right top;
  transform: rotate(-45deg) scaleY(0);
  animation: draw-x-2 0.3s ease-out forwards 0.3s;
}
/*  */
.atira-modal-button {
  color: #aaaaaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
}

.atira-modal-button:hover,
.atira-modal-button:focus {
  color: #000;
  text-decoration: none;
  cursor: pointer;
}

.atira-modal-overlay {
  display: none;

  position: fixed;
  z-index: 999;
  padding-top: 100px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: #803588db;
}

.atira-theme-body {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
}

.atira-theme-content-container {
  display: flex;
  flex: 1;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 1.2rem;
  padding: 1rem;
  width: 100%;
}

.atira-theme-form {
  width: 100%;
}

.atira-theme-input-radio {
  width: fit-content !important;
}

.atira-theme-input-radio-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.atira-theme-title {
  color: #fff;
  font-weight: 700;
  font-size: 1.3rem;
}

.atira-theme-label {
  width: 100%;
}

.atira-theme-label span {
  color: #f00;
}

.atira-theme-input {
  width: 100%;
}

.atira-theme-send-button-shared {
  min-width: 6rem;
  width: auto;
  height: 2.8rem;
  border: 0;
  padding: 0.1rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all 0.2s ease-in-out;
}

textarea.atira-theme-input {
  resize: vertical !important;
  min-height: 3rem;
  max-height: 20rem;
}

textarea.atira-theme-input::placeholder {
  position: absolute;
  transform: translateY(50%);
  bottom: 50%;
  height: fit-content;
}

.iti {
  flex-grow: 1;
  display: flex !important;
  border: 0 !important;
  width: 100%;
}

.atira-theme-input[type='tel'] {
  padding-right: 0 !important;
  padding-left: 0 !important;
  padding-inline-end: 6px !important;
  padding-inline-start: 42px !important;
}

.atira-theme-input[type='tel'] {
  direction: ltr !important;
}

.atira-form-html[dir='rtl'] .atira-theme-input[type='tel'],
.atira-theme-form[dir='rtl'] .atira-theme-input[type='tel'] {
  text-align: left !important;
  padding-inline-start: 6px !important;
  padding-inline-end: 42px !important;
}

.atira-form-html[dir='rtl'] .atira-theme-input[type='tel']::placeholder,
.atira-theme-form[dir='rtl'] .atira-theme-input[type='tel']::placeholder {
  padding-right: 3rem;
  padding-inline-end: 6px;
  text-align: right !important;
}

.atira-form-html[dir='rtl'] .iti--allow-dropdown .iti__flag-container,
.atira-theme-form[dir='rtl'] .iti--allow-dropdown .iti__flag-container {
  left: auto;
  right: 0;
}

.iti__search-input {
  padding-block: 5px !important;
}

.atira-form-html[dir='ltr'] .iti__search-input {
  padding-right: 52px !important;
  padding-left: 6px !important;
}

.atira-theme-input-radio-group {
  display: flex;
  column-gap: 1rem;
  row-gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
}

.atira-theme-input-radio-item {
  flex-shrink: 0;
}

.atira-theme-send-button:hover {
  filter: brightness(0.9);
}

#atira-theme-submit-button-loading {
  display: none;

  height: 60%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid #fff;
  border-top-color: transparent;
  animation: loading 1s infinite linear;
  transform-origin: center center;
  vertical-align: middle;
}

@keyframes loading {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 576px) {
  .atira-theme-input-wrapper {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
  }

  .atira-theme-label {
    width: 12rem;
  }
}

@media (min-width: 768px) {
  .atira-logo-wrapper {
    width: 10rem;
  }

  .atira-modal-content {
    width: 50%;
  }
}
