/* Style for settings.mak */

.container {
  padding: 0px;
}
.settings-container {
  margin-top: 10px;
  color: #555;
  min-height: 600px;
}
.settings-tab-container {
  margin-top: 10px;
  display: none;
  background-color: #eee;
  border-radius: 5px;
  border: 1px solid #ddd;
  padding: 10px 30px;
  padding-bottom: 30px;
}
.settings-form {
  margin-top: 20px;
}
.settings-form input {
  margin-bottom: 5px;
  width: 260px;
}
.form-control {
  display: inline;
}
.confirm-btn {
  margin-top: 20px;
}
.forgetpw-btn {
  margin-top: 20px;
  color: #999;
}
.settings-error {
  margin-top: 18px;
  color: red;
  font-size: 13px;
}
.terminate-reason-input {
  width: 500px;
  height: 80px;
  border-radius: 3px;
  border-color: #ccc;
}
label.error {
  display: inline-block;
  margin-left: 13px;
}

/* ============================================================
 * Basic -> Pro upgrade panel
 * ============================================================ */

#settings-upgrade-container h3 {
  color: #d00300;
}
.upgrade-current-plan {
  margin: 16px 0 18px 0;
  font-size: 14px;
}
.upgrade-current-plan strong {
  color: #333;
}
.upgrade-current-price {
  color: #4b5563;
  font-size: 13px;
}
/* Social-proof chip — verifiable: per the pricing strategy doc, Pro
 * is ~61% of active subs. Warm yellow signals "popular / chosen." */
.upgrade-social-proof {
  display: inline-block;
  margin: 0 0 18px 0;
  padding: 4px 12px;
  background: #fef6e6;
  color: #b85f00;
  border: 1px solid #f3d99f;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 500;
}
.upgrade-benefits h4 {
  margin-top: 4px;
  margin-bottom: 10px;
  font-size: 15px;
  font-weight: 600;
}
.upgrade-benefits-list {
  list-style: none;
  padding-left: 4px;
  margin-bottom: 22px;
}
.upgrade-benefits-list li {
  position: relative;
  padding-left: 26px;
  margin-bottom: 8px;
  line-height: 1.55;
  font-size: 14px;
}
/* CSS-drawn check mark in a green circle — more reliable cross-browser
 * alignment than a ✓ glyph. The two-piece (::before circle + ::after
 * checkmark) approach lets us position the mark precisely. */
.upgrade-benefits-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #2a8a3e;
}
.upgrade-benefits-list li::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 7px;
  width: 8px;
  height: 4px;
  border-left: 1.5px solid #fff;
  border-bottom: 1.5px solid #fff;
  transform: rotate(-45deg);
}

/* Reassurance line below the CTAs — plain text, no box. Functions as
 * fine print that the hesitant user scans down to find. */
.upgrade-cta-reassurance {
  margin: 8px 0 6px 0;
  padding: 0;
  background: none;
  border: 0;
  font-size: 12.5px;
  color: #334155;
  line-height: 1.5;
}
.upgrade-cta-reassurance-icon {
  color: #64748b;
  font-weight: 700;
  margin-right: 4px;
}

