/* TrioSoft 16.8.0 — quiet contour + moving highlight for real public-page actions.
   Do not touch FAQ, selects, account popovers, admin or public-profile controls. */
@property --ts-contour-angle {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

:root {
  /* The same low-contrast, neutral edge as the Android secondary CTA. */
  --ts-contour-line: var(--edge-2, rgba(0,0,0,.14));
  --ts-contour-hot: #2485ff;
  --ts-contour-shine: #91d4ff;
  --ts-contour-text: var(--ink, #1d1d1f);
}
html:not([data-theme="light"]) {
  --ts-contour-line: var(--edge-2, rgba(255,255,255,.18));
  --ts-contour-hot: #458fff;
  --ts-contour-shine: #b5e0ff;
  --ts-contour-text: var(--ink, #f5f5f7);
}

/* Scope deliberately stays on action classes; never match plain "button". */
:where(body button,body a,body input[type="submit"],body input[type="button"]):is(
  .button,.primary-button,.secondary-button,.danger-button,
  .premium-buy-button,.premium-offer-button,
  .news-featured-read,.news-primary-button,.triosoft-news-card-arrow,
  .partner-ref-join,.account-button,#supportSubmitButton
):not(:is(
  .faq-question,.ts-select-trigger,.ts-select-option,.ts-profile-trigger,
  .ts-profile-menu-row,.ts-notification-item,.icon-button,.theme-toggle,
  .global-search-trigger,.global-search-item,.help-category,.help-modal-close,
  .review-custom-select-trigger,.review-custom-select-option,
  .app-review-custom-select-trigger,.app-review-custom-select-option,
  .admin-custom-select-trigger,.admin-custom-select-option,
  .header-link,.header-actions .button,.ts-global-notice a
)) {
  position: relative;
  isolation: isolate;
  background: transparent !important;
  background-image: none !important;
  background-color: transparent !important;
  border: 1px solid var(--ts-contour-line) !important;
  color: var(--ts-contour-text) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  transition: color .22s ease, border-color .22s ease, transform .22s ease !important;
}

/* Only label text may use action colors; no blue/red whole-border override. */
:where(body button,body a,body input[type="submit"]):is(
  .primary-button,.premium-buy-button,.premium-offer-button,.news-primary-button,
  .news-featured-read,.triosoft-news-card-arrow,.partner-ref-join,
  #supportSubmitButton,.button-primary,.button-success,.account-button.primary
):not(:is(.ts-select-option,.ts-profile-menu-row,.faq-question)) {
  color: var(--ts-contour-hot) !important;
}
:where(body button,body a):is(.danger-button,.button-danger,.account-button.danger) {
  color: #e47884 !important;
}

/* Visible traveling arc. The prior gradient was overridden by the site-wide
   button pseudo-element background:none!important, so its animation ran invisibly.
   Keep ONLY the pseudo-element above those rules, never the neutral real border. */
:where(body button,body a):is(
  .button,.primary-button,.secondary-button,.danger-button,
  .premium-buy-button,.premium-offer-button,.news-featured-read,
  .news-primary-button,.triosoft-news-card-arrow,.partner-ref-join,
  .account-button,#supportSubmitButton
):not(:is(
  .faq-question,.ts-select-trigger,.ts-select-option,.ts-profile-trigger,
  .ts-profile-menu-row,.ts-notification-item,.icon-button,.theme-toggle,
  .global-search-trigger,.global-search-item,.help-category,.help-modal-close,
  .header-link,.header-actions .button,.ts-global-notice a
))::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
  padding: 2px;
  opacity: 0;
  background: conic-gradient(from var(--ts-contour-angle),
    transparent 0deg,
    transparent 294deg,
    rgba(69,143,255,.10) 306deg,
    var(--ts-contour-hot) 322deg,
    var(--ts-contour-shine) 336deg,
    var(--ts-contour-hot) 350deg,
    transparent 360deg
  ) !important;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  transition: opacity .18s ease;
}
@keyframes ts-contour-trace { to { --ts-contour-angle: 360deg; } }
@media (hover: hover) {
  :where(body button,body a,body input[type="submit"]):is(
    .button,.primary-button,.secondary-button,.danger-button,
    .premium-buy-button,.premium-offer-button,.news-featured-read,
    .news-primary-button,.triosoft-news-card-arrow,.partner-ref-join,
    .account-button,#supportSubmitButton
  ):not(:is(
    .faq-question,.ts-select-trigger,.ts-select-option,.ts-profile-trigger,
    .ts-profile-menu-row,.ts-notification-item,.icon-button,.theme-toggle,
    .global-search-trigger,.global-search-item,.help-category,.help-modal-close,
    .header-link,.header-actions .button,.ts-global-notice a
  )):not(:disabled):not([aria-disabled="true"]):hover {
    border-color: var(--ts-contour-line) !important;
    background: transparent !important;
    background-image: none !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }
  :where(body button,body a):is(
    .button,.primary-button,.secondary-button,.danger-button,
    .premium-buy-button,.premium-offer-button,.news-featured-read,
    .news-primary-button,.triosoft-news-card-arrow,.partner-ref-join,
    .account-button,#supportSubmitButton
  ):not(:is(
    .faq-question,.ts-select-trigger,.ts-select-option,.ts-profile-trigger,
    .ts-profile-menu-row,.ts-notification-item,.icon-button,.theme-toggle,
    .global-search-trigger,.global-search-item,.help-category,.help-modal-close,
    .header-link,.header-actions .button,.ts-global-notice a
  )):not(:disabled):not([aria-disabled="true"]):hover::before {
    opacity: 1;
    animation: ts-contour-trace 2.2s linear infinite;
    filter: drop-shadow(0 0 2px var(--ts-contour-hot));
  }
}
:where(body button,body a,body input[type="submit"]):is(
  .button,.primary-button,.secondary-button,.danger-button,
  .premium-buy-button,.premium-offer-button,.news-featured-read,
  .news-primary-button,.triosoft-news-card-arrow,.partner-ref-join,
  .account-button,#supportSubmitButton
):not(:is(
  .faq-question,.ts-select-trigger,.ts-select-option,.ts-profile-trigger,
  .ts-profile-menu-row,.ts-notification-item,.icon-button,.theme-toggle,
  .global-search-trigger,.global-search-item,.help-category,.help-modal-close,
  .header-link,.header-actions .button,.ts-global-notice a
)):focus-visible {
  outline: 2px solid var(--ts-contour-hot) !important;
  outline-offset: 3px !important;
}
@media (prefers-reduced-motion: reduce) {
  :where(body button,body a):is(.button,.primary-button,.secondary-button,
    .danger-button,.premium-buy-button,.premium-offer-button,.news-featured-read,
    .news-primary-button,.triosoft-news-card-arrow,.partner-ref-join,
    .account-button,#supportSubmitButton)::before {
    animation: none !important;
    transition: none !important;
  }
}
