@import url("../css/constant.css");

@font-face {
  font-family: "FS Albert Bold";
  src: url("fonts/FSAlbert-Bold.woff2") format("woff2"),
    url("fonts/FSAlbert-Bold.ttf") format("truetype");
  font-display: swap;
  font-weight: bold;
  font-style: normal;
}
@font-face {
  font-family: "FS Albert Regular";
  src: url("fonts/FSAlbert-Regular.woff2") format("woff2"),
    url("fonts/FSAlbert-Regular.ttf") format("truetype");
  font-display: swap;
  font-weight: 400;
  font-style: normal;
}
.card.login {
  border: none;
  box-shadow: none;
}

.card-body {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 70px); /* fallback for browsers without dvh support; adjusted for increased nav height */
  min-height: calc(100dvh - 70px); /* dynamic viewport height so the bottom button isn't cut off by the mobile URL bar */
  padding: 20px;
}

.btn-container {
  padding: 4% 0px 0%;
}
.divider {
  margin: 24px 0px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.divider-text {
  margin: 0 10px;
  color: var(--text-om-color-text-placeholder);
  font-size: 15px;
  font-weight: 400;
}

.line {
  display:block;
  width:100%;
  flex: 1;
  height: 1px;
  background-color: var(--border-om-color-border-secondary);
}

.social-option-container {
  margin-top: 0;
}
.social-btn {
  margin-top: 0;
}

.login-tnc-text {
  margin-top: 16px;
  font-size: 13px;
  line-height: 20px;
  color: #555555;
  font-family: var(--Mobile-App-Paragraph, "FS Albert Regular");
  text-align: start;
}

.login-tnc-text .terms-link,
.login-tnc-text .privacy-link {
  color: #ff7800;
  text-decoration: underline;
  cursor: pointer;
  margin-left: 4px;
  margin-right: 4px;
}

.doc-type-group {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  align-self: stretch;
  margin-bottom: 24px;
}

.doc-type-option {
  flex: 1 1 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 16px;
  height: 22px;
  cursor: pointer;
  margin: 0;
  user-select: none;
}

.doc-type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 0;
  height: 0;
}

.doc-type-radio {
  box-sizing: border-box;
  width: 20px;
  height: 20px;
  border-radius: 500px;
  border: 1px solid #8e8e8e;
  background-color: transparent;
  display: inline-block;
  position: relative;
  flex: none;
  transition: border-color 0.15s ease;
}

.doc-type-option input[type="radio"]:checked + .doc-type-radio {
  border-color: #ea6e00;
}

.doc-type-option input[type="radio"]:checked + .doc-type-radio::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  left: calc(50% - 10px / 2);
  top: calc(50% - 10px / 2);
  background: #ea6e00;
  border-radius: 500px;
}

.doc-type-option input[type="radio"]:focus-visible + .doc-type-radio {
  outline: 2px solid #ea6e00;
  outline-offset: 2px;
}

.doc-type-text {
  font-family: "FS Albert Trial", var(--Mobile-App-Paragraph, "FS Albert Regular");
  font-style: normal;
  font-weight: 400;
  font-size: 15px;
  line-height: 22px;
  color: #212121;
}

.civil-id-label {
  font-family: var(--Mobile-App-Label, "FS Albert Bold");
  font-size: 14px;
  font-weight: 600;
  color: var(--text-om-color-text-primary);
  margin-bottom: 8px;
  display: block;
}

.civil-id-hint {
  font-family: var(--Mobile-App-Paragraph, "FS Albert Regular");
  font-size: 13px;
  color: var(--text-om-color-text-tertiary);
  margin-top: 4px;
  margin-bottom: 0;
}

#documentIdInput {
  border: 1px solid #ced4da;
  border-radius: 8px;
  padding: 14px 16px;
  font-family: var(--Mobile-App-Label, "FS Albert Bold");
  font-size: 16px;
  font-weight: 700;
  color: #212121;
  background-color: #ffffff;
  transition: border-color 0.15s ease-in-out;
}

