:root {
  --primary: rgba(56, 57, 99, 1);
  --secondary: rgba(56, 57, 99, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Alexandria", serif;
  text-align: center;
  background-color: #dedede;
}

.container {
  display: flex;
  flex-direction: column;
  margin: 2rem 1rem;
  background-color: white;
  border-radius: 8px;
  box-shadow: 2px 2px 20px #888888;
}

.header {
  max-width: 240px;
  margin: auto;
  font-size: 16px;
  margin-bottom: 1rem;
}

.header > p {
  font-size: 16px;
}

.header > p > span {
  font-size: 16px;
  font-weight: 500;
}

@media (min-width: 768px) {
  .container {
    margin: 2rem 20%;
  }
}

.text-primary {
  color: var(--primary);
}

.text-secondary {
  color: var(--secondary);
}

@media (min-width: 1024px) {
  .container {
    flex-direction: row;
  }

  .left {
    width: fit-content;
    background-color: var(--primary);
    color: white;
    padding: 2rem 1.5rem;
    border-radius: 8px;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .logo {
    margin-bottom: 1.5rem;
  }

  .right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 2rem 4rem 2rem 4rem;
    width: 60%;
  }

  .text-primary {
    color: var(--secondary);
  }

  .text-secondary {
    color: white;
  }

  .header {
    margin-bottom: 2rem;
  }

  .step {
    width: 100%;
  }
}

.logo {
  width: 150px;
}

/* الحاوية الأساسية لنظام التقدم */
.progress-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 70px;
  position: relative;
  margin: 2rem 0;
}

/* الخط الرأسي بين الـ Steps */
.progress-container::before {
  content: "";
  position: absolute;
  width: 2px;
  height: 90%;
  top: 10px;
  left: 35px;
  background: #a1aebe;
  z-index: 1;
}

.progress {
  min-width: 100%;
  padding: 0.25rem 1rem;
  border-radius: 0.25rem;
}

.progress-active {
  border: 1px solid white;
  background: linear-gradient(
    to bottom,
    rgba(104, 137, 255, 0.2),
    rgba(104, 137, 255, 0.5)
  );
}

/* تصميم كل Step */
.progress-step {
  width: 40px;
  height: 40px;

  border: 2px solid #a1aebe;
  color: black;
  font-size: 12px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  background: white;
  transition: all 0.3s ease-in-out;
}

/* عند التفعيل */
.progress-step.active {
  border-color: var(--secondary);
  color: var(--secondary);
}

/* Step Title as an Element Instead of ::after */
.progress-title {
  position: absolute;
  left: 50px;
  font-size: 18px;
  color: white;
  text-align: left;
  white-space: nowrap; /* Prevents breaking into multiple lines */
}

/* Mobile Version (Horizontal Progress Bar) */
@media (max-width: 768px) {
  .progress-title {
    top: 50px;
    left: auto;
    text-align: center;
    font-size: 12px;
    color: #465668;
    font-weight: 300;
    white-space: wrap; /* Prevents breaking into multiple lines */
  }

  .container {
    gap: 40px;
  }

  .right {
    width: 100%;
  }
}

/* تأثير الإضاءة */
@keyframes pulse {
  0% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1.7);
  }
}

/* التحويل إلى أفقي على الشاشات الصغيرة */
@media (max-width: 768px) {
  .progress-container {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    margin: 2rem 1rem;
  }

  /* الخط يصبح أفقي */
  .progress-container::before {
    width: 100%;
    height: 2px;
    top: 50%;
    left: 0;
  }

  .progress {
    min-width: auto;
    padding: 0;
    border-radius: 0;
  }

  .progress-active {
    border: none;
    background: none;
  }

  /* تعديل الـ Steps ليكونوا أفقيين */
  .progress-step {
    width: 40px;
    height: 40px;
  }

  /* النقطة المضيئة */
  .progress-step.active::before {
    content: "";
    width: 12px;
    height: 12px;
    background: var(--secondary);
    border-radius: 50%;
    position: absolute;
    animation: pulse 1s infinite alternate ease-in-out;
  }

  .right {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 0.5rem 1rem 0.5rem;
  }
}

