/* SINH TỰ ĐỘNG bởi lanora/scope-css.py từ "giao_dien_hoan_chinh/css/service.css" — đừng sửa tay, sửa file gốc rồi chạy lại. */
/* =========================================================
   DỊCH VỤ THIẾT KẾ – Figma 320:4587 + 362:3336 (popup form)
   ========================================================= */

/* Hero dùng chung class .page-hero (category.css) – chỉ khác độ rộng nội dung */
:where(.lanora) .page-hero--service .page-hero__content {
  width: 543px;
}
:where(.lanora) .page-hero--service .page-hero__title {
  white-space: normal;
}

/* ---------- Main ---------- */
:where(.lanora) .service {
  position: relative;
  min-height: 1810px;
  padding: 56px 80px 80px;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  background: var(--white);
}
:where(.lanora) .service__bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
:where(.lanora) .service__bg > div {
  position: sticky;
  top: 0;
  width: 1440px;
  height: 810px;
  opacity: 0.3;
}
:where(.lanora) .service__bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
:where(.lanora) .service__bg > div::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(231.08deg, rgba(255, 255, 255, 0.1) 0%, rgba(144, 106, 64, 0.1) 65.617%);
}

/* Khối chọn nhu cầu (Figma Category-Menu 320:5013) */
:where(.lanora) .needs {
  position: relative;
  flex: none;
  width: 954px;
  --stroke: var(--border-default);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}
:where(.lanora) .needs__head {
  padding: 20px 24px 16px;
  background: linear-gradient(to right, #f4ebe5, #fff);
  font-weight: 600;
  font-size: 18px;
  line-height: 26px;
  color: var(--secondary-02);
}
:where(.lanora) .needs__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}
:where(.lanora) .needs__line {
  display: block;
  width: 906px;
  height: 1px;
  margin-bottom: -1px; /* Figma: đường kẻ cao 0px */
}
:where(.lanora) .need {
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-margin-top: 96px;
}
:where(.lanora) .need__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 906px;
  text-align: left;
}
:where(.lanora) .need__titles {
  display: flex;
  flex-direction: column;
  gap: 8px;
  white-space: nowrap;
}
:where(.lanora) .need__desc {
  font-size: 14px;
  line-height: 20px;
  font-style: oblique 10deg;
  color: var(--text-secondary);
}
:where(.lanora) .need__toggle img {
  width: 24px;
  height: 24px;
}
:where(.lanora) .need__toggle .icon-closed {
  display: none;
}
:where(.lanora) .need.is-collapsed .need__toggle .icon-open {
  display: none;
}
:where(.lanora) .need.is-collapsed .need__toggle .icon-closed {
  display: block;
}
:where(.lanora) .need.is-collapsed .need__content {
  display: none;
}
:where(.lanora) .need__content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card lựa chọn có ảnh (Figma card 343:2323) */
:where(.lanora) .option-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  width: 906px;
}
:where(.lanora) .option-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 297px;
  height: 74px;
  padding: 0 12px 0 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}
:where(.lanora) .option-card:nth-child(3n) {
  width: 296px;
}
:where(.lanora) .option-card:hover {
  border-color: var(--primary-02);
}
:where(.lanora) .option-card__thumb {
  position: relative;
  flex: none;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
}
:where(.lanora) .option-card__thumb img {
  position: absolute;
  left: 0;
  top: -9.69%;
  width: 100%;
  height: 155.56%;
}
:where(.lanora) .option-card__text {
  flex: 1 0 0;
  min-width: 1px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
:where(.lanora) .option-card__name {
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-primary);
}
:where(.lanora) .option-card__desc {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  line-height: 18px;
  font-style: oblique 10deg;
  color: var(--text-secondary);
}
:where(.lanora) .option-card__check {
  position: absolute;
  top: -1px;
  right: -1px;
  display: none;
  width: 36px;
  height: 33px;
}
:where(.lanora) .option-card.is-active {
  border-color: var(--primary-02);
  background: var(--primary-04);
}
:where(.lanora) .option-card.is-active .option-card__name {
  color: var(--primary-02);
}
:where(.lanora) .option-card.is-active .option-card__check {
  display: block;
}

