/* OKSEVEN v0.3.347: modal width parity with Apple ID (400px) and
   matching close control for Tariffs. No other UI or business logic changed. */
#o7-wallet-dialog.o7-wallet-dialog {
  box-sizing: border-box;
  width: 400px !important;
  max-width: calc(100% - 28px) !important;
}
#o7-wallet-dialog.o7-wallet-dialog .o7-auth__panel {
  box-sizing: border-box;
  width: 100% !important;
  max-width: 100% !important;
}
#o7-reviews-dialog.o7-reviews-dialog {
  box-sizing: border-box;
  width: 400px !important;
  max-width: calc(100% - 28px) !important;
}
#o7-reviews-dialog.o7-reviews-dialog .o7-reviews-panel {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
}
/* Native SVG and sizes from #ipa-login-dialog .ipa-close. */
#o7-wallet-dialog.o7-wallet-dialog .o7-auth__close {
  position: absolute;
  top: 30px;
  right: 34px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 0;
  padding: 0;
  border: 1px solid #deded4;
  border-radius: 11px;
  background: #efeee7;
  color: #656b5e;
  cursor: pointer;
  line-height: 1;
  transition: background .2s, color .2s, border-color .2s;
}
#o7-wallet-dialog.o7-wallet-dialog .o7-auth__close svg {
  display: block;
  width: 21px;
  height: 21px;
  flex: none;
}
/* The account's global button:hover !important overrides both Apple
   and Tariffs buttons identically; on public pages use the Apple fallback. */
#o7-wallet-dialog.o7-wallet-dialog .o7-auth__close:hover {
  background: #e8e4d8;
  color: #b85417;
}
@media (max-width: 480px) {
  #o7-wallet-dialog.o7-wallet-dialog .o7-auth__close {
    top: 22px;
    right: 20px;
  }
}
@media (prefers-reduced-motion: reduce) {
  #o7-wallet-dialog.o7-wallet-dialog .o7-auth__close { transition: none; }
}

/* OKSEVEN v0.3.348: right-hand inset matches dialog content on both
   popups. Only positioning is changed; buttons and functionality intact. */
#o7-reviews-dialog.o7-reviews-dialog .o7-reviews-close {
  right: 34px;
}
@media (max-width: 480px) {
  #o7-reviews-dialog.o7-reviews-dialog .o7-reviews-close {
    right: 20px;
  }
}

/* OKSEVEN 0.3.349 — visual parity with Apple ID for the reviews dialog.
   Keep the existing width, horizontal spacing, close control and behaviors. */
#o7-reviews-dialog.o7-reviews-dialog .o7-reviews-panel {
  padding-top: 31px;
  padding-bottom: 31px;
}
#o7-reviews-dialog.o7-reviews-dialog #o7-reviews-title {
  --o7-font-size: 28px;
  --o7-line-height: 35px;
  margin: 0 48px 18px 0;
  padding-top: 3px;
  font-family: Manrope, Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -.8px;
  font-weight: 700;
  color: #292c25;
}
/* Remove the implicit empty paragraph spacing after “Отправить запись”.
   Real status messages remain visible when JS fills their content. */
#o7-reviews-dialog.o7-reviews-dialog #voice-status:empty {
  display: none;
  margin: 0;
  padding: 0;
}
@media (max-width: 600px) {
  #o7-reviews-dialog.o7-reviews-dialog .o7-reviews-panel {
    padding-top: 26px;
    padding-bottom: 26px;
  }
  #o7-reviews-dialog.o7-reviews-dialog #o7-reviews-title {
    --o7-font-size: 27px;
    --o7-line-height: 34px;
    font-size: 27px;
  }
  /* Account typography enforces a 28px heading even on phones; match it. */
  body.o7-account-ui #o7-reviews-dialog #o7-reviews-title {
    --o7-font-size: 28px;
    --o7-line-height: 35px;
    font-size: 28px;
  }
}
/* Wallet payment CTA matches the existing Apple ID “Продолжить” button.
   Scope this override to the payment button, not tariff buttons or payment JS. */
#o7-wallet-dialog.o7-wallet-dialog .o7-wallet-cta {
  background: #292c25 !important;
  border: 1px solid #292c25 !important;
  border-radius: 12px;
  color: #fffaf3 !important;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.5;
  box-shadow: none !important;
  transition: background-color .2s, color .2s, border-color .2s;
}
#o7-wallet-dialog.o7-wallet-dialog .o7-wallet-cta:hover:not(:disabled) {
  background: #41443b !important;
  color: #ff9b56 !important;
  border-color: #41443b !important;
  box-shadow: none !important;
}
/* Unavailable payment remains disabled, dark rather than the account's pale
   generic style; no misleading active hover on a disabled control. */
#o7-wallet-dialog.o7-wallet-dialog .o7-wallet-cta:disabled {
  background: #292c25 !important;
  color: #fffaf3 !important;
  border-color: #292c25 !important;
  opacity: .72;
  cursor: not-allowed;
}
@media (prefers-reduced-motion: reduce) {
  #o7-wallet-dialog.o7-wallet-dialog .o7-wallet-cta {
    transition: none;
  }
}

/* v0.3.350: Reviews close button: match the Apple ID dialog's top inset.
   Apple ID: 31px desktop, 26px at <=600px; dialog border adds 1px.
   Do not change title, panel paddings, button box, right inset or behavior. */
#o7-reviews-dialog.o7-reviews-dialog .o7-reviews-close {
  top: 31px;
}
@media (max-width: 600px) {
  #o7-reviews-dialog.o7-reviews-dialog .o7-reviews-close {
    top: 26px;
  }
}
