/* Saving group — transfer, settings and shared modal parity. */

:root {
  --sgt-pink: #EC008C;
  --sgt-pink-50: #FFF5FA;
  --sgt-pink-100: #FFE7EE;
  --sgt-tint: #FFB3E6;
  --sgt-pink-200: #FCD2F2;
  --sgt-mint: linear-gradient(153.6deg, #42F2D9 0%, #03BBB1 53.8%, #049B9B 100%);
  --sgt-mint-shadow: inset 0 1px 1px rgba(255, 255, 255, .45), 0 3px 6px rgba(3, 133, 133, .2), 0 10px 22px rgba(3, 133, 133, .2);
  --sgt-n900: #1F1F1F;
  --sgt-n800: #1F1F1F;
  --sgt-n700: #6B6B6B;
  --sgt-n400: #C4C4C4;
  --sgt-n300: #C4C4C4;
  --sgt-n200: #E5E5E5;
  --sgt-n100: #E5E5E5;
  --sgt-n50: #FFF5FA;
  --sgt-disabled: #C4C4C4;
  --sgt-font: 'Noto Sans Thai', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ===== Shared mobile frame ===== */
.sgt-screen {
  box-sizing: border-box;
  width: 100%;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  background: var(--sgt-pink-50);
  font-family: var(--sgt-font);
}

.sgt-shell {
  position: relative;
  width: 100%;
  max-width: 540px;
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  background: #FFF;
  color: var(--sgt-n900);
  font-family: var(--sgt-font);
}

.sgt-status-bar {
  display: none;
}

.sgt-content,
.sgt-settings-content,
.sgt-farewell-page {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.sgt-content {
  background: var(--sgt-pink-100);
}

/* ===== Transfer 288:25096 / 288:25097 ===== */
.sgt-transfer-card {
  position: absolute;
  z-index: 1;
  top: 90px;
  left: 50%;
  box-sizing: border-box;
  width: calc(100% - 32px);
  transform: translateX(-50%);
  padding: 16px 18px 22px;
  border-radius: 24px;
  background: #FFF;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.sgt-wallets {
  position: relative;
  flex: none;
  width: 312px;
  height: 148px;
  display: flex;
  gap: 12px;
}

.sgt-wallet-card {
  box-sizing: border-box;
  flex: none;
  width: 150px;
  height: 148px;
  padding: 18px 0;
  border-radius: 16px;
  background: var(--sgt-pink-50);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-align: center;
  overflow: hidden;
}

.sgt-wallet-avatar {
  position: relative;
  flex: none;
  box-sizing: border-box;
  width: 60px;
  height: 60px;
  border-radius: 999px;
  overflow: hidden;
  background-color: var(--sgt-tint);
}

.sgt-wallet-avatar.is-user {
  border: 2px solid var(--sgt-pink);
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.sgt-wallet-avatar.is-group {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sgt-wallet-avatar.is-group img {
  display: block;
  width: 50px;
  height: 50px;
  object-fit: cover;
}

.sgt-wallet-name {
  display: block;
  box-sizing: border-box;
  width: 100%;
  height: 24px;
  color: var(--sgt-n800);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgt-point {
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--sgt-pink);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  white-space: nowrap;
}

.sgt-point img {
  display: block;
  width: 16px;
  height: 13px;
  object-fit: contain;
  object-position: bottom;
}

.sgt-wallet-arrow {
  position: absolute;
  z-index: 2;
  top: 54px;
  left: 136px;
  box-sizing: border-box;
  width: 40px;
  height: 40px;
  border: 3px solid #FFF;
  border-radius: 999px;
  background: var(--sgt-pink-50);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sgt-wallet-arrow img {
  display: block;
  width: 16px;
  height: 16px;
}

.sgt-form-area {
  flex: none;
  width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.sgt-input-group {
  box-sizing: border-box;
  width: 100%;
  height: 78px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.sgt-input-group label {
  display: block;
  flex: none;
  height: 24px;
  color: var(--sgt-n800);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}

.sgt-input-group input {
  box-sizing: border-box;
  flex: none;
  width: 100%;
  height: 52px;
  padding: 8px 16px;
  border: 1px solid var(--sgt-n200);
  border-radius: 18px;
  background: #FFF;
  color: var(--sgt-n800);
  font-family: var(--sgt-font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-align: center;
  outline: none;
}

.sgt-input-group input::placeholder {
  color: var(--sgt-n300);
  font-weight: 600;
}

.sgt-input-group input:focus {
  border-color: var(--sgt-pink);
}

.sgt-input-group input.is-invalid {
  border-color: #D92D20;
}

.sgt-quick-row {
  box-sizing: border-box;
  height: 38px;
  margin-top: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}

.sgt-quick-row button {
  box-sizing: border-box;
  flex: none;
  height: 38px;
  padding: 7px 16px;
  border: 1px solid var(--sgt-n100);
  border-radius: 999px;
  background: var(--sgt-n50);
  color: var(--sgt-pink);
  font-family: var(--sgt-font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sgt-quick-row button.is-active {
  border-color: var(--sgt-pink);
  background: var(--sgt-pink);
  color: #FFF;
}

.sgt-quick-row button:disabled {
  border-color: var(--sgt-n200);
  background: var(--sgt-n100);
  color: var(--sgt-n300);
  cursor: not-allowed;
}

.sgt-transfer-note {
  width: 100%;
  margin: 12px 0 0;
  color: var(--sgt-n700);
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  text-align: center;
}

.sgt-error {
  width: 100%;
  margin: 4px 0 0;
  color: #D92D20;
  font-size: 12px;
  line-height: 18px;
  text-align: center;
}

.sgt-cta-dock {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 0;
  left: 0;
  box-sizing: border-box;
  height: 94px;
  padding: 12px 16px 0;
  display: flex;
  flex-direction: column;
}

.sgt-cta,
.sgt-settings-cta {
  box-sizing: border-box;
  flex: none;
  width: 100%;
  height: 48px;
  border: 0;
  border-radius: 18px;
  background: var(--sgt-mint);
  box-shadow: var(--sgt-mint-shadow);
  color: #FFF;
  font-family: var(--sgt-font);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sgt-cta:disabled,
.sgt-settings-cta:disabled {
  background: #E5E7EB;
  box-shadow: none;
  color: var(--sgt-n300);
  cursor: not-allowed;
}

.sgt-home-indicator {
  flex: none;
  height: 34px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sgt-home-indicator::after {
  content: '';
  display: block;
  width: 56px;
  height: 5px;
  margin-bottom: 8px;
  border-radius: 999px;
  background: #11141B;
}

/* ===== Settings 288:24487 / 628:31125 / 628:31127 ===== */
.sgt-settings-content {
  display: flex;
  flex-direction: column;
  background: #FFF;
  font-family: var(--sgt-font);
}

.sgt-settings-card {
  box-sizing: border-box;
  flex: none;
  width: calc(100% - 32px);
  max-width: 540px;
  height: 186px;
  margin: 22px auto 0;
  padding: 16px;
  border-radius: 24px;
  background: #FFF;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .1);
}

.sgt-settings-head {
  box-sizing: border-box;
  height: 28px;
  border-bottom: 1px solid var(--sgt-n100);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.sgt-settings-head h2,
.sgt-edit-card h2 {
  margin: 0;
  color: var(--sgt-pink);
  font-size: 16px;
  line-height: 24px;
  font-weight: 700;
}

.sgt-edit-link {
  box-sizing: border-box;
  flex: none;
  height: 24px;
  padding: 0;
  border: 0;
  background: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: #03BBB1;
  font-family: var(--sgt-font);
  font-size: 16px;
  line-height: 24px;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.sgt-edit-link svg {
  display: block;
  width: 16px;
  height: 16px;
}

.sgt-info-row {
  box-sizing: border-box;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
}

.sgt-info-row + .sgt-info-row {
  border-top: 1px solid var(--sgt-n100);
}

.sgt-info-row span,
.sgt-info-row strong {
  min-width: 0;
  font-size: 16px;
  line-height: 24px;
}

.sgt-info-row span {
  flex: none;
  color: var(--sgt-n400);
  font-weight: 400;
}

.sgt-info-row strong {
  overflow: hidden;
  color: var(--sgt-n900);
  font-weight: 500;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sgt-settings-note {
  flex: none;
  margin: auto 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--sgt-n400);
  text-align: center;
}

.sgt-settings-note svg {
  display: block;
  width: 20px;
  height: 20px;
}

.sgt-settings-note p {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}

.sgt-settings-content > .sgt-settings-cta {
  flex: none;
  width: calc(100% - 32px);
  max-width: 540px;
  margin: auto auto 33px;
}

.sgt-settings-content.has-note > .sgt-settings-cta {
  margin-top: 0;
}

/* Edit route keeps the existing update API but uses the same mobile frame. */
.sgt-edit-card {
  height: auto;
  min-height: 230px;
}

.sgt-edit-card h2 {
  margin-bottom: 12px;
}

.sgt-field + .sgt-field {
  margin-top: 12px;
}

.sgt-field label {
  display: block;
  margin: 0 0 8px;
  color: var(--sgt-n800);
  font-size: 16px;
  line-height: 24px;
  font-weight: 400;
}

.sgt-field input {
  box-sizing: border-box;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--sgt-n200);
  border-radius: 18px;
  background: #FFF;
  color: var(--sgt-n900);
  font-family: var(--sgt-font);
  font-size: 16px;
  line-height: 24px;
  outline: none;
}

.sgt-field input:focus {
  border-color: var(--sgt-pink);
}

.sgt-field input.is-invalid {
  border-color: #D92D20;
}

.sgt-field input::placeholder {
  color: var(--sgt-n300);
}

/* ===== Close / farewell 344:41171 ===== */
.sgt-farewell-screen,
.sgt-farewell-shell {
  background: var(--sgt-pink-100);
}

.sgt-farewell-shell {
  position: relative;
  width: 100%;
  max-width: 540px;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--sgt-font);
}

.sgt-farewell-page {
  background: var(--sgt-pink-100);
}

.sgt-farewell-bg {
  position: absolute;
  z-index: 0;
  top: 0;
  left: 50%;
  width: 678px;
  height: 100%;
  min-height: 780px;
  transform: translateX(-50%);
  opacity: .8;
  object-fit: cover;
  pointer-events: none;
}

.sgt-farewell-art {
  position: relative;
  z-index: 1;
  height: 378px;
  overflow: hidden;
}

.sgt-farewell-sparkle {
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.sgt-farewell-sparkle.is-top-right {
  top: 150px;
  left: 268px;
}

.sgt-farewell-sparkle.is-left {
  top: 230px;
  left: 86px;
}

.sgt-farewell-sparkle.is-right {
  top: 245px;
  left: 276px;
}

.sgt-farewell-mascot {
  position: absolute;
  z-index: 3;
  top: 122px;
  left: 50%;
  display: block;
  width: 235px;
  height: 235px;
  transform: translateX(-50%);
  object-fit: cover;
  pointer-events: none;
}

.sgt-farewell-podium {
  position: absolute;
  z-index: 2;
  top: 300px;
  left: 50%;
  display: block;
  width: 190px;
  height: 100px;
  transform: translateX(-50%);
  object-fit: contain;
  pointer-events: none;
}

.sgt-farewell-card {
  box-sizing: border-box;
  width: calc(100% - 30px);
  max-width: 540px;
  height: 165px;
  margin: -0px auto 0;
  padding: 17px 12px;
  border-radius: 24px;
  background: #FFF;
  box-shadow: 0 8px 18px rgba(237, 0, 140, .13);
  text-align: center;
}

.sgt-farewell-card h1 {
  margin: 0 0 4px;
  color: var(--sgt-pink);
  font-size: 22px;
  line-height: 28px;
  font-weight: 700;
}

.sgt-farewell-card p {
  margin: 0;
  color: var(--sgt-n800);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
}

/* ===== Figma Mobile_Modal confirm / success ===== */
.sgc-dialog-overlay {
  position: fixed;
  z-index: 1200;
  inset: 0;
  box-sizing: border-box;
  overflow-y: auto;
  background: rgba(31, 31, 31, .68);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-family: var(--sgt-font);
}

.sgc-dialog-shell {
  position: relative;
  flex: none;
  width: 350px;
  margin-top: 133px;
  margin-bottom: 24px;
  padding-top: 144px;
  box-sizing: border-box;
}

.sgc-dialog-shell.is-success {
  margin-top: 150px;
}

.sgc-dialog-card {
  position: relative;
  box-sizing: border-box;
  width: 350px;
  min-height: 364px;
  padding: 104px 16px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--sgt-n200);
  border-radius: 40px;
  background: var(--sgt-pink-50);
  box-shadow: 0 8px 24px rgba(31, 31, 31, .14), inset 0 0 16px 2px #FFFFFF;
}

.sgc-dialog-shell.is-success .sgc-dialog-card {
  min-height: 364px;
}

.sgc-dialog-card::before {
  content: '';
  position: absolute;
  z-index: 0;
  top: -25px;
  left: 50%;
  width: 324px;
  height: 324px;
  transform: translateX(-50%);
  background: url('/assets/images/saving-group/modal-radial.svg') center / 324px 324px no-repeat;
}

.sgc-dialog-mascot {
  position: absolute;
  z-index: 2;
  top: 13px;
  left: 56px;
  display: block;
  width: 238px;
  height: 238px;
  object-fit: contain;
  pointer-events: none;
}

.sgc-dialog-shell.is-success .sgc-dialog-mascot {
  top: 0;
}

.sgc-dialog-content {
  position: relative;
  z-index: 3;
  box-sizing: border-box;
  flex: 1;
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sgc-dialog-title {
  width: 100%;
  margin: 0;
  color: var(--sgt-pink);
  font-size: 28px;
  line-height: 32px;
  font-weight: 700;
  white-space: nowrap;
}

.sgc-dialog-message {
  width: 100%;
  margin: 4px 0 16px;
  color: var(--sgt-n700);
  font-size: 20px;
  line-height: 26px;
  font-weight: 600;
}

.sgc-dialog-confirm,
.sgc-dialog-cancel {
  box-sizing: border-box;
  flex: none;
  width: 174px;
  height: 48px;
  margin: 0;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  font-family: var(--sgt-font);
  font-size: 18px;
  line-height: 24px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.sgc-dialog-confirm {
  margin-top: auto;
  background: var(--sgt-mint);
  box-shadow: var(--sgt-mint-shadow);
  color: #FFF;
}

.sgc-dialog-shell.is-success .sgc-dialog-confirm {
  margin-top: auto;
}

.sgc-dialog-cancel {
  margin-top: 8px;
  background: transparent;
  color: var(--sgt-n900);
}

.sgc-dialog-confirm:disabled,
.sgc-dialog-cancel:disabled {
  cursor: not-allowed;
  opacity: .65;
}

@media (max-width: 390px) {
  .sgt-transfer-card {
    width: calc(100% - 32px);
  }

  .sgt-wallets,
  .sgt-form-area {
    width: 100%;
  }

  .sgt-wallet-card {
    width: calc((100% - 12px) / 2);
  }

  .sgc-dialog-shell {
    width: calc(100vw - 40px);
  }

  .sgc-dialog-card,
  .sgc-dialog-content {
    width: 100%;
  }

  .sgc-dialog-mascot {
    left: 50%;
    transform: translateX(-50%);
  }
}

.sgt-hint {
  margin: 4px 0 0;
  color: var(--sgt-n700, #6b7280);
  font-size: 12px;
  line-height: 18px;
}
