/* Order success screen layout */
#screen-success {
  align-items: center;
  justify-content: center;
  padding: 18px 0;
  overflow: hidden;
  background: var(--md-surface-1) !important;
}

#screen-success .success-scroll {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 0 18px;
  background: var(--md-surface-1) !important;
}

#screen-success .success-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 420px);
  max-width: 420px;
  margin: 0 auto;
  padding: 28px 20px 24px;
  gap: 16px;
  box-sizing: border-box;
  text-align: center;
  border: 1px solid rgba(234, 88, 12, 0.12);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(255, 253, 251, 0.96), rgba(255, 248, 244, 0.9));
  box-shadow: 0 24px 56px rgba(16, 24, 40, 0.1), 0 8px 24px rgba(234, 88, 12, 0.08);
  overflow: hidden;
}

#screen-success .success-container::before {
  content: "";
  position: absolute;
  top: 0;
  right: 18px;
  left: 18px;
  height: 4px;
  border-radius: 0 0 12px 12px;
  background: linear-gradient(90deg, var(--md-primary), rgba(255, 107, 0, 0.18));
}

#screen-success .success-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 107, 0, 0.08);
  color: var(--md-primary);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#screen-success .success-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border: 1px solid rgba(255, 107, 0, 0.12);
  border-radius: 50%;
  background: linear-gradient(180deg, #fffaf5 0%, rgba(255, 245, 235, 0.8) 100%);
  box-shadow: 0 16px 32px rgba(234, 88, 12, 0.16);
  animation: success-pop-in 0.5s var(--md-easing-emph);
}

#screen-success .success-icon svg {
  width: 48px;
  height: 48px;
}

@keyframes success-pop-in {
  0% { transform: scale(0); }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); }
}

#screen-success .success-title {
  margin-top: 6px;
  color: #111;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
}

#screen-success .success-body {
  max-width: 310px;
  color: #444;
  font-size: 14px;
  line-height: 1.6;
}

#screen-success .success-summary {
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 107, 0, 0.08);
  border-radius: 18px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

#screen-success .summary-label {
  margin-bottom: 8px;
  color: rgba(17, 24, 39, 0.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#screen-success .order-id-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#screen-success .order-id-chip {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fff8f3;
  color: #111;
  font-weight: 800;
}

#screen-success .copy-id-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  padding: 8px;
  border: 1px solid rgba(255, 107, 0, 0.12);
  border-radius: 10px;
  background: rgba(255, 107, 0, 0.06);
  color: var(--md-primary);
  cursor: pointer;
}

#screen-success .copy-id-btn svg {
  width: 18px;
  height: 18px;
}

#screen-success .pts-banner {
  display: flex;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
  padding: 14px 20px;
  border-radius: var(--md-shape-xl, 20px);
  background: linear-gradient(135deg, rgba(255, 107, 0, 0.09), rgba(255, 107, 0, 0.02));
  box-shadow: 0 8px 20px rgba(255, 122, 26, 0.06);
}

#screen-success .pts-banner-text {
  color: #333;
  font-size: 14px;
  font-weight: 700;
}

#screen-success .pts-banner-text span {
  margin: 0 4px;
}

#screen-success .pts-status {
  max-width: 330px;
  margin: -4px 0 0;
  color: var(--md-primary);
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}

#screen-success .support-card {
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
  border: 1px solid rgba(255, 107, 0, 0.08);
  background: linear-gradient(180deg, rgba(255, 245, 235, 0.96), rgba(255, 255, 255, 0.9));
}

#screen-success .support-card-title {
  margin-bottom: 6px;
}

#screen-success .support-card-body {
  margin-bottom: 10px;
  color: rgba(17, 24, 39, 0.74);
}

#screen-success .support-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

#screen-success .support-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 150px;
  height: 46px;
  box-sizing: border-box;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #25d366, #1fa952);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(37, 211, 102, 0.25);
}

