.wd-form {
  display: flex;
  align-items: center;
  justify-content: center;
}
.wd-form-cont {
  display: flex;
  width: 100%;
}
.wd-form-form {
  flex-basis: 50%;
  display: flex;
  justify-content: flex-end;
  background-color: #f8f3ef;
}
.wd-wedding-style {
  flex-basis: 50%;
  width: 50%;
  display: flex;
  justify-content: flex-start;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: center !important;
}
.wd-form-form-cont {
  padding: 47px 10% 64px 0px;
  width: 75%;
}
.wd-form-form-title {
  max-width: 274px;
  color: #3f3a36;
  font-family: "Averta Std CY";
  font-size: 30px;
  font-style: normal;
  font-weight: 300;
  line-height: normal;
}
.wd-form-form-subtitle {
  margin-top: 13px;
  color: #3f3a36;
  font-family: "Averta Std CY";
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}
.wedding-form {
  margin-top: 30px;
}

.wd-input-group {
  padding: 12px 20px;
  display: flex;
  align-items: center;
  border: 1px solid #000;
  background: #fff;
  margin-bottom: 16px;
  gap: 10px;
}

.wd-input-group img {
  display: flex;
  width: 24px;
  height: 24px;
  justify-content: center;
  align-items: center;
}

.wd-input-group input {
  border: none;
  flex: 1;
  outline: none;
  background: transparent;
  color: #9e9e9e;
  font-family: "Averta Std CY";
  font-size: 15px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
  width: 100%;
}

.wd-section-title {
  font-weight: bold;
  margin-top: 32px;
  margin-bottom: 16px;
  max-width: 372px;
  color: #000;
  font-family: "Averta Std CY";
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: normal;
}

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

.wd-half {
  width: 48%;
}

.wd-template-slider-wrapper {
  width: 100%;
  padding: 40px 20px;
  text-align: center;
  color: white;
  font-family: sans-serif;
  overflow: hidden;
}

.wd-slider-title {
  font-size: 20px;
  margin-bottom: 30px;
  font-family: "Averta Std CY";
}

/* .wd-template-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
} */

.wd-slider-dots {
  margin-top: 40px;
}

.wd-dot {
  height: 10px;
  width: 10px;
  margin: 0 5px;
  background-color: white;
  border-radius: 50%;
  display: inline-block;
  opacity: 0.5;
  cursor: pointer;
}

.wd-dot.active {
  opacity: 1;
}
.wd-form-btn:hover {
  opacity: 0.8;
}
.miss-data {
  margin-top: 32px;
  color: red;
}
.wd-form-btn {
  margin-top: 10px;
  display: flex;
  width: 218px;
  padding: 10px 25px;
  justify-content: center;
  align-items: center;
  background: #b48c72;
  color: #fff;
  text-align: justify;
  font-family: "Averta Std CY";
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  border: none;
  cursor: pointer;
} /* ===== 1. Wrapper chung ===== */
.wd-wedding-style {
  position: relative;
  padding: 40px 0; /* Cho khoảng cách trên/dưới nếu cần */
}

/* Tiêu đề slider (nếu có) */
.wd-slider-title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 20px;
}

/* ===== 2. Phần slider và container ===== */
.wd-template-section {
  position: relative;
  width: 100%;
  overflow: hidden; /* ẩn phần item tràn sang hai bên */
}

/* Container flex để chứa các item */
.wd-template-slider {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 16px; /* hoặc tùy chọn */
  scroll-behavior: smooth;
}

/* Mỗi item rộng 2/3 container để hiển thị "1 item full + 1/3 item kế" */
.wd-template-item {
  flex: 0 0 auto;
  width: 318px; /* Đảm bảo vừa đủ cho ảnh không bị cắt */
  aspect-ratio: 159 / 200;
  scroll-snap-align: start;
  position: relative;
}

/* Style bên trong item (ví dụ ảnh full width, bo góc) */
.wd-template-item img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 8px;
}

/* Ẩn scroll bar (tùy chọn) */
.wd-template-slider::-webkit-scrollbar {
  display: none;
}
.wd-template-slider {
  -ms-overflow-style: none; /* IE/Edge */
  scrollbar-width: none; /* Firefox */
}

/* ===== 3. Prev/Next Buttons ===== */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.4);
  border: none;
  color: #fff;
  font-size: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}
.prev-btn {
  left: 8px; /* Cách trái container 8px */
}
.next-btn {
  right: 8px; /* Cách phải container 8px */
}
.slider-btn:focus {
  outline: none;
}

/* ===== 4. Pagination Dots ===== */
.wd-slider-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.wd-dot {
  width: 10px;
  height: 10px;
  background: #ddd;
  border-radius: 50%;
  cursor: pointer;
  transition: background 0.2s;
}
.wd-dot.active {
  background: #333;
}
.hidden {
  display: none;
}
#wd-avatar-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
  z-index: 100;
}

