/* ===========================
   Abbott Survey - Shared Styles
   =========================== */

/* ===========================
   Fonts - BrandonText
   =========================== */

@font-face {
  font-family: "BrandonText";
  src: url("../fonts/BrandonText%20Font/BrandonText-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BrandonText";
  src: url("../fonts/BrandonText%20Font/BrandonText-RegularItalic.ttf") format("truetype");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "BrandonText";
  src: url("../fonts/BrandonText%20Font/BrandonText-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BrandonText";
  src: url("../fonts/BrandonText%20Font/BrandonText-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BrandonText";
  src: url("../fonts/BrandonText%20Font/BrandonText-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BrandonText";
  src: url("../fonts/BrandonText%20Font/BrandonText-Black.otf") format("opentype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "BrandonText";
  src: url("../fonts/BrandonText%20Font/BrandonText-BlackItalic.otf") format("opentype");
  font-weight: 900;
  font-style: italic;
  font-display: swap;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  --greyscale-600: #475569;
  --greyscale-800: #1E293B;
  --white: #ffffff;
  --primary: #4E2A82;
  --bg-primary: #E9D6F8;
  --light: #E4EAF2;
}

.mobile-only {
  display: none;
}

body {
  font-family: "BrandonText", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  background: var(--white);
  color: #333;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

/* ===========================
   Survey Layout
   =========================== */

.survey {
  width: 100%;
  min-height: 100vh;
  background: #EDF2F8;
}

.survey__header {
  position: relative;
  background: linear-gradient(135deg, #48297B 0%, #8F3E9B 80%, #6C5184 100%);
  color: var(--white);
  padding: 46px;
  overflow: hidden;
}

.survey__header::after {
  content: "";
  position: absolute;
  top: -100px;
  right: -60px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: linear-gradient(135deg, #F6BD56 0%, #E6DDA9 50%, #E3E3B8 100%);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  padding: 2px;
  opacity: 0.5;
}

.survey__header::before {
  content: "";
  position: absolute;
  top: -50px;
  right: -10px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  border: 2px solid #E79CBD;
  opacity: 0.5;
}

.survey__header-inner {
  max-width: 820px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.survey__title {
  font-size: 32px;
  font-weight: bold;
  line-height: 38px;
  margin-bottom: 14px;
}

.survey__title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--white);
  margin-top: 10px;
  border-radius: 2px;
}

.survey__desc {
  font-size: 18px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--white);
}

.survey__body {
  max-width: 760px;
  margin: 40px auto 0;
  padding: 0 0 140px;
  position: relative;
  z-index: 2;
}

/* ===========================
   Privacy notice
   =========================== */

.notice {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--white);
  color: var(--greyscale-800);
  border-radius: 8px;
  padding: 24px 28px;
  font-size: 16px;
  font-weight: bold;
  margin-bottom: 16px;
}

.notice__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ===========================
   Question Card
   =========================== */

.q-card {
  background: var(--white);
  border: 1px solid #e6e8ee;
  border-radius: 10px;
  padding: 24px 28px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(20, 20, 50, 0.04);
}

.q-card--error {
  border-color: #e74c3c;
}

.q-card__error {
  display: none;
  margin-top: 12px;
  color: #e74c3c;
  font-size: 13px;
  font-weight: 500;
}

.q-card--error .q-card__error {
  display: block;
}

.q-card__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 18px;
}

.q-card__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--white);
  font-size: 15px;
  font-weight: bold;
}

.q-card__title {
  font-size: 18px;
  font-weight: bold;
  color: var(--greyscale-800);
  line-height: 20px;
}

.q-card__required {
  color: #e74c3c;
  margin-left: 4px;
}

/* ===========================
   Star rating
   =========================== */

.rating {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.rating__stars {
  display: flex;
  gap: 6px;
  margin: 0 auto;
}

.rating__star {
  width: 40px;
  height: 40px;
  display: inline-block;
  background-color: #D5DEEA;
  border: 0;
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, background-color 0.2s ease;
  -webkit-tap-highlight-color: transparent;       /* tắt flash xanh khi tap mobile */
  outline: none;

  -webkit-mask: url("/assets/images/start.svg") center / contain no-repeat;
          mask: url("/assets/images/start.svg") center / contain no-repeat;
}

.rating__star:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 4px;
}

.rating__star--active {
  background-color: #F5B400;
}

.rating__star:hover {
  transform: scale(1.1);
}

.rating__label {
  font-size: 14px;
  font-weight: 500;
  color: #374151;
  flex: 0 0 auto;
}

/* ===========================
   Choice (radio cards)
   =========================== */

.choice-group {
  display: flex;
  gap: 12px;
}

.choice {
  display: inline-flex;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border: 1px solid var(--light);
  border-radius: 10px;
  background: var(--white);

  color: var(--greyscale-800);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;

  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
}

.choice:focus-within {
  border-color: var(--primary);
}

.choice:hover {
  border: 1.5px solid var(--primary);
  background: var(--bg-primary);
}

.choice input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.choice .choice__mark {
  width: 20px;
  height: 20px;
  border-radius: 50%;

  border: 2px solid #cbd5e1;
  background: #ffffff;

  box-sizing: border-box;
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.choice:has(input[type="radio"]:checked) .choice__mark {
  border: 5px solid #4b2485;
  background: #ffffff;
}

.choice input[type="radio"]:hover,
.choice input[type="radio"]:checked:hover,
.choice input[type="radio"]:focus,
.choice input[type="radio"]:focus-visible {
  accent-color: var(--primary);
  outline: none;
}

.choice:has(input[type="radio"]:checked) .choice__label {
  color: var(--primary);
  font-weight: bold;
}

.choice:hover input[type="radio"]:checked + .choice__label {
  color: var(--primary);
  font-weight: bold;
}

.choice:has(input[type="radio"]:checked) {
  border: 1.5px solid var(--primary);
  /* border-color: var(--primary); */
  background: var(--bg-primary);
}

.choice:has(input[type="radio"]:checked):hover {
  border: 1.5px solid var(--primary);
  background: var(--bg-primary);
}

.choice__label {
  /* white-space: nowrap; */
  font-size: 16px;
  font-weight: 500;
}

/* ===========================
   Submit
   =========================== */

.submit {
  display: block;
  width: 386px;
  height: 56px;
  background: linear-gradient(90deg, #48297B 0%, #8F3E9B 100%);
  color: var(--white);
  border: 0;
  border-radius: 8px;
  padding: 0;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  margin: 14px auto 0;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;       /* tắt flash xanh khi tap mobile */
  outline: none;
}

.submit:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.submit-wrap {
  background: var(--white);
  max-width: 760px;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 16px 16px;
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
  margin: auto;
}

.submit-note {
  color: #8595A8;
  font-size: 13px;
  font-weight: 400;
  text-align: center;
  margin: 0 0 14px;
}

.submit__text {
  /* background: linear-gradient(90deg, #D6A956 0%, #F9EDD9 50%, #F4BA72 100%); */
  /* -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent; */
  font-size: 16px;
}

.submit:hover {
  opacity: 0.92;
}

/* ===========================
   Thank You screen
   =========================== */

.thanks {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--white);
}

.thanks__inner {
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.thanks__check {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
}

.thanks__check-icon {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.thanks__check-icon svg {
  width: 37px;
  height: 25px;
  color: var(--white);
}

.thanks__title {
  font-size: 28px;
  font-weight: bold;
  color: var(--greyscale-800);
  line-height: 1.3;
  margin-bottom: 22px;
}

.thanks__divider {
  width: 56px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  margin: 0 auto 22px;
}

.thanks__subtitle {
  font-size: 18px;
  color: var(--greyscale-600);
}

/* ===========================
   Error Pages (404, 500, 502)
   Dùng chung visual với trang thanks:
   card căn giữa, icon tròn lớn, title, divider, subtitle.
   =========================== */

.error-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  background: var(--white);
}

.error-page__inner {
  text-align: center;
  max-width: 480px;
  width: 100%;
}

.error-page__icon {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 28px;
}

.error-page__icon--warning { background: #FFF3E6; }    /* cam nhạt */
.error-page__icon--danger  { background: #FDE8E8; }    /* đỏ nhạt */

.error-page__icon-inner {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-size: 38px;
  font-weight: 900;
  letter-spacing: 1px;
}

.error-page__icon-inner--warning { background: #F29423; }  /* cam đậm */
.error-page__icon-inner--danger  { background: #DC2626; }  /* đỏ đậm */

.error-page__title {
  font-size: 28px;
  font-weight: bold;
  color: var(--greyscale-800);
  line-height: 1.3;
  margin-bottom: 22px;
}

.error-page__divider {
  width: 56px;
  height: 3px;
  background: #f29423;
  border-radius: 2px;
  margin: 0 auto 22px;
}

.error-page__subtitle {
  font-size: 18px;
  color: var(--greyscale-600);
  margin-bottom: 28px;
}

.error-page__cta {
  display: inline-block;
  height: 48px;
  line-height: 48px;
  padding: 0 28px;
  background: linear-gradient(90deg, #48297B 0%, #8F3E9B 100%);
  color: var(--white);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  text-decoration: none;
  transition: opacity 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.error-page__cta:hover { opacity: 0.9; }

.error-page__cta:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
}

.error-page__cta-text {
  font-size: 16px;
  color: var(--white);
}

/* ===========================
   Responsive (Mobile)
   =========================== */

@media (max-width: 640px) {
  .mobile-only {
    display: inline;
  }

  .survey__header {
    padding: 22px 20px;
  }

  .survey__header::after {
    top: -90px;
    right: -90px;
    width: 200px;
    height: 200px;
  }

  .survey__header::before {
    top: -60px;
    right: -60px;
    width: 130px;
    height: 130px;
  }

  .survey__title {
    font-size: 24px;
  }

  .survey__desc {
    font-size: 14px;
  }

  .survey__body {
    margin-top: 20px;
    padding: 0 20px 140px;
  }

  .notice {
    padding: 14px 16px;
    font-size: 14px;
  }

  .q-card {
    padding: 15px 16px;
  }

  .q-card__head {
    gap: 10px;
    margin-bottom: 12px;
  }

  .q-card__num {
    width: 26px;
    height: 26px;
    font-size: 16px;
  }

  .q-card__title {
    font-size: 16px;
  }

  .rating {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "stars stars"
      "left right";
    gap: 6px;
  }

  .rating__stars {
    grid-area: stars;
    justify-content: center;
  }

  .rating__label:first-of-type {
    grid-area: left;
    text-align: left;
  }

  .rating__label:last-of-type {
    grid-area: right;
    text-align: right;
  }

  .rating__star {
    width: 32px;
    height: 32px;
  }

  .choice-group {
    flex-direction: row;
    gap: 8px;
  }

  .choice {
    padding: 13px 14px;
    font-size: 14px;
  }

  .submit {
    width: 100%;
    height: 48px;
    font-size: 15px;
    font-weight: bold;
  }

  .thanks__title {
    font-size: 24px;
    margin-bottom: 18px;
  }

  .thanks__subtitle {
    font-size: 14px;
  }

  .thanks__divider {
    margin-bottom: 18px;
  }

  .thanks__check {
    width: 120px;
    height: 120px;
    margin-bottom: 18px;
  }

  .thanks__check-icon {
    width: 84px;
    height: 84px;
  }

  .thanks__check-icon svg {
    width: 34px;
    height: 23px;
  }

  .error-page__title {
    color: var(--greyscale-800);
    font-size: 24px;
    margin-bottom: 18px;
  }

  .error-page__subtitle {
    font-size: 14px;
    margin-bottom: 22px;
  }

  .error-page__divider {
    margin-bottom: 18px;
  }

  .error-page__icon {
    width: 120px;
    height: 120px;
    margin-bottom: 18px;
  }

  .error-page__icon-inner {
    width: 84px;
    height: 84px;
    font-size: 32px;
  }

  .error-page__cta {
    height: 44px;
    line-height: 44px;
    font-size: 13px;
  }
}
