@import url('./rc-buttons.css');

@media (max-width: 767px) {
  .mobile-info-link {
    display: inline; margin: 0; padding: 0; border: 0; background: none;
    color: #fff; font: inherit; text-transform: none; letter-spacing: inherit;
    text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px;
    white-space: nowrap; cursor: pointer;
  }
  .mobile-info-link:hover { color: #fff; }
  .mobile-info-link:focus-visible { outline: 1px solid var(--yellow, #d8b473); outline-offset: 4px; }
  .mobile-engagement__level[role="button"] { cursor: pointer; }
  .mobile-engagement__level[role="button"]:focus { outline: none; }
  .mobile-info-dialog {
    box-sizing: border-box; width: calc(100% - 40px); max-width: 430px;
    max-height: calc(100svh - 64px); margin: auto; padding: 26px;
    border: 1px solid rgba(216,180,115,.26); border-radius: 12px;
    background: #151515; color: #bcbcbc; font: 400 17px/1.5 Bourgeois, Arial, sans-serif;
    letter-spacing: 0; text-transform: none; overflow: hidden;
    box-shadow: 0 24px 80px rgba(0,0,0,.45);
    overscroll-behavior: contain;
  }
  .mobile-info-dialog:not([open]) { display: none; }
  .mobile-info-dialog[open] { display: flex; flex-direction: column; animation: mobile-info-enter 260ms cubic-bezier(.2,.75,.25,1) both; }
  .mobile-info-dialog::backdrop {
    background: rgba(0,0,0,.42);
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
    animation: mobile-info-backdrop-in 220ms ease-out both;
  }
  .mobile-info-dialog[data-closing]::backdrop { animation: mobile-info-backdrop-out 160ms ease-in both; }
  .mobile-info-dialog__header {
    display: flex; align-items: flex-start; gap: 12px; flex: none;
    margin-bottom: 22px; padding-bottom: 20px; border-bottom: 1px solid rgba(216,180,115,.2);
  }
  .mobile-info-dialog h2 {
    flex: 1; margin: 0; padding: 5px 0 0;
    color: #d8b473; font: 500 29px/1.05 Bourgeois, Arial, sans-serif;
    letter-spacing: 0; text-transform: none; text-wrap: balance;
  }
  .mobile-info-dialog:has(.mobile-info-dialog__resources) h2 { color: #fff; }
  .mobile-info-dialog h2:focus { outline: none; }
  .mobile-info-dialog__close {
    display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px;
    margin: -5px -10px -5px 0; padding: 10px; border: 0; border-radius: 50%;
    background: transparent; color: #a5a5a5; cursor: pointer;
  }
  .mobile-info-dialog__close svg { width: 24px; height: 24px; }
  .mobile-info-dialog__close:hover { color: #fff; background: rgba(255,255,255,.05); }
  .mobile-info-dialog :is(button, a, [tabindex="0"]):focus-visible { outline: 1px solid #d8b473; outline-offset: 2px; }
  .mobile-info-dialog__body {
    min-height: 0; overflow-y: auto; overscroll-behavior: contain;
    touch-action: pan-y pinch-zoom;
    scrollbar-width: thin; scrollbar-color: #494338 transparent;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-info-dialog__body:has(+ .mobile-info-dialog__continuation:not([hidden])) {
    --mobile-info-fade-depth: 152px;
    --mobile-info-fade: linear-gradient(to top,
      transparent 44px,
      rgb(0 0 0 / .035) 54px,
      rgb(0 0 0 / .18) 70px,
      rgb(0 0 0 / .52) 94px,
      rgb(0 0 0 / .85) 118px,
      rgb(0 0 0 / .98) 143px,
      #000 var(--mobile-info-fade-depth));
    -webkit-mask-image: var(--mobile-info-fade);
    mask-image: var(--mobile-info-fade);
  }
  .mobile-info-dialog p { margin: 0 0 18px; color: inherit; font: inherit; letter-spacing: 0; text-transform: none; }
  .mobile-info-dialog p:last-child { margin-bottom: 0; }
  .mobile-info-dialog:has(.mobile-info-dialog__body[data-mobile-info="time"]) {
    height: calc(var(--mobile-stable-viewport-height, 100svh) - 64px);
    max-height: calc(var(--mobile-stable-viewport-height, 100svh) - 64px);
  }
  .mobile-info-dialog__body[data-mobile-info="time"] {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    gap: 14px;
    font-size: var(--time-dialog-font-size, 16px);
    line-height: 1.4;
    overflow: hidden;
    touch-action: pinch-zoom;
  }
  .mobile-info-dialog__body[data-mobile-info="time"] p { flex: none; margin-bottom: 0; }
  .mobile-info-dialog__body[data-mobile-info="time"] p:last-child { margin-bottom: 0; }
  .mobile-info-dialog strong { color: #f0eee8; font-weight: 500; }
  .mobile-info-dialog__resources section + section { margin-top: 22px; }
  .mobile-info-dialog__resources h3 {
    margin: 0 0 8px; color: #d8b473; font: inherit; font-size: 20px; font-weight: 500;
    line-height: 1.2; letter-spacing: 0; text-transform: none;
  }
  .mobile-info-dialog__resources ul { margin: 0; padding-inline-start: 1.1em; list-style: disc; }
  .mobile-info-dialog__resources li + li { margin-top: 8px; }
  .mobile-info-dialog__resources li::marker { color: #d8b473; }
  .mobile-info-dialog__continuation {
    position: absolute; inset: auto 26px 14px;
    display: flex; justify-content: center;
    pointer-events: none;
  }
  .mobile-info-dialog__continuation[hidden] { display: none; }
  .mobile-info-dialog__more {
    min-height: 44px; padding: 0 10px; border: 0; background: transparent;
    column-gap: 4px;
    color: var(--yellow, #d8b473); font-family: inherit; font-size: 16px; font-weight: 500;
    cursor: pointer; pointer-events: auto;
  }
  @keyframes mobile-info-enter { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
  @keyframes mobile-info-backdrop-in { from { opacity: 0; } to { opacity: 1; } }
  @keyframes mobile-info-backdrop-out { from { opacity: 1; } to { opacity: 0; } }
  @media (prefers-reduced-motion: reduce) { .mobile-info-dialog[open], .mobile-info-dialog::backdrop { animation: none; } }
}

@media (max-width: 767px) and (max-height: 600px) {
  .mobile-info-dialog:has(.mobile-info-dialog__body[data-mobile-info="time"]) { padding: 16px; }
  .mobile-info-dialog:has(.mobile-info-dialog__body[data-mobile-info="time"]) .mobile-info-dialog__header { padding-bottom: 10px; margin-bottom: 12px; }
  .mobile-info-dialog__body[data-mobile-info="time"] { gap: 8px; }
}
