/* Base */
body {
  margin: 0;
  font-family: "Jost", Arial, sans-serif;
  overflow: hidden;
}

.auth-wrapper {
  width: 100%;
  transition: transform 0.5s ease;
}

.auth-part {
  display: flex;
  width: 100%;
  height: 100vh;
  overflow: auto;
}

/* Position helpers */
.position-arabic .auth-wrapper,
.position-english .auth-wrapper {
  transform: none;
}

.position-english .auth-form {
  order: -1;
}

/* Banner + form */
.auth-banner,
.auth-form {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
}

.auth-banner {
  position: relative;
}

.auth-banner-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 20px;
  text-align: center;
}

/* Logo */
.auth-logo img {
  width: auto;
  height: 110px;
  margin-bottom: 20px;
}

.auth-logo .logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 110px;
  height: 110px;
  overflow: hidden;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.auth-logo .logo-container:hover {
  transform: scale(1.1);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.auth-logo .logo-container img {
  width: auto;
  height: 75%;
  object-fit: contain;
  transition: transform 0.3s ease;
}

.auth-logo .logo-container:hover img {
  transform: rotate(3deg);
}

/* Form */
.auth-form-content {
  width: 100%;
  max-width: 400px;
  max-height: 80vh;
  padding: 20px;
  overflow: hidden;
  text-align: left;
  border-radius: 8px;
}

html[dir="rtl"] .auth-form-content {
  text-align: right;
}

.auth-form-title {
  margin-bottom: 1em;
  font-size: 1.5em;
  text-align: center;
}

.form-group {
  margin-bottom: 1em;
}

.form-control {
  width: 100%;
  padding: 10px;
  font-size: 1em;
  text-align: left;
  direction: ltr;
  border-radius: 4px;
}

html[dir="rtl"] .form-control {
  text-align: right;
  direction: rtl;
}

/* Buttons */
.btn-block {
  display: block;
  width: 100%;
  padding: 10px;
  color: #fff;
  font-size: 1em;
  text-align: center;
  background: rgba(10, 9, 48, 0.9);
  border: none;
  border-radius: 4px;
}

/* Language toggler */
.language-toggler {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 1000;
  display: flex;
  flex-direction: row;
  gap: 10px;
}

html[dir="rtl"] .language-toggler {
  right: 20px;
  left: auto;
  flex-direction: row-reverse;
}

.language-toggler a {
  display: inline-block;
  width: 32px;
  height: 32px;
  padding: 0;
  overflow: hidden;
  line-height: 0;
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.language-toggler a.active {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0, 123, 255, 0.3);
}

.language-toggler a:hover {
  transform: scale(1.1);
}

.language-toggler .flag-icon {
  display: block;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
}

/* Tabs */
.login-tabs {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 20px;
}

.login-tab {
  min-width: 92px;
  height: 52px;
  padding: 0 20px;
  color: #1f1f1f;
  font-weight: 700;
  background: #d9d9d9;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.login-tab.active {
  color: #fff;
  background: #07185c;
}

/* Inputs */
#phone_input,
#email_input {
  width: 100%;
  height: 58px;
  padding-inline: 18px;
  font-size: 18px;
  background: #fff;
  border: 1px solid #d7d7d7;
  border-radius: 16px;
}

#phone-group .iti {
  width: 100%;
}

/* intl-tel-input */
.iti {
  width: 100%;
}

.iti--allow-dropdown input,
.iti--allow-dropdown input[type="tel"] {
  padding-left: 88px !important;
}

[dir="rtl"] .iti--allow-dropdown input,
[dir="rtl"] .iti--allow-dropdown input[type="tel"] {
  padding-right: 88px !important;
  padding-left: 18px !important;
  text-align: right;
}

.iti__flag-container {
  z-index: 5;
}

.iti__selected-flag {
  border-radius: 12px;
}

.iti__country-list {
  width: 100%;
  max-width: 580px;
  text-align: left;
  border: 1px solid #ddd;
  border-radius: 0 0 10px 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

[dir="rtl"] .iti__country-list {
  text-align: right;
}

.iti__country {
  padding-top: 10px;
  padding-bottom: 10px;
}

.iti__search-input {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
  .auth-banner {
    display: none;
  }

  .auth-form {
    flex: none;
    width: 100%;
    height: 100vh;
    padding: 10px;
  }

  .auth-part {
    width: 100%;
  }

  .auth-wrapper {
    width: 100%;
    transform: none !important;
  }

  .auth-form-content {
    width: 90%;
    max-width: 100%;
  }

  .auth-form-title {
    font-size: 1.3em;
  }

  .language-toggler {
    position: fixed;
    left: 20px;
  }

  html[dir="rtl"] .language-toggler {
    right: 20px;
    left: auto;
  }
}

@media (max-width: 576px) {
  .auth-form-content {
    max-width: 100%;
    padding: 15px;
  }

  .auth-form-title {
    font-size: 1.2em;
  }

  .form-group {
    margin-bottom: 10px;
  }

  .btn-block {
    padding: 8px;
    font-size: 0.9em;
  }

  .auth-logo .logo-container {
    width: 90px;
    height: 90px;
  }

  .auth-logo img {
    height: 90px;
  }

  .login-tab {
    min-width: auto;
    height: 42px;
    padding: 0 14px;
    font-size: 12px;
  }

  #phone_input,
  #email_input {
    height: 52px;
    font-size: 16px;
  }
}

/* Syria flag override */
.iti__flag.iti__sy {
  background-image: url('/website/images/flag/ar.png') !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}

.iti__flag.iti__sy {
  background-image: url('/website/images/flag/ar.png') !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
}
