@import url("https://fonts.googleapis.com/css2?family=Libre+Franklin:ital,wght@0,100..900;1,100..900&family=Lora:ital,wght@0,400..700;1,400..700&family=Playfair+Display:ital,wght@0,400..900;1,400..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&family=Roboto:ital,wght@0,100..900;1,100..900&family=Ubuntu:ital,wght@0,300;0,400;0,500;0,700;1,300;1,400;1,500;1,700&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Ubuntu", sans-serif;
  font-weight: 400;
  background-color: hsl(229, 24%, 87%);
}

.form-container {
  max-width: 860px;
  margin: 50px auto;
  display: flex;
  background-color: white;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  padding: 20px;
  min-height: 530px;
  margin-top: 120px;
}

.sidebar {
  background-image: url(./assets/images/bg-sidebar-desktop.svg);
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 2rem;
}

.step-indicator {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-right: 40px;
}

.step-number-active {
  border: 1px solid white;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgb(0, 0, 0);
  font-weight: bold;
  background-color: hsl(206, 94%, 87%);
}

.step-number {
  border: 1px solid white;
  border-radius: 50%;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: 300;
}

.step-indicator {
  margin-bottom: 30px;
}

.step-text {
  display: flex;
  flex-direction: column;
}

.step-label {
  font-size: 0.8rem;
  color: lightgray;
  letter-spacing: 1px;
}

.step-title {
  color: white;
  font-weight: 500;
}

.steps {
  padding-top: 35px;
  padding-right: 40px; /* خليها أكبر لو عايز هوا أكتر */
  padding-left: 80px;
}

.hidden {
  display: none;
}

.steps h3 {
  color: hsl(213, 96%, 18%);
  font-size: 30px;
  font-weight: 750;
  margin-bottom: 10px;
}

.steps p {
  color: hsl(231, 11%, 63%);
  font-size: 0.9rem;
  font-weight: 300;
  margin-bottom: 40px;
}

.information {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.information h5.name {
  color: hsl(213, 96%, 18%);
  margin-bottom: 1px;
  font-weight: 500;
}

.information h5.email {
  color: hsl(213, 96%, 18%);
  margin-bottom: 1px;
  margin-top: 10px;
  font-weight: 500;
}

.information h5.phone {
  color: hsl(213, 96%, 18%);
  margin-bottom: 1px;
  margin-top: 10px;
  font-weight: 500;
}

.information input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc; /* لون رمادي فاتح */
  cursor: pointer;
}

.information input:focus {
  border: 1px solid hsl(243, 100%, 62%); /* اللون وقت الكتابة (Purple 600 مثلا من ألوانك) */
  outline: none; /* يشيل التحديد الأزرق الافتراضي */
}

.information button {
  width: 25%;
  margin-top: 70px;
  border-radius: 6px;
  padding: 11px;
  border: none;
  cursor: pointer;
  background-color: hsl(213, 96%, 18%);
  color: white;
  margin-left: 289px;
}

.information button:hover {
  background-color: hsl(213, 79%, 32%);
}

.phone-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 10px;
}

