.tch-ms-fab,
.tch-ms-overlay {
  display: none;
}

@media (max-width: 960px) {
  .tch-ms-fab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    z-index: 1000000;
    left: 16px;
    right: auto;
    /* Match the AddToAny plus: kit is 58px tall with a 42px icon, so 8px off the bottom. */
    bottom: 8px;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #0166ff;
    color: #fff;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.25);
    cursor: pointer;
    transform: none;
  }

  body .a2a_kit.a2a_floating_style.a2a_default_style {
    left: auto !important;
    right: 16px !important;
    transform: none !important;
  }

  body .a2a_kit.a2a_floating_style.a2a_default_style::before {
    display: none !important;
  }

  .wp-dark-mode-floating-switch {
    left: 50% !important;
    right: auto !important;
    bottom: 12px !important;
    transform: translateX(-50%) !important;
  }

  .tch-ms-fab:focus-visible {
    outline: 2px solid #0f172a;
    outline-offset: 3px;
  }

  .tch-ms-overlay {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    position: fixed;
    inset: 0;
    z-index: 1000001;
    padding: 16px 12px 24px;
    background: rgba(15, 23, 42, 0.58);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.18s ease, visibility 0.18s ease;
  }

  .tch-ms-overlay.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .tch-ms-panel {
    width: min(520px, 100%);
    margin-top: 12px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
    padding: 12px;
    max-height: calc(100vh - 36px);
    overflow: auto;
  }

  .tch-ms-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
  }

  .tch-ms-head h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #0f172a;
  }

  .tch-ms-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: -6px -6px -6px 0;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f5f9;
    color: #0f172a;
    cursor: pointer;
  }

  .tch-ms-field,
  .tch-ms-field .asl_w_container,
  .tch-ms-field .asl_w,
  .tch-ms-field .probox,
  .tch-ms-field .proinput,
  .tch-ms-field input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .tch-ms-field .asl_w_container {
    position: relative;
  }

  .tch-ms-field .asl_r {
    z-index: 2;
  }

  html.tch-ms-open,
  html.tch-ms-open body {
    overflow: hidden;
  }

  html.tch-ms-open .tch-ms-fab,
  html.tch-ms-open .a2a_kit.a2a_floating_style,
  html.tch-ms-open .wp-dark-mode-floating-switch {
    visibility: hidden;
    pointer-events: none;
  }
}
