.v2-resource-dialog {
  box-sizing: border-box;
  width: min(480px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px 28px;
  border: 1px solid #c5d0e0;
  border-radius: 16px;
  background: #fff;
  color: var(--ink, #162642);
  font-size: var(--body-mobile-size, 16px);
  line-height: var(--body-mobile-line, 28px);
}

.v2-resource-dialog::backdrop { background: #16264260; }
.v2-resource-dialog[data-resource-state="choices"] { width: min(920px, calc(100% - 32px)); }
.v2-resource-dialog [hidden] { display: none; }
.v2-resource-dialog h2 { margin: 0 56px 16px 0; font-size: 26px; line-height: 38px; }
.v2-resource-dialog h3 { margin: 0 0 8px; font-size: var(--body-desktop-size, 17px); line-height: 26px; }
.v2-resource-dialog p { margin: 0; }
.v2-resource-dialog :is(a, button, input, summary):focus-visible { outline: 3px solid #186eac; outline-offset: 2px; }
.v2-resource-dialog button:disabled { cursor: default; }

.v2-resource-dialog .v2-resource-close {
  position: absolute;
  inset: 20px 28px auto auto;
  padding: 0 4px;
  border: 0;
  border-radius: 4px;
  background: none;
  color: var(--muted, #526582);
  font-size: 14px;
  font-weight: 400;
}

.v2-resource-status, .v2-resource-links, .v2-resource-choices, .v2-resource-delivery { margin-block-start: 12px; }
.v2-resource-links:has(> :not([hidden])) { display: flex; flex-wrap: wrap; gap: 8px; }
.v2-resource-links:not(:has(> :not([hidden]))) { display: none; }
.v2-resource-links a, .v2-resource-content a { color: #2444ad; text-decoration: underline; }

.v2-resource-choices {
  display: grid;
  gap: 24px;
  align-items: start;
}

.v2-resource-benefits ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.v2-resource-benefits > p, .v2-resource-compact p {
  color: var(--muted, #526582);
  font-size: 13px;
  font-weight: 400;
  line-height: 20px;
}
.v2-resource-benefits > p { margin-block-start: 8px; }
.v2-resource-tile { display: block; width: 100%; height: auto; }
.v2-resource-compact { display: none; }
.v2-resource-compact--library { display: flex; gap: 12px; align-items: center; padding: 12px; height: 100%; }
.v2-resource-compact--library img { flex: none; }
.v2-resource-benefits [data-sheen] { position: relative; overflow: hidden; border-radius: 16px; }
.v2-resource-benefits [data-sheen="library"] { --v2-resource-sheen: url("/assets/sheen-library.svg"); }
.v2-resource-benefits [data-sheen="ai"] { --v2-resource-sheen: url("/assets/sheen-ai.svg"); }
.v2-resource-benefits [data-sheen="trend"] { --v2-resource-sheen: url("/assets/sheen-trend.svg"); }

@media (prefers-reduced-motion: no-preference) {
  .v2-resource-dialog[open][data-resource-state="choices"] .v2-resource-benefits [data-sheen]::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: var(--v2-resource-sheen) center / 100% 100% no-repeat;
  }
}

.v2-resource-payment { display: grid; justify-items: center; gap: 8px; text-align: center; }
.v2-resource-payment h3 { margin: 0; }
.v2-resource-amount { font-size: var(--title-mobile-size, 28px); line-height: var(--title-mobile-line, 36px); font-weight: 700; }
.v2-resource-payment img { display: block; width: min(208px, 100%); height: auto; }
.v2-resource-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.v2-resource-confirm p { margin-block-end: 8px; }
.v2-resource-dialog .v2-resource-pay { border-color: #2444ad; background: #2444ad; color: #fff; }
.v2-resource-delivery { padding: 12px 15px; border-radius: 14px; background: #ecf1ff; }
.v2-resource-content { white-space: pre-wrap; overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .v2-resource-dialog, .v2-resource-dialog[data-resource-state="choices"] {
    inset: auto 0 0;
    width: 100%;
    margin: 0;
    padding-inline: 20px;
    padding-block-end: max(24px, env(safe-area-inset-bottom));
  }
  .v2-resource-dialog .v2-resource-close { inset-inline-end: 20px; }
  .v2-resource-payment { order: -1; }
  .v2-resource-benefits ul { grid-template-columns: minmax(0, 1fr); }
  .v2-resource-tile { display: none; }
  .v2-resource-compact { display: flex; gap: 12px; align-items: center; min-height: 44px; }
  .v2-resource-compact img { flex: none; }
}