/* Tag lựa chọn – dùng lại style .size-tag (product.css) */
:where(.lanora) .tag-list {
  display: flex;
  align-items: center;
  gap: 8px;
}
:where(.lanora) .choice-tag {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 9px 15px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  overflow: hidden;
  background: var(--white);
  font-weight: 500;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  color: var(--text-primary);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
:where(.lanora) .choice-tag:hover {
  border-color: var(--primary-02);
}
:where(.lanora) .choice-tag__check {
  position: absolute;
  right: -1px;
  bottom: -1px;
  display: none;
  width: 24px;
  height: 22px;
}
:where(.lanora) .choice-tag.is-active {
  border-color: var(--primary-02);
  background: var(--primary-04);
  color: var(--primary-02);
}
:where(.lanora) .choice-tag.is-active .choice-tag__check {
  display: block;
}
/* Tag "Cần gấp" (Figma 370:4435) */
:where(.lanora) .choice-tag--urgent {
  border-color: var(--price);
  background: rgba(231, 0, 0, 0.05);
  color: var(--price);
}
:where(.lanora) .choice-tag--urgent:hover {
  border-color: var(--price);
}
:where(.lanora) .choice-tag--urgent.is-active {
  border-color: var(--price);
  background: rgba(231, 0, 0, 0.12);
  color: var(--price);
}

:where(.lanora) .need__note {
  position: relative;
  padding: 16px 24px;
  border-radius: 8px;
  overflow: hidden;
  font-size: 14px;
  line-height: 20px;
  font-style: oblique 10deg;
  color: var(--secondary-02);
}
:where(.lanora) .need__note > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}
:where(.lanora) .need__note > p {
  position: relative;
}

/* Khung xác nhận (Figma 320:4608 / 360:2997) */
:where(.lanora) .summary {
  position: sticky;
  top: 100px;
  flex: none;
  width: 302px;
  --stroke: var(--border-default);
  border-radius: 12px;
  overflow: hidden;
  background: var(--white);
}
:where(.lanora) .summary__head {
  padding: 20px 24px 12px;
  font-weight: 600;
  font-size: 18px;
  line-height: 26px;
  white-space: nowrap;
}
:where(.lanora) .summary__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 8px 24px 24px;
}
:where(.lanora) .summary__list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
:where(.lanora) .summary__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
:where(.lanora) .summary__label {
  font-size: 13px;
  line-height: 18px;
  white-space: nowrap;
  color: var(--text-tertiary);
}
:where(.lanora) .summary__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
:where(.lanora) .summary__value {
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
}
:where(.lanora) .summary__change {
  font-size: 14px;
  line-height: 20px;
  text-decoration: underline;
  text-underline-position: from-font;
  white-space: nowrap;
}
:where(.lanora) .summary__change:hover {
  color: var(--primary-01);
}
:where(.lanora) .summary__pick {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
}
:where(.lanora) .summary__pick img {
  width: 20px;
  height: 20px;
}
:where(.lanora) .summary__line {
  display: block;
  width: 254px;
  height: 1px;
  margin-bottom: -1px;
}
:where(.lanora) .summary__confirm {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
:where(.lanora) .summary__agree {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  font-size: 13px;
  line-height: 18px;
  cursor: pointer;
}
:where(.lanora) .summary__agree input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
:where(.lanora) .summary__box {
  position: relative;
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border-default);
  border-radius: 4px;
  transition: background 0.2s, border-color 0.2s;
}
:where(.lanora) .summary__box img {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
}
:where(.lanora) .summary__agree input:checked + .summary__box {
  border-color: var(--primary-02);
  background: var(--primary-02);
}
:where(.lanora) .summary__agree input:focus-visible + .summary__box {
  outline: 2px solid var(--primary-03);
  outline-offset: 1px;
}
:where(.lanora) .summary__submit {
  width: 100%;
  font-size: 14px;
  line-height: 20px;
}
:where(.lanora) .summary__submit[disabled] {
  opacity: 0.3;
  cursor: not-allowed;
}
:where(.lanora) .summary__submit[disabled]:hover {
  color: var(--primary-02);
  background: var(--primary-04);
  border-color: var(--primary-02);
}

