/* LINKTRUYEN FLOATING COMMENTS MOBILE V2
   Works on top of the redesigned Phase 1 homepage.
   It does NOT restyle the homepage and does NOT modify the floating-comments component.
*/

#lt-floating-comments-shell { display: contents; }
.lt-floating-comments-control { display: none; }

@media (max-width: 768px) {
  .lt-floating-comments-control {
    position: fixed;
    z-index: 10020;
    min-height: 38px;
    border: 1px solid rgba(127, 88, 61, .18);
    border-radius: 999px;
    background: rgba(255, 252, 247, .97);
    color: var(--text-secondary, #65564d);
    box-shadow: 0 8px 24px rgba(66, 43, 28, .15);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    font-family: inherit;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  #lt-floating-comments-close {
    display: inline-flex;
    left: max(18px, env(safe-area-inset-left));
    bottom: calc(82px + env(safe-area-inset-bottom));
    padding: 0 13px 0 9px;
  }

  #lt-floating-comments-restore {
    left: max(18px, env(safe-area-inset-left));
    bottom: calc(82px + env(safe-area-inset-bottom));
    padding: 0 13px;
    color: var(--accent, #c96f32);
  }

  #lt-floating-comments-restore:not([hidden]) { display: inline-flex; }
  #lt-floating-comments-restore[hidden] { display: none !important; }

  .lt-floating-comments-x {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--accent, #c96f32);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 500;
    line-height: 20px;
  }

  #lt-floating-comments-shell.lt-floating-comments-hidden #lt-floating-comments-content {
    display: none !important;
  }
  #lt-floating-comments-shell.lt-floating-comments-hidden #lt-floating-comments-close {
    display: none !important;
  }

  /* Marker added by JS for the original component's own mobile launcher bubble. */
  #lt-floating-comments-content .lt-original-comment-launcher-hidden {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }
}

@media (max-width: 380px) {
  .lt-floating-comments-label { display:none; }
  #lt-floating-comments-close { width:40px; padding:0; }
}
