* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Nunito", sans-serif;
}

:root {
  --primary-color: #160e3b;
  --secondary-color: #3fa9f5;
  --shadow-color: #949494;
  --primary-light: #1e6091;
  --accent-color: #c9a227;
  --text-dark: #333;
  --text-light: #666;
  --bg-light: #f8f9fa;
  --white: #ffffff;
  --border-color: #e0e0e0;
}

body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background-color: var(--bg-light);
}

body input,
body select {
  box-shadow: 2px 2px 4px var(--shadow-color);
}

/* Remove number input arrows */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

/* ===================== LAYOUT ===================== */
.form__container {
  margin-top: 0.5rem;
  padding: 1rem;
  width: 100%;
  max-width: 1400px;
}

.title__container {
  width: 100%;
  display: flex;
  padding-bottom: 1rem;
}

.title__container img {
  width: 360px;
  height: auto;
}

.body__container {
  display: flex;
  gap: 2rem;
}

/* ===================== LEFT SIDEBAR ===================== */
.left__container {
  width: 280px;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-light) 100%);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  height: fit-content;
}

.side__titles {
  display: flex;
  flex-direction: column;
}

.title__name {
  padding: 0.5rem 0;
  margin-bottom: 1rem;
}

.title__name h3 {
  margin-bottom: 0.2rem;
  text-align: right;
  color: var(--white);
  font-size: 0.85rem;
  letter-spacing: 1px;
}

.progress__bar__container {
  padding-top: 0.5rem;
}

.progress__bar__container ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.progress__bar__container ul li {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--shadow-color);
  padding: 0.6rem;
  width: 42px;
  height: 42px;
  margin-bottom: 1.5rem;
  margin-left: auto;
  border-radius: 50%;
  font-size: 1.2rem;
  color: var(--white);
  position: relative;
  transition: all 0.3s ease;
}

.progress__bar__container ul li::before {
  content: "";
  width: 2px;
  height: 1.5rem;
  position: absolute;
  top: 100%;
  background-color: var(--shadow-color);
  transition: background-color 0.3s ease;
}

.progress__bar__container ul li:last-child::before {
  display: none;
}

.progress__bar__container ul .active {
  background-color: var(--secondary-color);
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(63, 169, 245, 0.3);
}

.progress__bar__container ul .active::before {
  background-color: var(--secondary-color);
}

/* ===================== RIGHT CONTENT ===================== */
.right__container {
  flex: 1;
  min-width: 0;
}

.right__container fieldset {
  border: none;
}

.sub__title__container {
  padding: 1rem 0 1.2rem 0;
  border-bottom: 1px solid var(--shadow-color);
  margin-bottom: 1rem;
}

.sub__title__container h2 {
  letter-spacing: 1px;
  color: var(--primary-color);
  margin: 0.4rem 0;
  font-size: 1.5rem;
}

.sub__title__container p {
  font-size: 0.85rem;
  color: var(--text-light);
}

.sub__title__container p a {
  text-decoration: underline;
  color: var(--primary-color);
}

.active__form {
  display: none;
}

/* ===================== FORM INPUTS ===================== */
.input__container {
  width: 100%;
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
}

.input__container label {
  color: var(--text-dark);
  font-size: 1rem;
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.input__container input,
.input__container select {
  padding: 0.75rem;
  font-size: 1rem;
  background: var(--white);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  margin-bottom: 1rem;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input__container input:focus,
.input__container select:focus {
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(63, 169, 245, 0.15);
}

.flex-container {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.flex-container > div {
  flex: 1;
  min-width: 200px;
}

/* ===================== BUTTONS ===================== */
.buttons {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 2rem;
  padding: 1rem 0;
}

.nxt__btn {
  min-width: 150px;
  padding: 0.75rem 2rem;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--white);
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.nxt__btn:hover {
  transform: translateY(-2px);
  background: var(--primary-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: var(--white);
}

.prev__btn {
  padding: 0.75rem 2.5rem;
  background: transparent;
  color: var(--text-dark);
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.3s ease;
  margin: 0 2rem;
}

.prev__btn::before {
  content: '\2190';
  margin-right: 0.5rem;
  font-size: 1.1em;
}

.prev__btn:hover {
  color: var(--secondary-color);
}

/* ===================== SELECTION CARDS ===================== */
.selection {
  display: flex;
  align-items: center;
  border: 2px solid var(--border-color);
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--white);
  cursor: pointer;
  transition: all 0.3s ease;
}

.selection:hover {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(22, 14, 59, 0.15);
}

.selection:hover .descriptionTitle h3,
.selection:hover .descriptionTitle p {
  color: var(--white);
}

.selection.selected {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
}

.selection.selected .descriptionTitle h3,
.selection.selected .descriptionTitle p {
  color: var(--primary-color);
}

.country-flag {
  margin-right: 1rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.country-flag img,
.country-flag svg {
  border-radius: 4px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  display: block;
  width: 48px;
  height: 32px;
}

.descriptionTitle h3 {
  color: var(--primary-color);
  margin: 0 0 4px 0;
  font-size: 1.1rem;
  transition: color 0.3s ease;
}

.descriptionTitle p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
  transition: color 0.3s ease;
}

/* ===================== SLIDER ===================== */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: #d3d3d3;
  border-radius: 4px;
  outline: none;
  opacity: 0.8;
  transition: opacity 0.2s;
  margin-top: 2rem;
}

.slider:hover {
  opacity: 1;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--secondary-color);
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--secondary-color);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.output__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  border-radius: 2rem;
  padding: 0.5rem 1rem;
  background-color: var(--secondary-color);
  font-weight: 600;
  margin-top: 1rem;
}