/* ---------- Popup điền thông tin (Figma 362:3755) ---------- */
:where(.lanora) .modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.4);
}
:where(.lanora) .modal.is-open {
  display: flex;
}
:where(.lanora) .modal__dialog {
  width: 628px;
  max-height: calc(100vh - 40px);
  overflow: auto;
  border-radius: 12px;
  background: var(--white);
}
:where(.lanora) .modal__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 16px 16px 16px 24px;
  background: linear-gradient(to right, #f4ebe5, #fff);
}
:where(.lanora) .modal__title {
  flex: 1 0 0;
  font-weight: 600;
  font-size: 18px;
  line-height: 26px;
  color: var(--secondary-02);
}
:where(.lanora) .modal__close img {
  width: 24px;
  height: 24px;
}
:where(.lanora) .modal__body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 24px;
}
:where(.lanora) .modal__intro {
  font-size: 14px;
  line-height: 20px;
  font-style: oblique 10deg;
  color: var(--price);
}
:where(.lanora) .modal__intro strong {
  font-weight: 500;
}
:where(.lanora) .modal__fields {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
:where(.lanora) .modal__row {
  display: flex;
  gap: 16px;
}
:where(.lanora) .field {
  flex: 1 0 0;
  min-width: 1px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
:where(.lanora) .field__label {
  display: flex;
  gap: 4px;
  font-weight: 600;
  font-size: 14px;
  line-height: 20px;
  color: #1b1b1b;
}
:where(.lanora) .field__label span {
  color: var(--price);
}
:where(.lanora) .field input,
:where(.lanora) .field textarea {
  width: 100%;
  height: 44px;
  padding: 0 15px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  outline: 0;
  font-size: 14px;
  line-height: 20px;
  color: var(--text-primary);
  transition: border-color 0.2s;
}
:where(.lanora) .field textarea {
  padding: 11px 15px;
  resize: vertical;
}
:where(.lanora) .field input::placeholder,
:where(.lanora) .field textarea::placeholder {
  color: var(--text-tertiary);
}
:where(.lanora) .field input:focus,
:where(.lanora) .field textarea:focus {
  border-color: var(--primary-02);
}
:where(.lanora) .field.is-invalid input {
  border-color: var(--price);
}
:where(.lanora) .field__error {
  display: none;
  font-size: 13px;
  line-height: 18px;
  color: var(--price);
}
:where(.lanora) .field.is-invalid .field__error {
  display: block;
}
:where(.lanora) .upload {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 20px;
  --stroke: var(--border-default);
  --stroke-style: dashed;
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
:where(.lanora) .upload:hover,
:where(.lanora) .upload.is-dragover {
  --stroke: var(--primary-02);
  background: var(--primary-04);
}
:where(.lanora) .upload input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
:where(.lanora) .upload img {
  width: 32px;
  height: 32px;
}
:where(.lanora) .upload p {
  font-size: 13px;
  line-height: 18px;
  text-align: center;
  color: var(--text-secondary);
}
:where(.lanora) .modal__line {
  display: block;
  width: 580px;
  height: 1px;
  margin-bottom: -1px;
}
:where(.lanora) .modal__submit {
  width: 100%;
}

/* Ô ghi chú của mỗi nhu cầu chỉ hiện khi đã chọn (đồng bộ PC + mobile) */
:where(.lanora) .need:not(.has-value) .need__note {
  display: none;
}

/* Phần tử chỉ có ở bản mobile */
:where(.lanora) .needs-confirm,
:where(.lanora) .summary-backdrop,
:where(.lanora) .summary__count,
:where(.lanora) .summary__close,
:where(.lanora) .upload__text-m {
  display: none;
}

/* =========================================================
   MOBILE – Figma 555:14608 "Dịch vụ" (393px)
   ========================================================= */
@media (max-width: 767px) {
  :where(.lanora) .page-hero--service .page-hero__content {
    width: auto;
  }

  /* ---------- Main (555:14610) ---------- */
  :where(.lanora) .service {
    display: block;
    min-height: 0;
    padding: 32px 16px 48px;
  }
  :where(.lanora) .service__bg > div {
    width: 100%;
  }
  :where(.lanora) .service__bg img {
    object-position: 65% center;
  }
  :where(.lanora) .service__bg .pblur {
    display: none;
  }
  :where(.lanora) .service__bg > div::after {
    background: linear-gradient(257.57deg, rgba(255, 255, 255, 0.1) 0%, rgba(144, 106, 64, 0.1) 65.617%);
  }

  /* Khối chọn nhu cầu (557:16232) */
  :where(.lanora) .needs {
    width: auto;
  }
  :where(.lanora) .needs__head {
    padding: 16px 16px 12px;
    font-size: 16px;
    line-height: 24px;
  }
  :where(.lanora) .needs__body {
    gap: 16px;
    padding: 16px;
  }
  :where(.lanora) .needs__line {
    width: 100%;
  }
  :where(.lanora) .need {
    gap: 12px;
    scroll-margin-top: 80px;
  }
  :where(.lanora) .need__toggle {
    position: relative;
    width: 100%;
  }
  :where(.lanora) .need__titles {
    flex: 1 0 0;
    min-width: 1px;
    white-space: normal;
  }
  :where(.lanora) .need__titles .h5 {
    font-size: 18px;
    line-height: 26px;
  }
  :where(.lanora) .need__desc {
    font-size: 13px;
    line-height: 18px;
  }
  :where(.lanora) .need__toggle img {
    position: absolute;
    top: 1px;
    right: 0;
  }
  :where(.lanora) .need__content {
    gap: 8px;
  }
  /* Hàng lựa chọn kéo ngang tới mép khung */
  :where(.lanora) .option-grid,
  :where(.lanora) .tag-list {
    flex-wrap: nowrap;
    width: auto;
    margin: 0 -16px;
    padding: 0 16px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  :where(.lanora) .option-grid::-webkit-scrollbar,
  :where(.lanora) .tag-list::-webkit-scrollbar {
    display: none;
  }
  :where(.lanora) .option-card,
  :where(.lanora) .option-card:nth-child(3n) {
    flex: none;
    width: 200px;
    height: 66px; /* Figma: padding 4/8 + viền 1px tính vào khung */
    padding: 4px 8px 4px 4px;
  }
  :where(.lanora) .option-card__thumb {
    width: 56px;
    height: 56px;
  }
  :where(.lanora) .option-card.is-active .option-card__desc {
    font-size: 12px;
    line-height: 16px;
  }
  :where(.lanora) .choice-tag {
    flex: none;
    padding: 7px 11px;
  }
  :where(.lanora) .need__note {
    padding: 12px 16px;
    font-size: 13px;
    line-height: 18px;
  }
  :where(.lanora) #need-stems .need__note > img { content: url("../assets/images/note-m-1.png"); }
  :where(.lanora) #need-purpose .need__note > img { content: url("../assets/images/note-m-2.png"); }
  :where(.lanora) #need-time .need__note > img { content: url("../assets/images/note-m-3.png"); }
  :where(.lanora) #need-budget .need__note > img { content: url("../assets/images/note-m-4.png"); }

  /* Nút dính "XÁC NHẬN LỰA CHỌN · n/6" (561:17761) */
  :where(.lanora) .needs-confirm {
    position: sticky;
    bottom: 8px;
    z-index: 20;
    width: 100%;
    height: 48px;
    margin-top: 24px;
    padding: 0 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 999px;
    background-image: var(--gradient-01);
    box-shadow: 0 8px 12px rgba(214, 200, 191, 0.1);
    font-weight: 600;
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
    color: var(--white);
  }
  :where(.lanora) .service.has-selection .needs-confirm {
    display: block;
  }
  /* Figma 574:6844: khi nằm yên cuối danh sách nút rộng 369px (x=12); khi dính đáy 361px */
  :where(.lanora) .needs-confirm.is-rest {
    width: calc(100% + 8px);
    margin-left: -4px;
  }
  :where(.lanora) .needs-confirm__dot {
    color: var(--primary-03);
  }

  /* ---------- Tấm "Xác nhận yêu cầu" (561:18230 / 561:19157) ---------- */
  :where(.lanora) .summary-backdrop {
    position: fixed;
    inset: 0;
    z-index: 140;
    display: block;
    background: #000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0s 0.3s;
  }
  :where(.lanora) .service.is-summary-open .summary-backdrop {
    opacity: 0.4;
    visibility: visible;
    transition: opacity 0.3s;
  }
  :where(.lanora) .summary {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 141;
    display: flex;
    flex-direction: column;
    width: auto;
    max-height: calc(100% - 64px);
    border-radius: 12px 12px 0 0;
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s 0.3s;
  }
  :where(.lanora) .service.is-summary-open .summary {
    transform: none;
    visibility: visible;
    transition: transform 0.3s ease;
  }
  :where(.lanora) .summary::after {
    display: none;
  }
  :where(.lanora) .summary__head {
    flex: none;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 16px 12px;
    background: linear-gradient(to right, #f4ebe5, #fff);
    font-size: 16px;
    line-height: 24px;
    color: var(--secondary-02);
  }
  :where(.lanora) .summary__head p {
    flex: 1 0 0;
    min-width: 1px;
  }
  :where(.lanora) .summary__count {
    display: inline;
  }
  :where(.lanora) .summary__dot {
    color: var(--border-strong);
  }
  :where(.lanora) .summary__count b {
    font-weight: 500;
  }
  :where(.lanora) .summary__close {
    display: block;
    width: 24px;
    height: 24px;
  }
  :where(.lanora) .summary__close img {
    width: 24px;
    height: 24px;
  }
  :where(.lanora) .summary__body {
    flex: 1 1 auto;
    min-height: 0;
    gap: 0;
    padding: 0;
  }
  :where(.lanora) .summary__list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 16px 16px;
  }
  :where(.lanora) .summary__line {
    display: none;
  }
  :where(.lanora) .summary__confirm {
    flex: none;
    padding: 15px 16px 12px; /* + viền trên 1px = 16px như Figma */
    border-top: 1px solid var(--border-subtle);
    background: var(--white);
    filter: drop-shadow(4px -4px 20px rgba(27, 27, 27, 0.06));
  }
  :where(.lanora) .summary__submit {
    padding: 11px 20px;
  }

  /* ---------- Popup điền thông tin (567:4564) ---------- */
  :where(.lanora) .modal {
    align-items: flex-start;
    padding-top: 33px; /* Figma đặt form cách đỉnh màn hình 33px */
  }
  :where(.lanora) .modal__dialog {
    width: calc(100% - 32px);
    max-width: 361px;
    max-height: calc(100% - 16px); /* % tính trên phần đã trừ padding-top 33px */
  }
  :where(.lanora) .modal__head {
    justify-content: space-between;
    padding: 16px 16px 12px;
  }
  :where(.lanora) .modal__title {
    flex: none;
    font-size: 16px;
    line-height: 24px;
  }
  :where(.lanora) .modal__body {
    gap: 12px;
    padding: 16px;
  }
  :where(.lanora) .modal__intro {
    font-size: 13px;
    line-height: 18px;
  }
  :where(.lanora) .modal__fields {
    gap: 12px;
  }
  :where(.lanora) .modal__row {
    flex-direction: column;
    gap: 12px;
  }
  :where(.lanora) .field {
    gap: 6px;
  }
  :where(.lanora) .field textarea {
    resize: none;
  }
  :where(.lanora) .modal__fields > .field:last-child {
    gap: 8px; /* ô ảnh */
  }
  :where(.lanora) .upload {
    padding: 12px 16px;
  }
  :where(.lanora) .upload__text-d {
    display: none;
  }
  :where(.lanora) .upload__text-m {
    display: inline;
  }
  :where(.lanora) .modal__line {
    width: 100%;
  }
  :where(.lanora) .modal__submit {
    padding: 11px 20px;
  }
  html.sheet-open {
    overflow: hidden;
  }
}

/* Màn rộng hơn 1440px: nền sticky tràn hết chiều ngang */
@media (min-width: 1441px) {
  :where(.lanora) .service__bg {
    left: calc(-1 * var(--bleed));
    right: calc(-1 * var(--bleed));
  }
  :where(.lanora) .service__bg > div {
    width: 100%;
  }
}