.upgrade-cta-row {
  margin: 18px 0 12px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: stretch;
}
.upgrade-cta-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* flex: grow + shrink + 280px basis. Two buttons share the row
   * evenly on wide containers, stack on narrow ones. */
  flex: 1 1 280px;
  min-width: 0;
  padding: 16px 20px;
  text-align: left;
  white-space: normal;
  margin: 0;
  border-radius: 6px;
  line-height: 1.4;
}
.upgrade-cta-btn:focus {
  outline: 2px solid rgba(208, 3, 0, 0.4);
}
.upgrade-cta-label {
  display: block;
  font-size: 15px;
  font-weight: 600;
}
.upgrade-cta-price {
  display: block;
  font-size: 13px;
  opacity: 0.92;
  margin-top: 4px;
  font-weight: 500;
}
.upgrade-cta-daily {
  font-size: 11px;
  font-weight: 400;
  opacity: 0.8;
  margin-left: 4px;
}
.upgrade-cta-anchor {
  display: block;
  font-size: 11px;
  margin-top: 6px;
  opacity: 0.9;
  font-style: italic;
}
.upgrade-cta-yearly .upgrade-cta-anchor {
  color: #ffe7a3;
}
.upgrade-cta-monthly .upgrade-cta-anchor {
  color: #888;
}
.upgrade-cta-badge {
  position: absolute;
  top: -10px;
  right: 12px;
  background: #fff3cd;
  color: #856404;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  border: 1px solid #ffeeba;
}
.upgrade-cta-yearly {
  background-color: #b71c1c;
  border-color: #a11616;
  color: #fff;
}
.upgrade-cta-yearly:hover,
.upgrade-cta-yearly:focus,
.upgrade-cta-yearly:active,
.upgrade-cta-yearly:active:hover,
.upgrade-cta-yearly:active:focus,
.upgrade-cta-yearly.active {
  background-color: #a11616;
  border-color: #8b1313;
  color: #fff;
}
.upgrade-cta-monthly {
  background-color: #fff;
  color: #555;
}
.upgrade-cta-monthly:hover,
.upgrade-cta-monthly:focus,
.upgrade-cta-monthly:active,
.upgrade-cta-monthly:active:hover,
.upgrade-cta-monthly:active:focus,
.upgrade-cta-monthly.active {
  background-color: #f5f5f5;
  border-color: #ccc;
  color: #555;
}

/* Help text under CTAs — slightly darker than before for readability. */
.upgrade-help-text {
  margin-top: 16px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.6;
}
.upgrade-help-text-small {
  margin-top: 14px;
  font-size: 12px;
  color: #6b7280;
  line-height: 1.6;
}

/* Basic-yearly reassurance: ensures users mid-yearly-cycle know their
 * unused time isn't lost when they upgrade. */
.upgrade-credit-reassurance {
  margin-top: 18px;
  padding: 10px 14px;
  background: #f3f9f4;
  border-left: 3px solid #2a8a3e;
  font-size: 13px;
  color: #2a6a30;
  line-height: 1.6;
}

.upgrade-error {
  margin-top: 16px;
  color: #b71c1c;
  font-size: 13px;
}

/* Confirmation modal */
.upgrade-modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: 9999;
}
.upgrade-modal-backdrop {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
}
.upgrade-modal-box {
  position: relative;
  max-width: 480px;
  margin: 80px auto;
  background: #fff;
  border-radius: 8px;
  padding: 28px 32px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  color: #333;
}
/* Intro modal: carries the full upgrade panel content. Wider than
 * the confirmation modal so the two CTAs (yearly + monthly) can sit
 * side-by-side instead of stacking. */