.phone-label-error {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.phone-label-error .error-message {
  color: hsl(354, 84%, 57%);
  font-size: 0.8rem;
  font-weight: 600;
  display: none; /* الرسالة مخفية افتراضيا */
}

.phone-input {
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  cursor: pointer;
}

.phone-input:focus {
  border: 1px solid hsl(243, 100%, 62%);
  outline: none;
}

.phone-input.error-input {
  border: 2px solid hsl(354, 84%, 57%);
}

.error-message {
  display: none;
  color: hsl(354, 84%, 57%); /* Red 500 */
  font-size: 0.8rem;
  margin-left: 10px;
  font-weight: 600;
}

.error-border {
  border: 1px solid hsl(354, 84%, 57%) !important; /* Red 500 */
}

.cards {
  display: flex;
  align-items: center;
  justify-content: center;
}

.card {
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: center;
  border: 1px solid hsl(231, 11%, 63%);
  padding: 10px;
  border-radius: 8px;
  padding-right: 60px;
  width: 30%;
  min-height: 120px;
  cursor: pointer;
  margin: 8px;
}

.card:hover {
  border-color: hsl(243, 100%, 62%);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.card img {
  margin-bottom: 40px;
  margin-right: 15px;
  margin-top: 7px;
}

.card span.plan {
  color: hsl(213, 96%, 18%);
  font-weight: 600;
  margin-bottom: 5px;
  margin-right: 9px;
}

.card span.price {
  color: hsl(231, 11%, 63%);
  margin-bottom: 3px;
  margin-right: 16px;
}

.card span.plan2 {
  color: hsl(213, 96%, 18%);
  font-weight: 600;
  margin-bottom: 5px;
  margin-left: 14px;
}

.card span.price2 {
  color: hsl(231, 11%, 63%);
  margin-bottom: 3px;
  margin-right: 5px;
}

.card span.plan3 {
  color: hsl(213, 96%, 18%);
  font-weight: 600;
  margin-bottom: 5px;
  margin-right: 31px;
}

.card span.price3 {
  color: hsl(231, 11%, 63%);
  margin-bottom: 3px;
  margin-right: 2px;
}

.card.selected {
  border-color: hsl(243, 100%, 62%);
  background-color: hsl(231, 100%, 99%);
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.toggle-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  background-color: hsl(231, 100%, 99%);
  padding: 10px 20px;
  border-radius: 8px;
  margin-top: 30px;
}

.toggle-label {
  color: hsl(231, 11%, 63%);
  font-weight: 500;
}

.switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 24px;
}

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

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: hsl(213, 96%, 18%);
  border-radius: 34px;
  transition: 0.4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  border-radius: 50%;
  transition: 0.4s;
}

input:checked + .slider {
  background-color: hsl(243, 100%, 62%);
}

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

.btn {
  display: flex;
  justify-content: space-between;
}

.btn .back {
  border: none;
  background-color: white;
  color: hsl(231, 11%, 63%);
  font-size: 16px;
  margin-left: 0px;
  margin-top: 70px;
}

.back:hover {
  color: hsl(213, 96%, 18%);
  cursor: pointer;
}

.next {
  width: 18%;
  margin-top: 70px;
  border-radius: 6px;
  padding: 11px;
  border: none;
  cursor: pointer;
  background-color: hsl(213, 96%, 18%);
  color: white;
  margin-left: 289px;
}

.next:hover {
  background-color: hsl(213, 79%, 32%);
}

.addons {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 500px;
}

.addon-card {
  display: flex;
  align-items: center;
  border: 1px solid hsl(231, 11%, 63%);
  border-radius: 8px;
  padding: 15px;
  cursor: pointer;
  transition: border 0.3s, background-color 0.3s;

  padding-right: 40px;
}

.addon-card:hover {
  border-color: hsl(243, 100%, 62%);
}

.addon-checkbox {
  margin-right: 20px;
  width: 18px;
  height: 18px;
}

.addon-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.addon-title {
  color: hsl(213, 96%, 18%);
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.addon-desc {
  color: hsl(231, 11%, 63%);
  font-size: 0.9rem;
}

.addon-price {
  color: hsl(243, 100%, 62%);
  font-weight: 600;
}

/* Selected style (for later with JS) */
.addon-card.selected {
  border-color: hsl(243, 100%, 62%);
  background-color: hsl(217, 100%, 97%);
}

/* زرارين في آخر الفورم */
.step-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  max-width: 500px;
}

.go-back {
  background: none;
  border: none;
  color: hsl(231, 11%, 63%);
  font-weight: 500;
  cursor: pointer;
}

.next-step {
  background-color: hsl(213, 96%, 18%);
  color: white;
  border: none;
  padding: 11px 20px;
  border-radius: 6px;
  cursor: pointer;
}

.next-step:hover {
  background-color: hsl(213, 79%, 32%);
}

.go-back:hover {
  color: hsl(213, 96%, 18%);
  cursor: pointer;
}

/* ===== STEP 4 - SUMMARY ===== */

.summary-box {
  background-color: hsl(217, 100%, 97%);
  padding: 20px;
  border-radius: 10px;
  margin-top: 30px;
}

.summary-plan {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}

.summary-plan div {
  display: flex;
  flex-direction: column;
}

.plan-name {
  color: hsl(213, 96%, 18%);
  font-weight: 700;
}

