/* 1. Modal General Styles */
.ecm-otp-modal__dialog {
  max-width: 450px;
  margin: 30px auto;
}

.ecm-otp-modal__header {
  text-align: center;
  border: 0;
  padding-top: 0;
}

.ecm-otp-modal__title {
  font-size: 20px;
  color: #000;
  padding: 12px 15px 0px 15px;
  display: inline-block;
  text-align: left;
}

.ecm-otp-modal__body {
  padding: 0px 45px 50px 45px;
}

.ecm-otp-modal .close {
  position: absolute;
  right: 30px;
  border: none;
  outline: none;
  background: transparent;
  padding: 0;
  margin: 0;
  z-index: 1050;
  font-size: 28px;
  cursor: pointer;
  line-height: 1;
  color: #000;
  opacity: 0.5;
}

.ecm-otp-modal .close:hover {
  opacity: 0.8;
}

.ecm-otp-modal__close {
  pointer-events: none;
  display: inline-block;
  padding-top: 10px;
}

/* 2. Form & Inputs */
.ecm-otp-modal__group {
  padding: 0;
}

.ecm-otp-modal__field {
  margin-bottom: 10px;
}

.ecm-otp-modal__label,
.plogin,
p.password {
  font-weight: 600;
  color: #000;
  font-size: 13px;
  text-align: left;
  margin-bottom: 5px;
  margin-top: 5px;
  display: block;
}


.ecm-otp-modal__required {
  color: #b11016;
}

.ecm-otp-modal__input,
.form-control.plogin,
.form-control.password,
#otp_code {
  background: #fff;
  border: 1px solid #dfdfdf;
  height: 45px;
  padding: 10px 15px 13px 15px;
  z-index: 1;
  border-radius: 4px;
  margin: 0;
}

.ecm-otp-modal__code-group .ecm-otp-modal__input {
  height: auto;
}

.ecm-otp-modal__code-group {
  text-align: start;
  display: none;
  margin-top: -15px;
}

/* 3. Buttons */
.ecm-otp-modal__action {
  margin-bottom: 5px;
  margin-top: 10px;
}

/* Primary Button using BS5 variables */
.ecm-otp-modal__btn,
button.btn.btn-primary.plogin-button,
#sendOTPLoginModal {
  --bs-btn-color: #fff;
  --bs-btn-bg: #0d6efd;
  --bs-btn-border-color: #0d6efd;
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: #0b5ed7;
  --bs-btn-hover-border-color: #0a58ca;
  --bs-btn-focus-shadow-rgb: 49, 132, 253;
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: #0a58ca;
  --bs-btn-active-border-color: #0a53be;
  --bs-btn-active-shadow: inset 0 3px 5px rgba(0, 0, 0, .125);
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: #0d6efd;
  --bs-btn-disabled-border-color: #0d6efd;

  color: var(--bs-btn-color) !important;
  background-color: var(--bs-btn-bg) !important;
  border-color: var(--bs-btn-border-color) !important;
  background-image: none !important;
  width: 100%;
  padding: 15px 20px;
  font-size: 14px;
  border-radius: 4px;
  text-transform: inherit;
  transition: all .4s ease-in-out;
  margin-top: 10px;
}

.ecm-otp-modal__btn:hover,
button.btn.btn-primary.plogin-button:hover {
  color: var(--bs-btn-hover-color) !important;
  background-color: var(--bs-btn-hover-bg) !important;
  border-color: var(--bs-btn-hover-border-color) !important;
}

/* Secondary / Outline Button */
.ecm-otp-modal__btn#sendOTPidentityModal,
button#sendOTP,
button#sendOTPCheckout {
  color: #0d6efd !important;
  background-color: #fff !important;
  border: 1px solid #0d6efd !important;
  padding: 13px 15px;
  width: 100%;
  border-radius: 5px;
  font-size: 14px;
  transition: all .4s ease-in-out;
}

.ecm-otp-modal__btn#sendOTPidentityModal:hover,
button#sendOTP:hover,
button#sendOTPCheckout:hover {
  color: #fff !important;
  background-color: #0b5ed7 !important;
  border-color: #0a58ca !important;
}

.ecm-otp-modal__link {
  text-decoration: underline;
  color: #2fb5d2;
  cursor: pointer;
  display: block;
  width: 100%;
  text-align: center;
  padding: 0;
  margin-top: 15px;
  font-size: 0.9em;
  box-shadow: none;
}

.ecm-otp-modal__link:hover {
  color: #21879d;
}

.ecm-otp-modal__timer,
#timer-btn {
  color: #000;
  background: transparent;
  border: none;
  padding: 0;
  display: inline;
  margin: 5px auto;
}

.ecm-otp-modal__field {
  margin-bottom: 15px;
}

.ecm-otp-modal__password-field {
  margin-bottom: 25px;
}