/* ===================== MODAL ===================== */
.modal-window {
  position: fixed;
  background-color: rgba(0, 0, 0, 0.5);
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 999;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
}

.modal-window:target {
  visibility: visible;
  opacity: 1;
  pointer-events: auto;
}

.modal-window > div {
  width: 90%;
  max-width: 700px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 2rem;
  background: var(--white);
  border-radius: 1rem;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-window header {
  font-weight: bold;
}

.modal-window h1 {
  font-size: 1.5rem;
  margin: 0 0 15px;
}

.modal-close {
  color: #aaa;
  line-height: 50px;
  font-size: 1.5rem;
  position: absolute;
  right: 15px;
  text-align: center;
  top: 5px;
  text-decoration: none;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--text-dark);
}

.modal-window div:not(:last-of-type) {
  margin-bottom: 15px;
}

.modal-window ul {
  list-style-position: inside;
}

.logo {
  max-width: 150px;
  display: block;
}

/* ===================== TABLET RESPONSIVE ===================== */
@media only screen and (max-width: 1052px) {
  .body__container {
    flex-direction: column;
  }

  .left__container {
    width: 100%;
    min-width: unset;
    flex-direction: row;
    padding: 1rem 1.5rem;
  }

  .side__titles {
    display: none;
  }

  .progress__bar__container {
    width: 100%;
    padding: 0;
  }

  .progress__bar__container ul {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
  }

  .progress__bar__container ul li {
    margin: 0;
    padding: 0.5rem;
    width: 36px;
    height: 36px;
    font-size: 1rem;
  }

  .progress__bar__container ul li::before {
    width: 1.5rem;
    height: 2px;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
  }

  .right__container {
    width: 100%;
  }

  .flex-container > div {
    min-width: 45%;
  }
}

/* ===================== MOBILE RESPONSIVE ===================== */
@media only screen and (max-width: 600px) {
  .form__container {
    margin: 0;
    padding: 0.5rem;
  }

  .title__container {
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
  }

  .title__container img {
    width: 280px;
  }

  .body__container {
    flex-direction: column;
    gap: 1rem;
  }

  .left__container {
    width: 100%;
    padding: 0.75rem;
    border-radius: 8px;
    overflow-x: auto;
  }

  .sidebar-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0.25rem;
    min-width: max-content;
  }

  .step-item {
    flex-direction: column;
    padding: 0.5rem;
    gap: 0.25rem;
    flex: 1;
    min-width: 70px;
  }

  .step-item:not(:last-child)::after {
    display: none;
  }

  .step-item:not(:last-child)::before {
    content: "";
    position: absolute;
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 2px;
    background: rgba(255, 255, 255, 0.3);
  }

  .step-title {
    font-size: 9px;
    text-align: center;
    order: 2;
    white-space: nowrap;
  }

  .step-circle {
    width: 28px;
    height: 28px;
    font-size: 11px;
    order: 1;
  }

  .step-circle.active {
    transform: scale(1.15);
  }

  .step-circle.completed {
    background: var(--primary-light) !important;
    color: #fff !important;
    border-color: var(--primary-light) !important;
  }

  .progress__bar__container ul li {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
    padding: 0.4rem;
  }

  .progress__bar__container ul li::before {
    width: 1rem;
  }

  .right__container {
    padding: 0 1rem;
  }

  .sub__title__container h2 {
    font-size: 1.25rem;
  }

  .sub__title__container p {
    font-size: 0.8rem;
  }

  .flex-container {
    flex-direction: column;
  }

  .flex-container > div {
    min-width: 100%;
  }

  .buttons {
    flex-direction: column-reverse;
    gap: 1rem;
  }

  .nxt__btn {
    width: 100%;
    min-width: unset;
  }

  .prev__btn {
    width: 100%;
  }

  .selection {
    padding: 0.75rem 1rem;
  }

  .descriptionTitle h3 {
    font-size: 1rem;
  }

  .descriptionTitle p {
    font-size: 0.7rem;
  }

  .modal-window > div {
    width: 95%;
    padding: 1.5rem;
    max-height: 85vh;
  }

  .modal-window h1 {
    font-size: 1.25rem;
  }
}

/* ===================== ANIMATIONS ===================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.right__container fieldset:not(.active__form) {
  animation: fadeIn 0.3s ease;
}

/* ===================== LEFT SIDEBAR STEPS ===================== */
.sidebar-content {
  position: relative;
}

.step-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 10px;
  position: relative;
}

.step-item:not(:last-child)::after {
  content: "";
  position: absolute;
  right: 25px;
  top: 70px;
  height: 40px;
  width: 2px;
  background: rgba(255, 255, 255, 0.3);
}

.step-title {
  color: rgba(255, 255, 255, 0.9);
  font-size: 14px;
  font-weight: 500;
}

.step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--white);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

.step-circle.active {
  background: var(--white);
  color: var(--primary-color);
  transform: scale(1.1);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

.step-circle.completed {
  background: var(--primary-light);
  color: var(--white);
  border-color: var(--primary-light);
}
