/* includes/gift/gift.mobile.css
   Gift Books — mobile (<900px) styling per the delivered design
   (1-Gift books-Mobil-Teslim, July 2026). Dark theme: page #161717, sheet
   #1c1d1d, inputs #272828, accent #CDE7BE, error #e8a09a/#b3564f. Site font
   (Gotham, --m-font) replaces the prototype's Montserrat fallback. */

.m-gift {
  min-height: 100vh;
  background: #161717;
  color: #f2f3f5;
  font-family: "Gotham", "Gotham Fallback", system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}

/* Honeypot — visually gone, still fillable by bots */
.gift-hp {
  position: absolute !important;
  left: -9999px;
  width: 1px; height: 1px;
  overflow: hidden;
}

/* ---- Form screen ---- */
.m-gift__form-screen {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 clamp(18px, 6vw, 26px) 40px;
}
/* Title lives in the shared .m-topbar (about-us pattern) — static-mobile.css. */
.m-gift__intro { margin: 14px 0 0; font-size: 15px; line-height: 1.55; color: #e9ebef; }

.m-gift__fields { margin-top: 24px; display: flex; flex-direction: column; gap: 18px; }
.m-gift__label { display: block; font-size: 13px; font-weight: 500; color: #c7cbd2; margin-bottom: 8px; }
.m-gift__req { color: #CDE7BE; }

.m-gift__input {
  width: 100%;
  height: 54px;
  background: #272828;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  padding: 0 16px;
  font-size: 15px;
  font-family: inherit;
  color: #f2f3f5;
  outline: none;
}
.m-gift__input::placeholder { color: #6d7380; }
.m-gift__input.is-invalid { border-color: #b3564f; }
.m-gift__input.is-edit { border-color: #CDE7BE; }
.m-gift__textarea { height: auto; padding: 14px 16px; line-height: 1.5; resize: none; }

.m-gift__phone { display: flex; gap: 10px; }
.m-gift__dial {
  flex: none;
  height: 54px;
  background: #272828;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 10px;
  padding: 0 12px 0 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #f2f3f5;
  transition: background .2s;
  -webkit-tap-highlight-color: transparent;
}
.m-gift__dial:active { background: #2d2e2e; }
.m-gift__dial.is-invalid { border-color: #b3564f; }
.m-gift__dial.is-edit { border-color: #CDE7BE; }
.m-gift__input--phone { flex: 1; min-width: 0; }

.m-gift__langbtn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 14px 0 16px;
  text-align: left;
  cursor: pointer;
  transition: background .2s;
  -webkit-tap-highlight-color: transparent;
}
.m-gift__langbtn:active { background: #2d2e2e; }
.m-gift__langbtn-label {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  color: #f2f3f5;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.m-gift__langbtn-label.is-placeholder { color: #8b919d; }
.m-gift__langbtn svg { flex: none; }

.m-gift__error { margin: 0; font-size: 13px; font-weight: 600; color: #e8a09a; }

.m-gift__submit {
  height: 54px;
  border: 0;
  border-radius: 10px;
  background: #CDE7BE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  color: #16220f;
  cursor: pointer;
  margin-top: 4px;
  transition: transform .15s ease, background .2s, opacity .25s ease;
  -webkit-tap-highlight-color: transparent;
}
.m-gift__submit:active { transform: scale(.98); }
.m-gift__submit.is-idle { opacity: .5; }
.m-gift__submit.is-busy { opacity: .6; pointer-events: none; }

/* ---- Centered screens (confirm / done / closed) ---- */
.m-gift__center {
  max-width: 560px;
  margin: 0 auto;
  min-height: calc(100vh - 56px);   /* viewport minus the shared topbar */
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 0 clamp(22px, 7vw, 30px);
}
.m-gift [hidden] { display: none !important; }
.m-gift__spacer-a { flex: 1; }
.m-gift__spacer-b { flex: 1.5; }

@keyframes m-gift-pop { 0% { transform: scale(.8); } 55% { transform: scale(1.09); } 100% { transform: scale(1); } }
.m-gift__wa-badge {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: rgba(205, 231, 190, .08);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: m-gift-pop .4s cubic-bezier(.3, 1.4, .6, 1);
}
.m-gift__confirm-title { margin: 26px 0 0; font-size: clamp(22px, 6.4vw, 26px); font-weight: 700; color: #fff; line-height: 1.3; }
.m-gift__confirm-sub { margin: 12px 0 0; font-size: 15px; line-height: 1.6; color: #c7cbd2; max-width: 320px; }
.m-gift__confirm-number { margin-top: 22px; font-size: clamp(24px, 7vw, 30px); font-weight: 700; letter-spacing: .5px; color: #CDE7BE; }

.m-gift__cta {
  border: 0;
  border-radius: 10px;
  background: #CDE7BE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-weight: 700;
  color: #16220f;
  cursor: pointer;
  transition: transform .15s ease, background .2s;
  -webkit-tap-highlight-color: transparent;
}
.m-gift__cta:active { transform: scale(.98); }
.m-gift__cta--confirm { width: 100%; max-width: 320px; height: 54px; font-size: 16px; margin-top: 32px; }
.m-gift__cta--home { min-width: 230px; height: 56px; border-radius: 8px; font-size: 16px; margin-top: 44px; padding: 0 34px; }

.m-gift__ghost {
  width: 100%;
  max-width: 320px;
  height: 54px;
  border: 1.5px solid #3a4048;
  border-radius: 10px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  color: #e9ebef;
  cursor: pointer;
  margin-top: 12px;
  transition: background .2s;
  -webkit-tap-highlight-color: transparent;
}
.m-gift__ghost:active { background: rgba(255, 255, 255, .05); }

.m-gift__done-icon, .m-gift__closed-icon { display: block; animation: m-gift-pop .4s cubic-bezier(.3, 1.4, .6, 1); }
.m-gift__closed-icon { animation: none; }
.m-gift__done-title {
  margin: 34px 0 0;
  font-size: clamp(23px, 6.8vw, 27px);
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
  max-width: 330px;
  text-wrap: balance;
}
.m-gift__done-title--closed { margin-top: 36px; max-width: 250px; }
.m-gift__done-sub { margin: 16px 0 0; font-size: 15.5px; line-height: 1.55; color: #c7cbd2; max-width: 280px; }
.m-gift__done-sub--closed { max-width: 340px; }

/* ---- Backdrop + bottom sheets ---- */
/* Sheets must cover the app chrome (bottom nav z:50, mini player z:60) —
   otherwise the last list rows hide behind the nav bar. */
.m-gift__backdrop {
  position: fixed;
  inset: 0;
  z-index: 118;
  background: rgba(0, 0, 0, .55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  transition: opacity .34s ease;
  opacity: 0;
  pointer-events: none;
}
.m-gift__backdrop.is-open { opacity: 1; pointer-events: auto; }

.m-gift__sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 120;
  height: 86%;
  background: #1c1d1d;
  border-top-left-radius: 26px;
  border-top-right-radius: 26px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 -18px 50px -12px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
  transform: translateY(101%);
  transition: transform .42s cubic-bezier(.32, .72, 0, 1);
}
.m-gift__sheet.is-open { transform: translateY(0); }

.m-gift__sheet-grab {
  flex: none;
  padding: 12px 0 3px;
  display: flex;
  justify-content: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 100%;
  -webkit-tap-highlight-color: transparent;
}
.m-gift__sheet-grab span { width: 40px; height: 4.5px; border-radius: 3px; background: rgba(255, 255, 255, .2); }

.m-gift__sheet-head {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px 16px;
}
.m-gift__sheet-title { font-size: 22px; font-weight: 700; letter-spacing: -.01em; color: #fff; }
.m-gift__sheet-x {
  flex: none;
  width: 32px; height: 32px;
  border: 0;
  border-radius: 50%;
  background: #2b2c2c;
  color: #c7c7c7;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.m-gift__sheet-x:active { background: #343535; }

.m-gift__sheet-searchwrap { flex: none; padding: 0 20px; }
.m-gift__sheet-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #272828;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 12px;
  height: 46px;
  padding: 0 14px;
}
.m-gift__sheet-search svg { flex: none; }
.m-gift__sheet-search input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #f2f3f5;
  font-size: 15px;
  font-family: inherit;
}
.m-gift__sheet-search input::placeholder { color: #6d7380; }

.m-gift__sheet-list {
  flex: 1;
  overflow-y: auto;
  padding: 6px 12px 10px;
  scrollbar-width: none;
}
.m-gift__sheet-list::-webkit-scrollbar { display: none; }
.m-gift__sheet-list--dial { padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px)); }

.m-gift__sheet-row {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 12px 10px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
  text-align: left;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.m-gift__sheet-row:active { background: rgba(255, 255, 255, .05); }
.m-gift__sheet-row.is-sel { background: rgba(205, 231, 190, .09); }
.m-gift__sheet-row--dial { padding: 13px 10px; }
.m-gift__sheet-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.m-gift__sheet-row-name { font-size: 16px; font-weight: 600; line-height: 1.15; color: #f2f3f5; }
.m-gift__sheet-row--dial .m-gift__sheet-row-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m-gift__sheet-row.is-sel .m-gift__sheet-row-name { color: #CDE7BE; }
.m-gift__sheet-row-sub { font-size: 12.5px; color: #9a9a9a; }
.m-gift__sheet-row-code { flex: none; font-size: 15px; font-weight: 600; color: #9a9a9a; }
.m-gift__sheet-row-check { flex: none; }
.m-gift__sheet-empty { padding: 44px 20px; text-align: center; color: #7c7c7c; font-size: 14px; line-height: 1.5; }
.m-gift__sheet-empty b { color: #b7b7b7; font-weight: 600; }

.m-gift__sheet-foot {
  flex: none;
  padding: 12px 20px calc(18px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(255, 255, 255, .06);
}
.m-gift__sheet-warn { text-align: center; font-size: 13px; font-weight: 600; color: #e8a09a; padding-bottom: 10px; }
.m-gift__sheet-done {
  width: 100%;
  height: 52px;
  border: 0;
  border-radius: 10px;
  background: #CDE7BE;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  font-size: 15.5px;
  font-weight: 700;
  color: #16220f;
  cursor: pointer;
  transition: background .2s;
  -webkit-tap-highlight-color: transparent;
}
.m-gift__sheet-done:active { transform: scale(.99); }