.ecm-otp-modal__link.ecm-otp-forgot {
  display: block;
  margin: 10px auto;
}

.ecm-otp-modal__link.ecm-otp-btn-back {
  display: block;
  margin: 0 auto;
}

/* Email login button loader */
#ecm-otp-login-email-btn {
  position: relative;
  overflow: hidden;
  min-height: 53px;
}

#ecm-otp-login-email-btn .tc-loader {
  display: none;
}

#ecm-otp-login-email-btn.confirm-loading .tc-loader {
  display: block;
}

#ecm-otp-login-email-btn.confirm-loading .ecm-otp-btn-text {
  display: none;
}

/* Alternative Methods Accordion */
.ecm-otp-modal__alt-methods {
  margin-top: 15px;
  text-align: center;
}

.ecm-otp-modal__alt-divider {
  position: relative;
  text-align: center;
  margin-bottom: 15px;
}

.ecm-otp-modal__alt-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid #dfdfdf;
  z-index: 1;
}

.ecm-otp-modal__alt-divider-text {
  background: #fff;
  padding: 0 10px;
  position: relative;
  z-index: 2;
  color: #777;
  font-size: 13px;
}

.ecm-otp-modal__accordion {
  border: 1px solid #dfdfdf;
  border-radius: 8px;
  overflow: hidden;
  text-align: left;
}

.ecm-otp-modal__accordion-btn {
  background: #f9f9f9;
  border: none;
  width: 100%;
  padding: 12px 15px;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.2s;
}

.ecm-otp-modal__accordion-btn:hover {
  background: #f1f1f1;
}

.ecm-otp-modal__accordion-icon {
  font-size: 20px;
  line-height: 1;
  transition: transform 0.3s;
}

.ecm-otp-modal__accordion-btn.is-open .ecm-otp-modal__accordion-icon {
  transform: rotate(180deg);
}

.ecm-otp-modal__accordion-content {
  padding: 15px;
  background: #fff;
  border-top: 1px solid #dfdfdf;
}

.ecm-otp-modal__email-btn {
  background: #fff;
  border: 1px solid #dfdfdf;
  border-radius: 6px;
  width: 100%;
  padding: 10px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  color: #333;
  cursor: pointer;
  transition: all 0.2s;
}

.ecm-otp-modal__email-btn:hover {
  border-color: #0d6efd;
  color: #0d6efd;
  background: #f4f8ff;
}

.ecm-otp-modal__email-icon {
  color: #666;
  fill: currentColor;
}
.ecm-otp-modal__email-btn:hover .ecm-otp-modal__email-icon {
  color: #0d6efd;
}

/* Password Wrapper */
.ecm-otp-modal__password-wrapper {
  position: relative;
  display: block;
}

.ecm-otp-modal__password-wrapper .ecm-otp-modal__input {
  width: 100%;
  padding-right: 40px;
}

.ecm-otp-modal__toggle-password {
  position: absolute;
  right: 12px;
  top: 0;
  cursor: pointer;
  color: #777;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}
.ecm-otp-modal__toggle-password:hover {
  color: #333;
}

/* 4. Alerts and Messages */
.ecm-otp-modal__message-place,
#message_place {
  margin: 0;
  margin-bottom: 20px;
  font-size: 12px;
  line-height: 15px;
}

#block-verified.alert-success {
  padding: 10px 0;
  text-shadow: none;
  font-weight: 600;
  font-size: 13px;
  border-radius: 4px;
  margin-top: 40px;
  text-align: center;
  background-color: #dff0d8;
  border-color: #d6e9c6;
  color: #3c763d;
}

#block-verified.alert-success em {
  font-style: normal !important;
}

.ecm-otp-modal__success,
#otp-success.alert-success {
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  color: #2A7D2E;
  margin-top: 5px !important;
  display: block;
}

.alert-warning.otp_code {
  background: none;
  padding: 0;
  color: #DA0F00;
  font-size: 10px;
  font-weight: 600;
  margin: 6px 0;
}

.ecm-otp-modal__error-msg,
.ecm-otp-modal__error-text,
#otp-error {
  font-size: 11px;
  text-align: center;
  line-height: 17px;
  color: #DA0F00;
  margin: 5px;
  padding: 0;
}

#ecm_simcheck_register-modal #otp-error.alert-danger {
  font-size: 13px;
  padding: 5px;
  font-weight: 500;
  background: #f9c6c6;
  border-radius: 4px;
  margin-bottom: 15px;
}

p.error,
.ecm-otp-error-text {
  color: #DA0F00;
  font-size: 11px;
  margin: 10px 0 0 0;
}

.ecm-otp-error-text {
  margin-top: 5px;
  display: none;
}

.ecm-otp-test-alert {
  margin-top: 15px;
}

label.warning.warning_otp {
  display: inline-block;
  margin: 0px 0px 5px 0px;
  white-space: nowrap;
  float: left;
  color: #DA0F00;
  font-size: 12px;
}

