/* ════════════════════════════════════════════════════════════════════
   TruyenChill — bong bóng nổi mobile: [Tải app APK] + [Thêm vào màn
   hình chính]. Chỉ hiện trên mobile (≤768px); desktop ẩn hoàn toàn.
   Nhóm bong bóng: z-index 990 — dưới navbar sticky (1030), dropdown
   Bootstrap (1000+) và modal (1055). Bottom sheet: 1040/1041.
   ════════════════════════════════════════════════════════════════════ */

/* Mặc định ẩn ở mọi kích thước; chỉ bật trong media query mobile. */
.tc-bubbles,
.tc-sheet,
.tc-sheet-backdrop {
  display: none;
}

@media (max-width: 768px) {

  /* ── Nhóm bong bóng ─────────────────────────────────────────────── */
  .tc-bubbles {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    position: fixed;
    right: 12px;
    bottom: calc(64px + env(safe-area-inset-bottom, 0px));
    z-index: 990;
  }
  .tc-bubbles.tc-bubbles--off {
    display: none;
  }

  .tc-bubble {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border-radius: 999px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, .35);
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
    -webkit-tap-highlight-color: transparent;
  }
  .tc-bubble:active {
    transform: scale(.97);
  }
  .tc-bubble--apk {
    background: #d81e3c;
    color: #fff;
    font-weight: 700;
  }
  .tc-bubble--apk:hover,
  .tc-bubble--apk:focus {
    color: #fff;
    text-decoration: none;
  }
  .tc-bubble--add {
    background: #ffc61a;
    color: #241300;
    border: 1px solid rgba(255, 255, 255, .35);
    font-weight: 700;
    font-family: inherit;
  }

  /* Nút × nhỏ ở góc trên-trái của nhóm */
  .tc-bubbles-close {
    position: absolute;
    top: -9px;
    left: -9px;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: #555;
    font-size: 15px;
    line-height: 22px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
  }

  /* ── Bottom sheet hướng dẫn ─────────────────────────────────────── */
  .tc-sheet-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(0, 0, 0, .45);
    opacity: 0;
    visibility: hidden;
    transition: opacity .25s ease, visibility .25s ease;
  }
  .tc-sheet {
    display: block;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1041;
    background: #fff;
    color: #212529;
    border-radius: 18px 18px 0 0;
    padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -6px 24px rgba(0, 0, 0, .25);
    transform: translateY(105%);
    visibility: hidden;
    transition: transform .25s ease, visibility .25s ease;
  }
  .tc-sheet-backdrop.tc-sheet--open {
    opacity: 1;
    visibility: visible;
  }
  .tc-sheet.tc-sheet--open {
    transform: translateY(0);
    visibility: visible;
  }
  .tc-sheet-backdrop[hidden],
  .tc-sheet[hidden] {
    display: none;
  }

  .tc-sheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 8px;
  }
  .tc-sheet-title {
    font-size: 16px;
    font-weight: 700;
    margin: 0;
    color: #1a1d2e;
  }
  .tc-sheet-close {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f1f3f5;
    color: #495057;
    font-size: 18px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
  }
  .tc-sheet-steps p {
    font-size: 14px;
    line-height: 1.55;
    margin: 0 0 8px;
  }
  .tc-sheet-steps p:last-child {
    margin-bottom: 0;
  }
  .tc-sheet-install {
    display: block;
    width: 100%;
    margin: 4px 0 12px;
    padding: 11px 16px;
    border: 0;
    border-radius: 10px;
    background: #1a1d2e;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
  }
  .tc-sheet-install[hidden] {
    display: none;
  }
}
