/* R346. Premium prompts and plan cards use the existing dialog and plan data. */

html body dialog.dq-premium-r250[open] {
  --dq346-logo: url("/branding-r312/logo.png");
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  column-gap: 10px;
  box-sizing: border-box;
  width: min(352px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: hidden auto;
  isolation: isolate;
  padding: 15px;
  border-radius: 18px;
  border-color: #d9b973;
  background: linear-gradient(145deg, #16333b, #0b202c 65%, #091a26);
  box-shadow: 0 16px 48px #0008, inset 0 1px #f2da8c29;
  text-align: left;
}

html body dialog.dq-premium-r250[open]::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--dq346-logo) right -10px top -21px / 172px no-repeat;
  opacity: .12;
}

html body dialog.dq-premium-r250 > .dq-premium-close {
  position: absolute;
  z-index: 1;
  top: 4px;
  right: 4px;
  width: 44px;
  height: 44px;
  padding: 0;
  color: #f3dfb8;
  font-size: 25px;
  line-height: 1;
}

html body dialog.dq-premium-r250 > .dq-premium-emblem {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  width: 44px;
  height: 44px;
  margin: 0;
  border: 1px solid #d9b97366;
  border-radius: 10px;
  background: #112b34 var(--dq346-logo) center / contain no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 0;
  box-shadow: 0 2px 7px #04161f99;
}

html body dialog.dq-premium-r250 > .dq-premium-kicker {
  grid-column: 2;
  grid-row: 1;
  margin: 1px 32px 4px 0;
  color: #e8cc91;
  font: 700 9px/1.2 "DQ Sans", system-ui, sans-serif;
  letter-spacing: .1em;
  overflow-wrap: anywhere;
}

html body dialog.dq-premium-r250 > h2 {
  grid-column: 2;
  grid-row: 2;
  margin: 0 29px 0 0;
  color: #fff3d7;
  font-size: clamp(17px, 5vw, 20px);
  line-height: 1.24;
  overflow-wrap: anywhere;
}

html body dialog.dq-premium-r250 > .dq-premium-copy,
html body dialog.dq-premium-r250 > .dq-premium-feature,
html body dialog.dq-premium-r250 > .dq-premium-note,
html body dialog.dq-premium-r250 > .dq-premium-actions {
  grid-column: 1 / -1;
  min-width: 0;
}

html body dialog.dq-premium-r250 > .dq-premium-copy {
  margin: 11px 0 0;
  color: #fff0d9;
  font: 400 13px/1.43 "DQ Sans", system-ui, sans-serif;
  overflow-wrap: anywhere;
}

html body dialog.dq-premium-r250 > .dq-premium-feature {
  justify-self: start;
  box-sizing: border-box;
  max-width: 100%;
  margin: 6px 0 0;
  padding: 3px 7px;
  border-radius: 7px;
  background: #e8c4761c;
  color: #f5d99a;
  font: 600 11px/1.3 "DQ Sans", system-ui, sans-serif;
  overflow-wrap: anywhere;
}

html body dialog.dq-premium-r250 > .dq-premium-note {
  margin: 6px 0 0;
  color: #cedde0;
  font: 400 11.75px/1.42 "DQ Sans", system-ui, sans-serif;
  overflow-wrap: anywhere;
}

html body dialog.dq-premium-r250 > .dq-premium-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 8px;
  margin: 11px 0 0;
}

html body dialog.dq-premium-r250 .dq-premium-actions > button {
  min-width: 0;
  min-height: 44px;
  padding: 7px 8px;
  border-radius: 9px;
  font: 700 12.5px/1.24 "DQ Sans", system-ui, sans-serif;
  white-space: normal;
  overflow-wrap: anywhere;
}

html body dialog.dq-premium-r250 .dq-premium-primary {
  background: linear-gradient(145deg, #f7e5b5, #e2b970);
  color: #142933;
}

html body dialog.dq-premium-r250 button:focus-visible {
  outline: 2px solid #fff2cd;
  outline-offset: 2px;
}

/* Each existing feature and quota occupies one cell in the plan's grid. */

#app .premium-content .premium-plan {
  margin: 9px 0;
  padding: 10px;
  border-radius: 16px;
}

#app .premium-content .premium-plan > .premium-plan-head {
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 0 0 7px;
}

#app .premium-content .premium-plan-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

#app .premium-content .premium-plan-mark > svg {
  width: 19px;
  height: 19px;
}

#app .premium-content .premium-plan-title > small {
  font-size: 8px;
}

#app .premium-content .premium-plan-title > h2 {
  margin: 2px 0 0;
  font-size: clamp(16px, 4.6vw, 19px);
  line-height: 1.17;
}

#app .premium-content .premium-plan-price {
  max-width: none;
  white-space: nowrap;
}

#app .premium-content .premium-plan-price > strong {
  font-size: clamp(12.5px, 4vw, 15.5px);
  line-height: 1.24;
}

#app .premium-content .premium-plan-price > small {
  font-size: 10px;
  line-height: 1.3;
}

#app .premium-content .premium-plan > p {
  margin: 7px 0;
  font-size: 12px;
  line-height: 1.4;
}

#app .premium-content .premium-plan > p.reading-plan-notice {
  padding: 7px 8px;
  font-size: 12px !important;
  line-height: 1.4;
}

#app .premium-content .premium-plan > .dq-premium-plan-rights {
  margin: 7px 0 8px;
  padding: 8px;
  border-radius: 10px;
  background: #faf6eb;
}

#app .premium-content .premium-plan .dq-premium-plan-rights > b {
  margin: 0 0 6px;
  padding: 0 0 5px;
  font-size: 13px;
  line-height: 1.28;
}

#app .premium-content .premium-plan .dq-premium-plan-rights > ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 5px;
  margin: 0;
}

#app .premium-content .premium-plan .dq-premium-plan-rights > ul > li {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 1fr auto;
  align-items: start;
  gap: 4px;
  box-sizing: border-box;
  min-width: 0;
  min-height: 53px;
  margin: 0;
  padding: 5px;
  border: 1px solid #e0d3ad;
  border-radius: 7px;
  background: #fffcf4;
}

#app .premium-content .premium-plan .dq-premium-plan-rights > ul > li > span {
  min-width: 0;
  color: #243d46;
  font: 700 12px/1.25 "DQ Sans", system-ui, sans-serif;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

#app .premium-content .premium-plan .dq-premium-plan-rights > ul > li > small {
  justify-self: start;
  box-sizing: border-box;
  max-width: 100%;
  padding: 2px 4px;
  border-color: #deca96;
  border-radius: 5px;
  background: #f2e5c5;
  color: #674b15;
  font: 600 10px/1.22 "DQ Sans", system-ui, sans-serif;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
}

#app .premium-content .premium-plan > ul {
  gap: 5px;
  margin: 6px 0 8px;
}

#app .premium-content .premium-plan > .gold-cta {
  min-height: 42px;
  margin: 0;
  padding: 7px 9px;
}

#app .premium-content > .premium-valid {
  margin: 7px 0 0;
  padding: 5px 3px;
}

@media (max-width: 310px) {
  #app .premium-content .premium-plan .dq-premium-plan-rights > ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #app .premium-content .premium-plan-price {
    white-space: normal;
  }
}
