/* Shared close controls: a flat circle and a thin, precisely centered X.
   A single SVG background avoids duplicate icons and font-dependent alignment. */
@layer impact-close-controls {
  html body button:is([aria-label^="Закрыть"], .avito-modal-close, .modal-close, .close-modal, .finance-reactivation-dialog-close, .trk-modal-close, .saby-clear, .order-remove, [aria-label="Удалить расход"], .close-btn[data-close], .search-clear.show) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    flex: 0 0 var(--impact-cross-size, 40px) !important;
    width: var(--impact-cross-size, 40px) !important;
    min-width: var(--impact-cross-size, 40px) !important;
    max-width: var(--impact-cross-size, 40px) !important;
    height: var(--impact-cross-size, 40px) !important;
    min-height: var(--impact-cross-size, 40px) !important;
    max-height: var(--impact-cross-size, 40px) !important;
    padding: 0 !important;
    gap: 0 !important;
    border: 1px solid rgba(235, 112, 137, .55) !important;
    border-radius: 50% !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    clip-path: none !important;
    transform: none !important;
    filter: none !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06) !important;
    background-color: rgba(194, 65, 91, .27) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 5L19 19M19 5L5 19' fill='none' stroke='%23ff8fa3' stroke-width='1.35' stroke-linecap='butt'/%3E%3C/svg%3E") !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
    background-size: var(--impact-cross-icon-size, 24px) var(--impact-cross-icon-size, 24px) !important;
    color: #ff8fa3 !important;
    font-size: 0 !important;
    line-height: 0 !important;
    text-indent: 0 !important;
    text-shadow: none !important;
    cursor: pointer !important;
    transition: background-color .18s ease, border-color .18s ease, box-shadow .18s ease !important;
  }
  html body button:is([aria-label^="Закрыть"], .avito-modal-close, .modal-close, .close-modal, .finance-reactivation-dialog-close, .trk-modal-close, .saby-clear, .order-remove, [aria-label="Удалить расход"], .close-btn[data-close], .search-clear.show)::before,
  html body button:is([aria-label^="Закрыть"], .avito-modal-close, .modal-close, .close-modal, .finance-reactivation-dialog-close, .trk-modal-close, .saby-clear, .order-remove, [aria-label="Удалить расход"], .close-btn[data-close], .search-clear.show)::after,
  html body button:is([aria-label^="Закрыть"], .avito-modal-close, .modal-close, .close-modal, .finance-reactivation-dialog-close, .trk-modal-close, .saby-clear, .order-remove, [aria-label="Удалить расход"], .close-btn[data-close], .search-clear.show) > * {
    content: none !important;
    display: none !important;
  }
  html body button:is([aria-label^="Закрыть"], .avito-modal-close, .modal-close, .close-modal, .finance-reactivation-dialog-close, .trk-modal-close, .saby-clear, .order-remove, [aria-label="Удалить расход"], .close-btn[data-close], .search-clear.show):hover {
    background-color: rgba(194, 65, 91, .37) !important;
    border-color: rgba(255, 143, 163, .82) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 0 10px rgba(235, 112, 137, .26) !important;
  }
  html body button:is([aria-label^="Закрыть"], .avito-modal-close, .modal-close, .close-modal, .finance-reactivation-dialog-close, .trk-modal-close, .saby-clear, .order-remove, [aria-label="Удалить расход"], .close-btn[data-close], .search-clear.show):focus-visible {
    outline: 2px solid rgba(237, 145, 161, .75) !important;
    outline-offset: 3px !important;
  }
  html body button:is(.saby-clear, .order-remove, [aria-label="Удалить расход"], .search-clear.show) {
    --impact-cross-size: 28px;
    --impact-cross-icon-size: 20px;
  }
  @media (prefers-reduced-motion: reduce) {
    html body button:is([aria-label^="Закрыть"], .avito-modal-close, .modal-close, .close-modal, .finance-reactivation-dialog-close, .trk-modal-close, .saby-clear, .order-remove, [aria-label="Удалить расход"], .close-btn[data-close], .search-clear.show) { transition: none !important; }
  }
}
