/* Радикс · карточки (M5): шторка «Сохранить карточку» (экран карты и разбор), публичная страница
 * /c/{share_id}, «Публичные ссылки» в кабинете. Макет шторки — «Radix Chart Screen» (выбор формата),
 * карточек — «Radix Share Cards». Классы — без inline-стилей (CSP style-src 'self').
 */

/* --- шторка: формат ---------------------------------------------------------------------------- */
.share-form { display: flex; flex-direction: column; gap: var(--rx-s-4); }
.share-opts { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: var(--rx-s-3); }
.share-opt { display: block; cursor: pointer; }
.share-opt__box { height: 100%; border: 1px solid rgba(242,240,234,.16); border-radius: var(--rx-r-m); padding: var(--rx-s-3); display: flex; flex-direction: column; gap: 10px; }
.share-opt input:checked + .share-opt__box { border-color: var(--rx-gold); background: rgba(232,195,106,.06); }
.share-opt input:focus-visible + .share-opt__box { outline: 2px solid var(--rx-gold); outline-offset: 1px; }
.share-opt__preview { height: 96px; display: flex; align-items: center; justify-content: center; }
.share-opt__frame { border: 1px solid rgba(242,240,234,.3); border-radius: 6px; background: linear-gradient(180deg, var(--rx-bg-0), var(--rx-bg-1)); display: flex; align-items: center; justify-content: center; gap: 6px; overflow: hidden; }
.share-opt__frame--story { width: 40px; height: 72px; flex-direction: column; }
.share-opt__frame--og { width: 112px; height: 58px; flex-direction: row; }
.share-opt__frame .rx-mini { width: 30px; height: 30px; }
.share-opt__frame--og .rx-mini { width: 44px; height: 44px; }
.share-opt__lines { display: flex; flex-direction: column; gap: 3px; align-items: center; }
.share-opt__lines span { display: block; height: 2px; width: 34px; background: rgba(242,240,234,.5); }
.share-opt__lines span:first-child { width: 30px; background: var(--rx-gold); opacity: .8; }
.share-opt__frame--story .share-opt__lines span { width: 24px; }
.share-opt__frame--story .share-opt__lines span:first-child { width: 20px; }
.share-opt__label { font-size: 14px; font-weight: 600; }
.share-opt__size { font-size: 12px; color: var(--rx-text-2); }

/* --- шторка: цвет и фраза ---------------------------------------------------------------------- */
.share-legend { padding: 0; margin: 0 0 var(--rx-s-2); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--rx-text-2); }
.share-variants, .share-phrases { border: 0; margin: 0; padding: 0; min-width: 0; }
/* чипы цвета — .rx-chip дизайн-системы; кружок — цвет фона карточки (share-spec «Варианты») */
.share-swatch { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--rx-line-strong); flex: none; }
.share-swatch--night { background: linear-gradient(180deg, #0B0D17, #141A2E); }
.share-swatch--paper { background: #F6F4EE; }
.share-swatch--gold { background: #E8C36A; }
.share-phrases { display: flex; flex-direction: column; gap: var(--rx-s-2); }
.share-phrase { display: flex; gap: var(--rx-s-3); align-items: flex-start; padding: var(--rx-s-3); border: 1px solid rgba(242,240,234,.12); border-radius: var(--rx-r-m); cursor: pointer; }
.share-phrase:has(input:checked) { border-color: var(--rx-gold); background: rgba(232,195,106,.06); }
.share-phrase__input { margin: 4px 0 0; accent-color: var(--rx-gold); flex: none; }
.share-phrase__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.share-phrase__text { font-family: var(--rx-serif); font-style: italic; font-size: 18px; line-height: 1.3; }
.share-phrase__label { font-size: 12px; color: var(--rx-text-2); }

/* --- шторка: превью, кнопка, статус ------------------------------------------------------------ */
.share-preview { margin: 0; display: flex; flex-direction: column; align-items: center; gap: var(--rx-s-2); }
.share-preview__img { display: block; width: auto; height: auto; max-width: 100%; max-height: 320px; border-radius: 8px; box-shadow: 0 0 0 1px rgba(242,240,234,.12); }
.share-form--og .share-preview__img { max-height: 200px; }
/* встроенный браузер: картинку сохраняют долгим нажатием — во всю ширину шторки */
.share-form--hold .share-preview__img { max-height: none; }
.share-preview__hold { text-align: center; color: var(--rx-gold); }
.share-status { margin: 0; min-height: 1em; text-align: center; color: var(--rx-text-2); }
.share-status:empty { display: none; }

/* --- шторка: публичная ссылка ------------------------------------------------------------------ */
.share-public { margin-top: var(--rx-s-6); padding-top: var(--rx-s-5); border-top: 1px solid var(--rx-line); display: flex; flex-direction: column; gap: var(--rx-s-3); }
.share-public__title { margin: 0; font-size: 16px; font-weight: 600; }
.share-public__body { display: flex; flex-direction: column; gap: var(--rx-s-3); }
.share-public__text { margin: 0; color: var(--rx-text-2); }
.share-public__url { width: 100%; font-size: 14px; }
.share-public__actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--rx-s-2) var(--rx-s-4); }
.share-public__actions form { margin: 0; }
.share-public__off { color: var(--rx-error); }

/* --- публичная страница /c/{share_id} ---------------------------------------------------------- */
.share-page { max-width: 560px; margin: 0 auto; padding: var(--rx-s-8) var(--rx-gutter) var(--rx-s-12); display: flex; flex-direction: column; align-items: center; gap: var(--rx-s-5); text-align: center; }
.share-page--gone { align-items: flex-start; text-align: left; }
.share-page__over { margin: 0; color: var(--rx-blue); }
.share-page__wheel { width: 100%; max-width: 440px; }
.share-page__svg { display: block; width: 100%; height: auto; }
.share-page__triad { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-wrap: wrap; justify-content: center; gap: var(--rx-s-2) var(--rx-s-5); border-top: 1px solid var(--rx-line-strong); border-bottom: 1px solid var(--rx-line-strong); padding: var(--rx-s-4) 0; }
.share-page__sign { display: inline-flex; align-items: center; gap: var(--rx-s-2); font-family: var(--rx-serif); font-size: 22px; font-weight: 600; }
.share-page__glyph { color: var(--rx-gold); }
.share-page__asc { font-style: italic; font-weight: 500; font-size: 18px; }
.share-page__phrase { margin: 0; font-family: var(--rx-serif); font-style: italic; font-size: 26px; line-height: 1.25; }
.share-page__phrase p { margin: 0; }
.share-page__actions { width: 100%; display: flex; flex-direction: column; gap: var(--rx-s-3); }
.share-page__note { margin: 0; color: var(--rx-text-3); }

/* --- кабинет: «Публичные ссылки» --------------------------------------------------------------- */
.share-links__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--rx-s-3); }
.share-links__item { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--rx-s-1) var(--rx-s-4); padding: var(--rx-s-3) 0; border-bottom: 1px solid var(--rx-line); }
.share-links__url { font-weight: 600; word-break: break-all; }
.share-links__meta { font-size: 13px; color: var(--rx-text-2); }
.share-links__actions { display: inline-flex; gap: var(--rx-s-3); margin-left: auto; }
.share-links__actions form { margin: 0; }
.share-links__off { color: var(--rx-error); }