.upgrade-intro-modal-box {
  position: relative;
  max-width: 720px;
  margin: 50px auto;
  background: #fff;
  border-radius: 8px;
  padding: 32px 40px 28px 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  color: #333;
}
.upgrade-intro-modal-box h3 {
  margin-top: 0;
  color: #d00300;
}
.upgrade-intro-modal-close {
  position: absolute;
  top: 6px;
  right: 14px;
  background: transparent;
  border: 0;
  font-size: 30px;
  line-height: 1;
  color: #999;
  cursor: pointer;
  padding: 4px 8px;
}
.upgrade-intro-modal-close:hover {
  color: #555;
}
.upgrade-modal-box h3 {
  margin-top: 0;
  margin-bottom: 18px;
  color: #d00300;
  font-size: 18px;
}
.upgrade-modal-table {
  width: 100%;
  margin: 16px 0;
  font-size: 14px;
  border-collapse: collapse;
}
.upgrade-modal-table td {
  padding: 8px 4px;
}
.upgrade-modal-table td:last-child {
  text-align: right;
  color: #333;
}
/* Plan row: gross price */
.upgrade-modal-plan-row td {
  color: #555;
}
.upgrade-modal-plan-row td:last-child {
  font-weight: 500;
}
/* Coupon row: discount carried over from existing coupon */
.upgrade-modal-coupon-row td {
  color: #888;
  font-size: 13px;
  padding-top: 4px;
  padding-bottom: 4px;
}
.upgrade-modal-coupon-row td:last-child {
  font-weight: 400;
  color: #2a8a3e;
}
/* Credit row: deduction, deemphasized */
.upgrade-modal-credit-row td {
  color: #888;
  font-size: 13px;
  padding-top: 4px;
  padding-bottom: 10px;
}
.upgrade-modal-credit-row td:last-child {
  font-weight: 400;
  color: #2a8a3e;  /* green = money back to user */
}
.upgrade-modal-coupon-note {
  margin-top: -8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #2a8a3e;
  text-align: right;
}
/* Total row: today's net charge — visually emphasized */
.upgrade-modal-total-row td {
  border-top: 1px solid #ccc;
  padding-top: 12px;
  padding-bottom: 12px;
  font-size: 16px;
}
.upgrade-modal-total-row td:last-child {
  color: #d00300;
  font-weight: 700;
  font-size: 18px;
}
/* Period row: separated below, two-line cell (plan name above date range) */
.upgrade-modal-period-row td {
  border-top: 1px dashed #eee;
  padding-top: 12px;
  color: #555;
  font-size: 13px;
  vertical-align: top;
}
.upgrade-modal-period-row td:first-child {
  padding-top: 14px;
}
.upgrade-modal-period-plan {
  font-weight: 600;
  color: #333;
  font-size: 14px;
  margin-bottom: 2px;
}
.upgrade-modal-period {
  color: #777;
  font-size: 12px;
}
/* Coupon area inside the confirm-state modal. Collapsed by default to
   stay out of the way of users without a coupon; expands on click to
   reveal the input. Mirrors the disclosure pattern on /subscription_agentic. */
.upgrade-modal-coupon-area {
  margin: 10px 0 4px 0;
  min-height: 26px;
}
.upgrade-modal-coupon-collapsed {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.upgrade-modal-coupon-pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fef3f2;
  color: #b00300;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: 1px solid #f6cdc5;
  /* Nudge up 2px so pill text baseline matches the inline "更改" link. */
  transform: translateY(-2px);
}
.upgrade-modal-coupon-pill:hover {
  background: #fbe7e3;
}
.upgrade-modal-coupon-toggle {
  font-size: 12px;
  color: #666;
  text-decoration: underline;
  cursor: pointer;
}
.upgrade-modal-coupon-toggle:hover {
  color: #333;
}
.upgrade-modal-coupon-expanded {
  margin-top: 4px;
}
.upgrade-modal-coupon-input-wrap {
  display: flex;
  gap: 8px;
  align-items: stretch;
}
.upgrade-modal-coupon-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 7px 10px;
  font-size: 13px;
  border: 1px solid #ccc;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.upgrade-modal-coupon-input:focus {
  outline: none;
  border-color: #888;
}
.upgrade-modal-coupon-apply {
  flex: 0 0 auto;
  padding: 7px 14px;
  font-size: 13px;
}
.upgrade-modal-coupon-feedback {
  font-size: 12px;
  margin-top: 6px;
  min-height: 16px;
}
.upgrade-modal-coupon-feedback--error {
  color: #b00300;
}
.upgrade-modal-coupon-feedback--ok {
  color: #2a8a3e;
}
.upgrade-modal-change-card {
  color: #d00300;
  text-decoration: underline;
}
.upgrade-modal-change-card:hover {
  color: #a00300;
}
.upgrade-modal-note {
  font-size: 12px;
  color: #888;
  margin: 14px 0 18px 0;
  line-height: 1.6;
}
.upgrade-modal-error {
  background: #fdecea;
  color: #b00300;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 13px;
  margin-bottom: 14px;
}
.upgrade-modal-actions {
  text-align: right;
  margin-top: 18px;
}
.upgrade-modal-actions .btn {
  margin-left: 8px;
}
.upgrade-modal-invoice-link {
  font-size: 14px;
  margin: 12px 0;
}
.upgrade-modal-loading h3 {
  color: #555;
}
.upgrade-modal-loading p {
  color: #888;
  font-size: 13px;
}