#documentIdInput::placeholder {
  font-weight: 400;
  font-size: 16px;
  color: #a4a4a4;
  font-family: var(--Mobile-App-Paragraph, "FS Albert Regular");
}

#documentIdInput:focus {
  outline: 0;
  box-shadow: none;
  border: 1px solid #212121;
  background-color: #ffffff;
}

#documentIdInput.is-invalid {
  border-color: var(--color-invalid, #da2702);
}

#theqaBtn {
  background-color: var(--background-om-color-theqa-background-inverse);
  color: var(--text-om-color-text-inverse);
  font-family: var(--Mobile-App-Paragraph, "FS Albert Regular");
    font-size: 17px;
    padding: 15px 0px;
    line-height: 26px;
    font-weight: 700;
    position: relative;
    min-height: 54px;
    display:flex;
    justify-content:center;
    align-items:center;

}

.theqa-text::before {
  content: "";
  display: inline-block;
  width: 24px;
  height: 24px;
  background-image: var(--theqa-icon);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
  margin-right: 8px;
}

[dir="rtl"] .theqa-text::before {
  margin-right: 0;
  margin-left: 8px;
}

.card-title {
  font-family: var(--Mobile-App-Label, "FS Albert Bold");

  font-size: 30px;
  color: #212121;
  font-weight: 600;
  margin-bottom: 5px;
  margin-top: 5px;
  font-style: normal;
}

.card-text {
  font-family: var(--Mobile-App-Paragraph, "FS Albert Regular");
  color: #4d4d4d;
  font-size: 15px !important;
  margin-bottom: 20px;
}

#loginInput {
  border: none;
  font-weight: 700;
  color: #212121;
  font-family: var(--Mobile-App-Label, "FS Albert Bold");
  border-bottom: 1px solid #ced4da;
  border-radius: 0;
  font-size: 18px;
  transition: border-color 0.15s ease-in-out;
  padding-left: 0;
  padding-right: 0;
}

#loginInput::placeholder {
  font-weight: 400;
  font-size: 16px;
  color: #a4a4a4;
  font-style: normal;
  font-family: var(--Mobile-App-Paragraph, "FS Albert Regular");
}

.back-button {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  padding-bottom: 10px;
}

nav.bg-light {
  padding: 15px 0; /* Increased padding */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Added shadow effect */
}

#loginInput:focus {
  outline: 0;
  box-shadow: none;
  border-color: #000000;
}

#continueBtn {
  background-color: #ff7800;
  border-color: #ff7800;
  font-size: 16px;
  padding: 15px 0px;
}

#continueBtn:disabled {
  background-color: #f1f1f1;
  border-color: #f1f1f1;
}

.toggle-container {
  display: flex;
  align-items: center;
  margin-top: 20px;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 24px;
  margin-right: 10px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: #ff7800;
}

input:checked + .slider:before {
  transform: translateX(16px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.toggle-label {
  font-size: 14px;
}

#loginInput.is-invalid {
  border-bottom-color: #da2702;
}

/* RTL Support */
html[dir="rtl"] .toggle-switch {
  margin-right: 0;
  margin-left: 10px;
}

html[dir="rtl"] .toggle-label {
  padding-left: 0;
  padding-right: 8px;
}

html[dir="rtl"] .slider:before {
  left: auto;
  right: 2px;
}

html[dir="rtl"] input:checked + .slider:before {
  transform: translateX(-16px);
}

.error-message {
  color: #da2702;
  font-size: 11px;
  margin-bottom: 10px;
  margin-top: -5px;
}

#loginInput.is-invalid {
  border-bottom-color: #da2702;
}

.resend-otp {
  color: #ff7800;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.navigation {
  border-bottom: 1px solid #d0d0d0;
}

.form-check-input[type="radio"] {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #ff7800;
  border-radius: 50%;
  outline: none;
  transition: all 0.2s ease-in-out;
  position: relative;
  background-color: #ffffff;
}

.form-check-input[type="radio"]:checked {
  background-color: hsl(0, 0%, 100%);
  border-color: #ff7800;
}
.form-check-input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ff7800;
}