.change-link {
  color: hsl(243, 100%, 62%);
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
  margin-top: 4px;
}

.plan-price {
  font-weight: 700;
  color: hsl(213, 96%, 18%);
}

.divider {
  border: none;
  border-top: 1px solid hsl(229, 24%, 85%);
  margin: 15px 0;
}

.summary-addon {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.addon-name {
  color: hsl(231, 11%, 63%);
  font-size: 0.9rem;
}

.addon-price {
  color: hsl(213, 96%, 18%);
  font-size: 0.9rem;
  font-weight: 500;
}

.summary-total {
  display: flex;
  justify-content: space-between;
  padding: 20px;
  margin-top: 30px;
}

.summary-total span:first-child {
  color: hsl(231, 11%, 63%);
  font-size: 0.95rem;
}

.total-price {
  color: hsl(243, 100%, 62%);
  font-weight: 700;
  font-size: 1.1rem;
}

/* ===== Buttons ===== */

.nav-buttons {
  display: flex;
  justify-content: space-between;
  margin-top: 50px;
}

.go-back {
  background: none;
  border: none;
  color: hsl(231, 11%, 63%);
  font-weight: 500;
  cursor: pointer;
}

.go-back:hover {
  color: hsl(213, 96%, 18%);
  cursor: pointer;
}

.confirm {
  background-color: hsl(243, 100%, 62%);
  color: white;
  border: none;
  padding: 12px 30px;
  border-radius: 6px;
  cursor: pointer;
}

.confirm:hover {
  background-color: rgb(143, 137, 255);
}

/* ===== STEP 5 - THANK YOU ===== */

.thank-you {
  display: none;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 40px 20px;
  margin-top: 90px;
  margin-left: 58px;
}


.thank-you-content {
  max-width: 400px;
}

.thank-you-icon {
  width: 60px;
  margin-bottom: 30px;
}

.thank-you h2 {
  color: hsl(213, 96%, 18%);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.thank-you p {
  color: hsl(231, 11%, 63%);
  font-size: 0.95rem;
  line-height: 1.5;
}

.email-link {
  color: hsl(243, 100%, 62%);
  text-decoration: underline;
}
 

/* Media query for mobile devices */
@media (max-width: 768px) {
  .form-container {
    flex-direction: column; /* Arrange elements vertically */
    margin: 5%; /* Reduce margins */
    padding: 5%;
    min-height: auto; /* Adjust height */
    margin-top: 20px;
    width: 90%; /* Set width to 90% */
  }

  .sidebar {
    background-image: url(./assets/images/bg-sidebar-mobile.svg);
    padding: 1rem; /* Reduce padding */
    height: 190px;
    width: 100%;
    background-size: cover;
    margin-bottom: 20px;
    border-radius: 10px;
  }

  .step-indicator {
    flex-direction: row; /* Arrange steps horizontally */
    justify-content: space-around; /* Distribute steps evenly */
    padding: 0; /* Remove padding */
    margin-bottom: 10px;
  }

  .steps {
    padding: 5%; /* Adjust padding for content area */
  }

  .cards {
    flex-direction: column; /* Arrange cards vertically */
    align-items: stretch; /* Stretch cards to full width */
  }

  .card {
    width: 100%; /* Make cards full width */
    margin: 10px 0; /* Adjust margins */
    padding: 15px; /* Add padding to cards */
  }

  .card:nth-child(1){
    margin-top: 0;
  }

  .information button,
  .next,
  .next-step,
  .confirm {
    margin-left: 0;
    width: 100%;
    margin-top: 30px;
  }

  .back,
  .go-back {
    /* Make back buttons full-width and reset margin for stacking */
    width: 100%;
    margin-left: 0;
    margin-top: 0;
    padding: 11px 0; /* Add padding for consistent height and touch area */
  }

  .thank-you {
    margin-left: 0;
  }

  .step-number-active,
  .step-number {
    width: 30px;
    height: 30px;
    font-size: 0.9rem;  
  }

  .btn,
  .step-buttons,
  .nav-buttons {
    flex-direction: column-reverse; /* Stack buttons vertically, primary action last */
    justify-content: initial;      /* Reset space-between from desktop style */
    gap: 15px;                     /* Space between stacked buttons */
  }
}