/* 5. Additional Typography & Helpers */
.otp-login {
  color: #000;
  text-decoration: none;
  text-align: center;
  font-size: 12px;
  margin-top: 1rem;
  padding-bottom: 0.9375rem;
}

.plogin-form .otp-login {
  font-size: 14px;
}

.confirm_register p.about {
  font-size: 14px;
  margin-bottom: 15px;
  line-height: inherit;
  text-align: center;
}

.confirm_register p.about a {
  text-decoration: underline;
}

.text-center {
  text-align: center;
}

.p_n {
  padding: 0;
}

.p_l_5 {
  padding-left: 5px;
}

.p_r_5 {
  padding-right: 5px;
}

.p_l_r_5 {
  padding-left: 5px;
  padding-right: 5px;
}

/* 6. Authentication Page specific */
.ecm-otp-modal__auth-inner {
  margin-top: 2rem;
}

.ecm-otp-modal__auth-header {
  font-size: 22px;
}

.ecm-otp-modal__auth-hello {
  text-align: center;
  font-size: 30px;
  font-weight: 500;
}

.ecm-otp-modal__auth-title {
  color: #000;
  text-align: center;
  margin: 0;
  border-radius: 4px;
}

.ecm-otp-modal__auth-desc {
  padding-top: 30px;
  line-height: normal;
  margin-bottom: 2rem;
  font-size: 1.2rem;
}

.ecm-otp-modal__btn--large {
  padding: 10px 20px;
  font-size: 1.1rem;
  width: auto;
}

/* 7. Loading Animation (lds-ellipsis-m) */
.ecm-otp-modal__btn.confirm-loading,
.ecm-otp-modal__btn.confirm-loading:hover,
button[data-link-action=save-customer].confirm-loading,
button[data-link-action=save-customer].confirm-loading:hover {
  position: relative;
  color: transparent !important;
  --bs-btn-color: transparent !important;
  --bs-btn-hover-color: transparent !important;
  transition: none !important;
}

button[data-link-action=save-customer]>div.tc-loader {
  display: none;
}

button[data-link-action=save-customer].confirm-loading>div.tc-loader {
  display: block;
  position: absolute;
  margin: 5px auto;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
}

@keyframes lds-ellipsis-m3 {

  0%,
  25% {
    left: 32px;
    transform: scale(0);
  }

  50% {
    left: 32px;
    transform: scale(1);
  }

  75% {
    left: 100px;
  }

  100% {
    left: 168px;
    transform: scale(1);
  }
}

@keyframes lds-ellipsis-m2 {
  0% {
    transform: scale(1);
  }

  25%,
  100% {
    transform: scale(0);
  }
}

@keyframes lds-ellipsis-m {
  0% {
    left: 32px;
    transform: scale(0);
  }

  25% {
    left: 32px;
    transform: scale(1);
  }

  50% {
    left: 100px;
  }

  75% {
    left: 168px;
    transform: scale(1);
  }

  100% {
    left: 168px;
    transform: scale(0);
  }
}

.lds-ellipsis-m {
  position: relative;
  width: 88px !important;
  transform: translate(-44px, -44px) scale(0.44) translate(44px, 44px);
  margin: -20px auto;
}

.lds-ellipsis-m>div {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
}

.lds-ellipsis-m div>div {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 100px;
  left: 32px;
  animation: lds-ellipsis-m 1.3s cubic-bezier(0, 0.5, 0.5, 1) infinite forwards;
}

.lds-ellipsis-m div:nth-child(1) div {
  animation: lds-ellipsis-m2 1.3s cubic-bezier(0, 0.5, 0.5, 1) infinite forwards;
}

.lds-ellipsis-m div:nth-child(2) div {
  animation-delay: -0.65s;
  background: #eee7d8;
}

.lds-ellipsis-m div:nth-child(3) div {
  animation-delay: -0.325s;
  background: #d8ebf9;
}

.lds-ellipsis-m div:nth-child(4) div {
  animation-delay: 0s;
}

.lds-ellipsis-m div:nth-child(5) div {
  animation: lds-ellipsis-m3 1.3s cubic-bezier(0, 0.5, 0.5, 1) infinite forwards;
}

/* 8. Media Queries */
@media (max-width: 767px) {
  #ecm_smssender_register-modal .modal-body {
    padding: 0px 15px 35px 15px;
  }

  #ecm_simcheck_register-modal .modal-body {
    padding: 0px 20px 35px 20px;
  }

  #ecm_simcheck_register-modal .modal-dialog {
    width: auto;
  }

  .authentication_hello {
    line-height: 35px;
  }

  .authentication_title {
    padding: 0;
  }

  p.authentication_title_p {
    padding-top: 0px;
    line-height: 40px;
  }

  .authentication_title button.btn.btn-primary {
    width: 100%;
    font-size: 18px;
  }
}