.step-header {
  display: none;
  flex-direction: column;
  align-items: start;
  justify-self: center;
  margin-bottom: 1.5rem;
  max-width: 300px;
}

/* إظهار العنوان الصحيح */
.step-header.active {
  display: flex;
}

@media (min-width: 768px) {
  .step-header {
    align-items: center;
  }
}

.step {
  display: none;
}

.step.active {
  display: flex;
  flex-direction: column;
}

.prev-btn {
  align-self: start;
}

.step-title {
  font-size: 16px;
}

.step-desc {
  font-size: 16px;
  opacity: 0.5;
}

button {
  padding: 14px 48px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
}

.next-btn {
  background-color: var(--primary);
  color: white;
  width: fit-content;
  align-self: flex-end;
}

/* الزر عند التعطيل */
.submit-btn:disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
  opacity: 0.6;
  transition: background-color 0.3s, opacity 0.3s;
}

/* الزر عند التمكين */
.submit-btn {
  background-color: #28a745;
  color: white;
  border: none;
  width: fit-content;
  align-self: flex-end;
  padding: 10px 20px;
  font-size: 16px;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
}

/* تأثير عند تمرير الماوس على الزر */
.submit-btn:not(:disabled):hover {
  background-color: #23923d;
  transform: scale(1.05);
}

/* تأثير عند الضغط على الزر */
.submit-btn:not(:disabled):active {
  background-color: #004494;
  transform: scale(0.98);
}

.next-btn:disabled {
  background-color: #8c8c8c;
  cursor: not-allowed;
}

/* Base Styles for Input Fields */
.input-form {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: start;
  margin-bottom: 1.5rem;
}

.input-form > label {
  font-size: 13px;
}

.label-note {
  color: #595959;
  font-size: 12px;
}

.label-requiered {
  color: red;
  font-weight: bold;
}

.input-form > input,
select {
  font-family: "Alexandria", serif;
  padding: 16px;
  border: 1px solid #ced4da;
  border-radius: 4px;
  width: 100%;
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: url("imgs/arrow.png") no-repeat right;
}

/* Container for Name Fields (First, Middle, Last Name) */
.name-fields {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.name {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* Mobile View: First and Middle Name in Same Row, Last Name in Full Width Row */
@media (max-width: 767px) {
  .name-fields .input-form {
    width: 48%; /* First and Middle Name will take up 48% each */
  }

  .name-fields .input-form:nth-child(3) {
    width: 100%; /* Last Name will take full width */
  }

  .next-btn {
    background-color: var(--primary);
    color: white;
    width: 100%;
  }

  .submit-btn {
    width: 100%;
  }
}

/* Tablet and Desktop View: All Three Names in Same Row */
@media (min-width: 768px) {
  .name-fields .input-form {
    width: 32%;
  }
}

input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  outline: none;
  border: 2px solid var(--secondary);
}

input[type="radio"]:before {
  content: "";
  display: block;
  width: 60%;
  height: 60%;
  margin: 20% auto;
  border-radius: 50%;
}

input[type="radio"]:checked:before {
  background: var(--secondary);
}

.radio-group {
  display: flex;
  gap: 3.5rem;
}

.radio-group div {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.error-text {
  color: red;
  font-size: 10px;
  display: none; /* إخفاء الخطأ افتراضيًا */
}

.error-outline {
  border: 2px solid red !important;
  outline: none !important;
}

/* Hide the flag and dropdown for specific inputs */
#whatsapp_number + .iti,
#telegram_number + .iti {
  display: none !important;
}

/* تخصيص حاوية Select2 */
.select2-container .select2-selection--single {
  height: 46px !important; /* ارتفاع العنصر */
  padding: 10px !important;
  border: 1px solid #ced4da !important;
  border-radius: 4px !important;
  font-family: "Alexandria", serif !important;
  background: url("imgs/arrow.png") no-repeat right center !important;
  background-size: 20px !important;
  text-align: left !important;
}

/* تخصيص السهم الافتراضي */
.select2-container--default
  .select2-selection--single
  .select2-selection__arrow {
  display: none !important;
  text-align: left !important;
}

.select2-results__option,
.select2-results__option--selectable {
  text-align: left !important;
}