.form-check-input[type="radio"]:focus {
  box-shadow: 0 0 0 2px rgba(255, 120, 0, 0.25);
}

.form-check-input[type="checkbox"] {
  width: 20px;
  height: 20px;
  border: 1px solid #ea6e00;
  border-radius: 4px;
}

.form-check-input[type="checkbox"]:checked {
  background-color: #ff7800;
  border-color: #ff7800;
}

.form-check {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.form-check-label {
  font-size: 15px;
  display: flex;
  align-items: center;
}

.form-check-input {
  margin-right: 8px;
}

.resend-otp {
  color: #ff7800;
  font-size: 15px;
  font-weight: 700;
  font-family: "FS Albert Regular";
}

/* Ensure the checkbox and label are aligned */
.form-check-input,
.form-check-label {
  margin-top: 0;
  margin-bottom: 0;
}

/* Adjust vertical alignment if needed */
.form-check-label,
.resend-otp {
  line-height: 1.5;
}
[dir="rtl"] .form-check {
  flex-direction: row-reverse;
}

[dir="rtl"] .form-check-label {
  flex-direction: row-reverse;
}
.btn-primary {
  position: relative;
}

.btn-primary.loading .button-text {
  visibility: hidden;
}

.lottie-container {
  display: none;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 30px; /* Adjust as needed */
  height: 30px; /* Adjust as needed */
}

.loader {
  display: none;
}

#continueBtn,
#confirmBtn {
  position: relative;
  min-height: 54px;
  padding: 15px 0px;
  font-size: 16px;
}

.lottie-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  display: none;
}

.btn-primary.loading .button-text {
  visibility: hidden;
}

.btn-primary.loading .lottie-container {
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-primary .dot {
  background-color: #ffffff;
  width: 6px;
  height: 6px;
  margin: 0 3px;
}

.error-message-feedback-text {
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--color-invalid);
}

.rememberMe {
  font-family: "FS Albert Regular";
  margin-top: 3px;
}

[dir="rtl"] #loginInput,
[dir="rtl"] #documentIdInput {
  direction: ltr;
  text-align: right;
}
#fullScreenLoader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: background-color 0.3s ease;
}
#fullScreenLoader.hidden {
  display: none;
}
.dot-loader {
  display: flex;
  align-items: center;
}
.dot {
  width: 10px;
  height: 10px;
  background-color: #ff7800;
  transform: rotate(45deg);
  margin: 0 5px;
  animation: dot-pulse 1.5s infinite ease-in-out;
}
.dot:nth-child(2) {
  animation-delay: 0.2s;
}
.dot:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes dot-pulse {
  0%,
  60%,
  100% {
    transform: rotate(45deg) scale(1);
    opacity: 1;
  }
  30% {
    transform: rotate(45deg) scale(0.5);
    opacity: 0.5;
  }
}

/* "No Omantel account" modal */
.no-profile-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  z-index: 1050;
  padding: 0 16px;
}

.no-profile-modal.is-open {
  display: flex;
}

.no-profile-modal__card {
  background: #ffffff;
  border-radius: 12px;
  width: 100%;
  max-width: 360px;
  padding: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  font-family: "FS Albert Trial", var(--Mobile-App-Paragraph, "FS Albert Regular");
}

.no-profile-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #ececec;
}

.no-profile-modal__title {
  margin: 0;
  font-family: var(--Mobile-App-Label, "FS Albert Bold");
  font-size: 17px;
  font-weight: 700;
  color: #212121;
  line-height: 22px;
}

.no-profile-modal__close {
  background: transparent;
  border: none;
  padding: 4px;
  margin: 0;
  color: #212121;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.no-profile-modal__body {
  margin: 16px 0 20px 0;
  font-size: 14px;
  line-height: 20px;
  color: #555555;
}

