/* Reset and body styling */
html,
body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden; /* optional if you want to prevent scrolling */
}

body {
  font-family: Arial, sans-serif;
  background: rgb(26, 26, 30);
  color: rgb(255, 255, 255);
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  flex-direction: column;
}

/* Container for icon + title */
.title-container {
  display: flex;
  align-items: center; /* vertical alignment */
  justify-content: center; /* horizontal alignment */
  gap: 12px; /* space between icon and title */
  margin-bottom: 20px;
  flex-direction: row-reverse; /* icon on left, title on right */
}

/* Icon next to title */
.title-icon {
  width: 40px; /* make size consistent */
  height: 40px;
  object-fit: contain;
}

/* Page title */
.page-title {
  font-size: 28px;
  font-weight: 600;
  margin: 0; /* remove default margin */
  text-align: left; /* align text properly next to icon */
}

/* Form container */
.container {
  background: rgb(34, 35, 39);
  padding: 30px;
  border-radius: 12px;
  width: 320px;
  max-width: 90vw;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
}

/* Input groups */
.input-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

label {
  margin-bottom: 10px;
}

input {
  padding: 10px;
  border-radius: 6px;
  font-size: 16px;
  background-color: rgb(44, 44, 49);
  border: 1.5px solid rgb(66, 67, 74);
  color: white;
  outline: none;
}

input:focus {
  border-color: rgb(83, 98, 168);
}

/* Required star color */
.required {
  color: white;
}

/* Links */
a {
  text-decoration: none;
  color: rgb(131, 147, 218);
  font-size: 14px;
}

a:hover {
  text-decoration: underline;
}

/* Button */
.btn {
  width: 100%;
  padding: 10px;
  background: rgb(23, 98, 138);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  margin-top: 10px;
}

.btn:disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Footer text */
.footer-text {
  text-align: center;
  margin-top: 15px;
  font-size: 14px;
  color: rgb(170, 171, 177);
}

/* DOB fields (optional reuse) */
.dob-fields {
  display: flex;
  gap: 10px;
}

.dob-fields select {
  width: 100%;
  padding: 10px;
  border-radius: 6px;
  background-color: rgb(44, 44, 49);
  border: 1.5px solid rgb(66, 67, 74);
  color: white;
  font-size: 16px;
  outline: none;
}

.dob-fields select:focus {
  border-color: rgb(83, 98, 168);
}

/* Custom checkbox */
.tos-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  margin-bottom: 10px;
}

.tos-container input {
  display: none;
}

.checkmark {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  border: 2px solid #888;
  display: inline-block;
  position: relative;
}

.tos-container input:checked + .checkmark {
  background-color: #4a90e2;
  border-color: #4a90e2;
}

.tos-container input:checked + .checkmark::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.red-toast {
  position: relative;
  background: rgb(35, 35, 37) !important;
  color: white !important;
  border-radius: 10px !important;
  padding: 14px 18px 18px 55px !important;
  font-size: 15px !important;
  display: flex;
  align-items: center;
  animation: slideInRightCustom 0.35s ease-out forwards;

  /* REMOVE GLOW */
  box-shadow: none !important;
}

/* LEFT ICON CIRCLE */
.red-toast::before {
  content: "!";
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  display: flex;
  justify-content: center;
  align-items: center;
  background: #ff5f5f;
  border-radius: 50%;
  font-weight: bold;
  font-size: 14px;
}

/* PROGRESS BAR */
.red-toast .toastify-progress {
  background: #ff5f5f !important;
  height: 4px !important;
  border-radius: 0 0 10px 10px !important;
  opacity: 1 !important;
}

/* Close button */
.red-toast .toast-close {
  color: #fff !important;
}

/* Slide animation */
@keyframes slideInRightCustom {
  from {
    transform: translateX(120%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Developer header */
.dev-header {
  width: 100%;
  padding: 8px 0;
  background-color: #4da6ff;
  color: white;
  font-weight: bold;
  font-family: Arial, sans-serif;
  text-align: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

/* Made-with footer */
.made-with {
  position: fixed;
  bottom: 10px;
  right: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.6);
  font-family: Arial, sans-serif;
  z-index: 1000;
  pointer-events: none;
}

/* Modal overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

/* Modal container */
.modal-container {
  background: rgb(34, 35, 39);
  padding: 30px;
  border-radius: 12px;
  width: 320px;
  max-width: 90vw;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-sizing: border-box; /* important */
}

/* Modal content */
.modal-content {
  display: flex;
  flex-direction: column;
  gap: 15px;
  width: 100%;
}

.modal-container input {
  width: 90%; /* slightly smaller than the modal */
  max-width: 280px; /* optional for large screens */
}

.modal-container input:focus {
  border-color: rgb(83, 98, 168);
}

.btn-recover {
  width: 100%;
  padding: 12px;
  background: rgb(23, 98, 138);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s;
}

.btn-recover:hover {
  background: rgb(35, 120, 160);
}

.modal-container h3 {
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 20px;
  color: white;
  cursor: pointer;
}

@keyframes shake {
  0% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-10px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(10px);
  }
  100% {
    transform: translateX(0);
  }
}

.shake {
  animation: shake 0.5s; /* 0.5 seconds duration */
}

.input-error-wrapper {
  border: 1.5px solid red;
  border-radius: 6px;
}

input.input-error {
  border: 1.5px solid red !important;
  border-radius: 6px;
}

.input-error-wrapper #country-code {
  color: red;
}

input.input-valid {
  border: 1.5px solid #4caf50;
  outline: none;
}

input {
  transition: border 0.2s;
}

#country-code {
  display: none; /* hidden on page load */
  cursor: pointer;
  transition: all 0.3s ease;
}

#country-list {
  display: none; /* hide the dropdown initially */
  position: absolute;
  background: rgb(34, 35, 39);
  border: 1px solid rgb(66, 67, 74);
  border-radius: 6px;
  margin-top: 5px;
  list-style: none;
  padding: 5px 0;
  width: max-content;
  max-width: 250px;
  z-index: 100;
}

#country-list li {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flag-icon {
  height: 15px;
  width: auto; /* auto width keeps correct aspect ratio */
  border-radius: 3px;
  object-fit: cover;
  flex-shrink: 0;
}

/* Special fix for Switzerland (square flag) */
.flag-icon.flag-square {
  width: 15px !important; /* make it perfectly square */
  height: 15px !important;
  object-fit: cover;
}

#country-list li:hover {
  background-color: rgb(44, 44, 49);
}

.hybrid-input-wrapper {
  display: flex;
  align-items: center;
  gap: 8px; /* space between country code and input */
}

#country-code {
  display: none; /* initially hidden */
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0; /* don’t shrink */
}

#email-phone-input {
  flex: 1; /* take all remaining width */
  padding: 10px;
  border-radius: 6px;
  font-size: 16px;
  background-color: rgb(44, 44, 49);
  border: 1.5px solid rgb(66, 67, 74);
  color: white;
  outline: none;
}

#email-phone-input:focus {
  border-color: rgb(83, 98, 168);
}