.wd-avatar-popup-cont {
  background-color: #fff;
  padding: 20px;
  max-width: 400px;
  min-width: 400px;
}
.wd-avatar-popup-title {
  font-size: 20px;
  text-align: center;
  font-weight: 600;
}
img#avatarPreview {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  margin-top: 15px;
}
#avatarInput {
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  width: 100%;
  font-size: 14px;
  background-color: #f9f9f9;
  margin-top: 10px;
  cursor: pointer;
}

#confirmAvatarBtn,
#cancelAvatarBtn {
  padding: 10px 20px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  width: 100%;
  max-width: 300px;
  transition: background-color 0.3s;
}
.wd-avatar-btns {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin-top: 10px;
}
#confirmAvatarBtn {
  background-color: #b48c72;
  color: #fff;
}

#confirmAvatarBtn:hover {
  opacity: 0.8;
}

#cancelAvatarBtn {
  background-color: #e0e0e0;
  color: #333;
}

#cancelAvatarBtn:hover {
  background-color: #c2c2c2;
}
.popup-content {
  background: white;
  padding: 20px;
  border-radius: 4px;
}
.wd-template-item.selected {
  border: 2px solid #000;
  box-shadow: 0 0 10px rgba(255, 127, 80, 0.5);
  border-radius: 8px;
}
.avatar-wrapper {
  position: relative;
  display: inline-block;
  width: 100%;
  overflow: hidden;
}

#avatarPreview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.upload-btn {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  border: none;
  padding: 8px 0;
  cursor: pointer;
  font-size: 14px;
}
.wd-avatar-popup-hidden {
  display: none;
}
.wd-avatar-popup-hidden.active {
  display: flex !important;
} /* Ẩn icon mặc định của Chrome, Edge, Safari */
input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  pointer-events: none;
}

/* Firefox */
input[type="date"],
input[type="time"] {
  appearance: none;
  -moz-appearance: none;
}
.input-error {
  border: 1px solid red;
  background-color: #ffe6e6;
}

@media screen and (max-width: 992px) {
  .wd-form-cont {
    flex-direction: column;
  }
  .wd-form-form {
    flex-basis: 100%;
    justify-content: center;
  }
  .wd-form-form-cont {
    width: 100%;
    padding: 30px 40px 40px 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  .wd-form-form-title {
    max-width: 274px;
    color: #3f3a36;
    text-align: center;
    font-family: "Averta Std CY";
    font-size: 24px;
    font-style: normal;
    font-weight: 300;
    line-height: normal;
  }
  .wd-form-form-subtitle {
    color: #3f3a36;
    text-align: center;
    font-family: "Averta Std CY";
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
  }
  .wedding-form {
    width: 100%;
  }
  .wd-input-group {
    width: 100%;
  }
  .wd-input-group img {
    display: flex;
    width: 20px;
    height: 20px;
    justify-content: center;
    align-items: center;
    aspect-ratio: 1/1;
  }
  .wd-input-group {
    margin-bottom: 10px;
  }
  .wd-input-group input {
    color: #9e9e9e;
    font-family: "Averta Std CY";
    font-size: 13px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
  }
  .wd-section-title {
    max-width: 372px;
    color: #000;
    font-family: "Averta Std CY";
    font-size: 14px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
  }
  .miss-data {
    margin-top: 30px;
  }
  .wd-form-btn {
    display: flex;
    width: 100%;
    padding: 10px 25px;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-align: justify;
    font-size: 16px;
    font-style: normal;
    font-weight: 700;
    line-height: normal;
  }
  .wd-wedding-style {
    width: 100%;
    flex-basis: 100%;
    padding: 0;
  }
  .wd-slider-dots {
    margin-top: 20px;
  } /* Giảm gap để card rộng hơn */
  .wd-template-slider {
    gap: 0px;
  }

  /* Mỗi card chiếm 80% khung nhìn, scroll-snap-align center */
  .wd-template-item {
    flex: 0 0 50%;
    scroll-snap-align: center;
    opacity: 0.6;
    transform: scale(0.9);
  }

  /* Card active giữa màn hình */
  .wd-template-item.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
  }

  /* Ẩn overflow để chỉ nhìn lộ 10% hai bên */
  .wd-template-section {
    overflow: hidden;
  }

  /* Dots nhỏ hơn */
  .wd-slider-dots {
    gap: 6px;
  }
  .wd-dot {
    width: 8px;
    height: 8px;
  }
  .wd-dot.active {
    background: #333;
  }
  .wd-row {
    flex-direction: column;
    width: 100%;
    flex-direction: column;
  }
}
@media screen and (max-width: 768px) {
  .wd-row {
    flex-direction: column;
    width: 100%;
    flex-direction: column;
  }
  .wd-input-group {
    width: 100%;
  }
}