.no-profile-modal__cta {
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  color: #ea6e00;
  border: 1px solid #ea6e00;
  border-radius: 8px;
  font-family: var(--Mobile-App-Label, "FS Albert Bold");
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.no-profile-modal__cta:active {
  background: #fff4eb;
}

.no-profile-modal__actions {
  display: flex;
  flex-direction: row;
  gap: 12px;
}

.no-profile-modal__actions .no-profile-modal__cancel,
.no-profile-modal__actions .no-profile-modal__cta {
  flex: 1;
}

.no-profile-modal__cancel {
  width: 100%;
  padding: 14px 16px;
  background: #ffffff;
  color: #ea6e00;
  border: 1px solid #ea6e00;
  border-radius: 8px;
  font-family: var(--Mobile-App-Label, "FS Albert Bold");
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.no-profile-modal__cancel:active {
  background: #fff4eb;
}

.no-profile-modal__cta--primary {
  background: #ea6e00;
  color: #ffffff;
  border-color: #ea6e00;
}

.no-profile-modal__cta--primary:active {
  background: #c95e00;
}

/* "Select a number" page (post Theqa verification) */
.select-number-page .card-title {
  font-family: var(--Mobile-App-Heading, "FS Albert Bold");
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 8px;
}

.select-number-page .card-text {
  font-size: 14px;
  color: #6a6a6a;
  margin-bottom: 20px;
}

.phone-number-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.phone-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 12px;
  cursor: pointer;
  margin: 0;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.phone-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.phone-card.is-selected {
  border-color: #ea6e00;
  background: #fff7ef;
}

.phone-card__avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f2f2f2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #555555;
  flex-shrink: 0;
}

.phone-card.is-selected .phone-card__avatar {
  background: #ffe7d1;
  color: #ea6e00;
}

.phone-card__text {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.phone-card__label {
  font-family: var(--Mobile-App-Label, "FS Albert Bold");
  font-size: 16px;
  font-weight: 700;
  color: #1a1a2e;
  line-height: 20px;
}

.phone-card__number {
  font-size: 14px;
  color: #6a6a6a;
  margin-top: 2px;
}

.phone-card__radio {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #c4c4c4;
  flex-shrink: 0;
  position: relative;
  background: #ffffff;
}

.phone-card.is-selected .phone-card__radio {
  border-color: #ea6e00;
}

.phone-card.is-selected .phone-card__radio::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ea6e00;
}

/* Theqa authentication failed page */
.theqa-auth-failed-page .card-title {
  font-family: var(--Mobile-App-Heading, "FS Albert Bold");
  font-size: 26px;
  font-weight: 700;
  color: #1a1a2e;
  margin-bottom: 20px;
}

.theqa-auth-failed-card {
  background: #ffffff;
  border: 1px solid #ececec;
  border-radius: 12px;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.theqa-auth-failed-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  flex-shrink: 0;
}

.theqa-auth-failed-icon svg {
  display: block;
  width: 64px;
  height: 64px;
}

.theqa-auth-failed-body {
  font-family: var(--Mobile-App-Paragraph, "FS Albert Regular");
  font-size: 15px;
  line-height: 22px;
  color: #212121;
  margin: 0 0 16px 0;
}

.theqa-auth-failed-status {
  font-family: var(--Mobile-App-Label, "FS Albert Bold");
  font-size: 15px;
  font-weight: 700;
  color: #AA1F01;
  margin: 0;
}

#tryAgainBtn {
  background-color: #ff7800;
  border-color: #ff7800;
  color: #ffffff;
  font-family: var(--Mobile-App-Label, "FS Albert Bold");
  font-size: 16px;
  font-weight: 700;
  padding: 15px 0px;
  min-height: 54px;
}

@media (min-width: 768px) {
  main {
    background-color: #F9F9F9;
  }

  .navigation {
    display: none;
  }

  .container {
    background-color: transparent;
    height: auto;
  }

  .card.login {
    max-width: 551px;
    margin: 167px auto 0;
    background-color: #ffffff;
    padding: 0;
  }

  .card-body {
    display: block;
    min-height: auto;
  }

  .btn-container {
    padding: 4% 20px !important;
    margin-top: 32px;
    position: static !important;
    box-shadow: none !important;
  }
}