#screen-success .support-actions a svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  flex: 0 0 auto;
}

#screen-success .success-actions {
  display: flex;
  width: 100%;
  gap: 10px;
  margin-top: 6px;
  padding-top: 2px;
}

#screen-success .success-actions .btn-pri,
#screen-success .success-actions .btn-ghost {
  flex: 1;
  min-height: 48px;
  height: 46px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 16px;
}

#screen-success .success-actions .btn-pri {
  background: linear-gradient(135deg, var(--md-primary), #ff7a1a) !important;
  color: #fff !important;
  box-shadow: 0 8px 20px rgba(255, 122, 26, 0.16);
}

#screen-success .success-actions .btn-ghost {
  border: 1px solid rgba(17, 24, 39, 0.08);
  background: rgba(17, 24, 39, 0.04);
}

@media (max-width: 480px) {
  #screen-success .success-container {
    padding-right: 16px;
    padding-left: 16px;
  }

  #screen-success .success-actions {
    flex-direction: column;
  }

  #screen-success .success-actions .btn-pri,
  #screen-success .success-actions .btn-ghost {
    width: 100%;
  }

  #screen-success .support-actions a {
    width: 100%;
  }
}

/* Final success layout: compact, calm, and fully visible above the app frame. */
#screen-success.screen.active {
  align-items: center;
  justify-content: flex-start;
  padding: 10px 0 0;
  background: var(--md-surface-1) !important;
}
#screen-success.screen.active .success-scroll {
  padding: 0 8px 18px;
}
#screen-success.screen.active .success-container {
  width: min(100%, 414px);
  padding: 22px 18px 18px;
  gap: 11px;
  border: 1px solid rgba(120,75,40,.08);
  border-radius: 32px;
  background: var(--md-surface-1) !important;
  box-shadow: 0 18px 40px rgba(44,25,14,.06);
}
#screen-success.screen.active .success-container::before {
  right: 28px;
  left: 28px;
  height: 3px;
  border-radius: 999px;
}
#screen-success.screen.active .success-badge { margin-top: 2px; }
#screen-success.screen.active .success-icon {
  width: 76px;
  height: 76px;
  box-shadow: 0 12px 24px rgba(255, 77, 0, 0.14);
}
#screen-success.screen.active .success-icon svg { width: 40px; height: 40px; }
#screen-success.screen.active .success-title {
  margin-top: 3px;
  font-size: 26px;
  line-height: 1.1;
}
#screen-success.screen.active .success-body { line-height: 1.45; }
#screen-success.screen.active .success-summary {
  margin-top: 3px;
  padding: 13px 14px;
  border: 1px solid rgba(120,75,40,.07);
  border-radius: 24px;
  background: var(--md-surface-2);
  box-shadow: none;
}
#screen-success.screen.active .order-id-chip {
  padding: 11px 12px;
  border-radius: 14px;
  background: var(--md-surface-1);
}
#screen-success.screen.active .copy-id-btn {
  border-radius: 14px;
  background: var(--md-primary-container);
}
#screen-success.screen.active .pts-banner {
  margin-top: 1px;
  padding: 13px 16px;
  border-radius: 22px;
  background: var(--md-primary-container);
  box-shadow: none;
}
#screen-success.screen.active .pts-status { margin: -1px 0 0; line-height: 1.4; }
#screen-success.screen.active .support-card {
  margin-top: 2px !important;
  padding: 16px !important;
  border: 1px solid rgba(120,75,40,.07);
  border-radius: 24px;
  background: var(--md-surface-2);
  box-shadow: none;
}
#screen-success.screen.active .support-actions a {
  min-width: 170px;
  height: 44px;
}
#screen-success.screen.active .success-actions {
  gap: 8px;
  margin-top: 2px;
  padding-top: 0;
}
#screen-success.screen.active .success-actions .btn-pri,
#screen-success.screen.active .success-actions .btn-ghost {
  min-height: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 14px;
}
