@layer publishme.v2 {
  .pm-v2 .pm-filter {
    gap: 8px;
    padding: 0;
    border: 0;
  }

  .pm-v2 .pm-filter__item {
    min-width: 104px;
    min-height: 46px;
    padding: 10px 16px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    font-size: 13px;
    font-weight: 750;
  }

  .pm-v2 .pm-filter__item[aria-pressed='true'] {
    color: var(--pm-surface, #ffffff);
    background: var(--pm-ink, #20261f);
  }

  .pm-search-input {
    position: relative;
  }

  .pm-search-input > .pm-input {
    padding-right: 80px;
  }

  .pm-search-input > .pm-button {
    position: absolute;
    right: 4px;
    top: 4px;
  }

  .pm-social-preview {
    display: block;
    overflow: hidden;
    border: 1px solid var(--pm-line, #dfe4d9);
    border-radius: 20px;
    background: var(--pm-surface, #ffffff);
    color: var(--pm-ink, #20261f);
    font: 12px/1.5 var(--pm-font, 'Manrope Variable', 'Manrope', system-ui, sans-serif);
    text-align: left;
  }

  .pm-social-preview__platform,
  .pm-social-preview__author,
  .pm-social-preview__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
  }

  .pm-social-preview--tg .pm-social-preview__platform {
    background: var(--pm-surface-soft, #eef1e9);
  }

  .pm-social-preview__platform {
    padding: 16px;
  }

  .pm-social-preview__avatar {
    display: grid;
    flex: none;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--pm-surface-soft, #eef1e9);
    font-size: 18px;
    font-weight: 700;
  }

  .pm-social-preview__author > span:nth-child(2) {
    flex: 1;
    min-width: 0;
  }

  .pm-social-preview__author strong,
  .pm-social-preview__author small {
    display: block;
    overflow-wrap: anywhere;
  }

  .pm-social-preview__author small {
    color: var(--pm-muted, #656d63);
    font-size: 10px;
  }

  .pm-social-preview__image {
    display: block;
    width: 100%;
    aspect-ratio: 304 / 260;
    object-fit: cover;
  }

  .pm-social-preview__caption {
    display: block;
    padding: 14px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .pm-social-preview--tg .pm-social-preview__caption {
    font-size: 13px;
    line-height: 20px;
  }

  .pm-social-preview__icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    flex: none;
    background: center / contain no-repeat;
  }

  .pm-social-preview__icon--heart {
    background-image: url('./assets/v2/heart.svg');
  }
  .pm-social-preview__icon--comment {
    background-image: url('./assets/v2/comment.svg');
  }
  .pm-social-preview__icon--send {
    background-image: url('./assets/v2/send.svg');
  }
  .pm-social-preview__icon--bookmark {
    background-image: url('./assets/v2/bookmark.svg');
    margin-left: auto;
  }
  .pm-social-preview__icon--more {
    background-image: url('./assets/v2/more.svg');
    width: 16px;
    height: 16px;
  }

  .pm-v2 .pm-social-mark-v2 {
    background-color: transparent;
    background-position: center;
    background-repeat: no-repeat;
    background-size: contain;
    border-radius: 0;
    flex: none;
  }

  .pm-v2 .pm-social-mark-v2.pm-social-mark--vk {
    background-image: url('./assets/v2/vk.svg');
  }

  .pm-v2 .pm-social-mark-v2.pm-social-mark--tg {
    background-image: url('./assets/v2/tg.svg');
  }

  .pm-v2 .pm-social-mark-v2.pm-social-mark--ig {
    background-image: url('./assets/v2/ig.svg');
  }

  .pm-v2 .pm-social-mark-v2.pm-social-mark--th {
    background-image: url('./assets/v2/th.svg');
  }

  .pm-v2 .pm-social-mark-v2.pm-social-mark--max {
    background-image: url('./assets/v2/max.svg');
  }

  .pm-v2 .pm-button--primary,
  .pm-v2 .pm-button--dark,
  .pm-v2 .pm-button--danger {
    border-color: transparent;
  }

  .pm-v2 .pm-button--ghost {
    border-color: transparent;
    color: var(--pm-muted, #656d63);
  }

  .pm-v2 .pm-button--ghost:hover:not(:disabled) {
    color: var(--pm-ink, #20261f);
  }

  .pm-v2 .pm-input {
    min-height: 46px;
    font-size: 14px;
  }

  .pm-v2 .pm-field__label {
    font-size: 13px;
  }

  .pm-v2 .pm-channel-choice {
    border-color: var(--pm-control-border, #879080);
  }

  .pm-v2 .pm-channel-choice--selected {
    border-color: var(--pm-success, #356341);
  }

  .pm-v2 .pm-channel-choice--unavailable {
    border-color: var(--pm-control-border, #879080);
  }

  .pm-calendar {
    box-sizing: border-box;
    padding: 16px;
    width: 328px;
    max-width: 100%;
    background: var(--pm-surface, #ffffff);
    color: var(--pm-ink, #20261f);
    font: 13px/1.5 var(--pm-font, 'Manrope Variable', 'Manrope', system-ui, sans-serif);
    border: 1px solid var(--pm-line, #dfe4d9);
    border-radius: var(--pm-calendar-radius, 16px);
  }

  .pm-calendar__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
  }

  .pm-calendar__month-controls,
  .pm-calendar__arrows {
    display: flex;
    align-items: center;
    gap: 4px;
  }

  .pm-calendar__month-controls {
    min-width: 0;
  }

  .pm-calendar__month-controls .pm-select {
    width: auto;
    min-width: 0;
    min-height: 36px;
    padding: 6px 2px;
    border-color: transparent;
    border-radius: 6px;
    background: transparent;
    font-size: 13px;
    font-weight: 700;
  }

  .pm-calendar__arrows .pm-icon-button {
    width: 32px;
    min-height: 32px;
    padding: 6px;
    border-radius: 8px;
  }

  .pm-calendar__previous .pm-icon {
    transform: rotate(180deg);
  }

  .pm-calendar__grid {
    width: 100%;
    table-layout: fixed;
    border-spacing: 0 4px;
    border-collapse: separate;
  }

  .pm-calendar__grid th {
    height: 24px;
    padding: 0;
    color: var(--pm-muted, #656d63);
    font-size: 11px;
    font-weight: 600;
    text-align: center;
  }

  .pm-calendar__grid td {
    padding: 0;
    text-align: center;
  }

  .pm-calendar__day {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    width: var(--pm-calendar-day-size, 36px);
    height: var(--pm-calendar-day-size, 36px);
    max-width: 100%;
    border: 1px solid transparent;
    border-radius: 9px;
    background: transparent;
    color: inherit;
    font: 600 13px/1 var(--pm-font, 'Manrope Variable', 'Manrope', system-ui, sans-serif);
    cursor: pointer;
  }

  .pm-calendar__day:hover:not(:disabled) {
    background: var(--pm-surface-soft, #eef1e9);
  }

  .pm-calendar__day--outside {
    color: var(--pm-muted, #656d63);
    font-weight: 400;
  }

  .pm-calendar__day[aria-current='date'] {
    border-color: var(--pm-control-border, #879080);
  }

  .pm-calendar__day[aria-current='date']::after {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    margin-top: 24px;
    border-radius: 50%;
    background: currentColor;
  }

  .pm-calendar__day--selected,
  .pm-calendar__day--selected:hover:not(:disabled) {
    background: var(--pm-accent, #dcfa74);
    color: var(--pm-ink, #20261f);
    border-color: var(--pm-success, #356341);
    font-weight: 800;
  }

  .pm-calendar__day:disabled {
    color: var(--pm-disabled-text, #6e7768);
    opacity: 0.58;
    cursor: not-allowed;
    text-decoration: line-through;
    text-decoration-thickness: 1px;
  }

  .pm-calendar__day:focus-visible {
    outline: 3px solid var(--pm-focus, #344a26);
    outline-offset: 1px;
  }

  .pm-calendar__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--pm-line, #dfe4d9);
  }

  .pm-calendar__footer > span {
    color: var(--pm-muted, #656d63);
    font-size: 11px;
  }

  .pm-calendar__footer .pm-button {
    padding: 6px 8px;
    min-height: 32px;
  }

  .pm-calendar__help {
    margin: 8px 0 0;
    color: var(--pm-muted, #656d63);
    font-size: 10px;
    text-align: center;
  }

  .pm-date-picker {
    position: relative;
    min-width: 0;
  }

  .pm-date-picker > .pm-input {
    padding-right: 46px;
  }

  .pm-date-picker__trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 3px;
    right: 3px;
    width: 40px;
    height: calc(100% - 6px);
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--pm-muted, #656d63);
    cursor: pointer;
  }

  .pm-date-picker__trigger:hover:not(:disabled) {
    background: var(--pm-surface-soft, #eef1e9);
    color: var(--pm-ink, #20261f);
  }

  .pm-date-picker__trigger:focus-visible {
    outline: 3px solid var(--pm-focus, #344a26);
    outline-offset: 1px;
  }

  .pm-date-picker__trigger:disabled {
    cursor: not-allowed;
    color: var(--pm-disabled-text, #6e7768);
  }

  .pm-date-picker__popup {
    box-sizing: border-box;
    position: fixed;
    inset: auto;
    margin: 0;
    padding: 0;
    overflow: auto;
    border: 1px solid var(--pm-control-border, #879080);
    border-radius: 16px;
    background: var(--pm-surface, #ffffff);
    color: var(--pm-ink, #20261f);
    font-family: var(--pm-font, 'Manrope Variable', 'Manrope', system-ui, sans-serif);
    box-shadow:
      0 14px 38px -12px #20261f30,
      0 3px 10px #20261f0c;
  }

  .pm-date-picker__popup .pm-calendar {
    width: 100%;
    border: 0;
  }

  @media (max-width: 767px), (pointer: coarse) {
    .pm-v2 .pm-input,
    .pm-v2 .pm-date-picker-native {
      min-height: 48px;
      font-size: 16px;
    }
  }

  @media (forced-colors: active) {
    .pm-v2 .pm-filter__item[aria-pressed='true'] {
      border: 1px solid ButtonText;
      background: Highlight;
      color: HighlightText;
    }

    .pm-v2 .pm-button,
    .pm-calendar,
    .pm-date-picker__popup {
      border: 1px solid ButtonText;
    }

    .pm-calendar__day--selected {
      border-color: Highlight;
      outline: 2px solid Highlight;
      outline-offset: -3px;
    }

    .pm-calendar__day[aria-current='date'] {
      border-color: ButtonText;
    }

    .pm-calendar__day:disabled {
      color: GrayText;
      opacity: 1;
    }
  }
}
