/* Rose Travel Contact Buttons
   Desktop (≥ 992px): one round toggle stacked on the theme's back-to-top button
   (#backtotop: 40px, right 40px, bottom 40px); the contact buttons fan out above.
   Phones/tablets (< 992px): white bottom bar, call button raised in the middle.
   Stays under Bootstrap modals (1050+) and the mobile menu drawer (10050). */

:root {
  --rtcb-red: #B5232A;
  --rtcb-red-dark: #8b141c;
  --rtcb-ink: #24272C;
  --rtcb-whatsapp: #25D366;
  --rtcb-zalo: #0068FF;
  --rtcb-messenger: linear-gradient(45deg, #0A7CFF 0%, #A033FF 60%, #FF5C87 100%);
  --rtcb-ease: cubic-bezier(.32, .72, 0, 1);
}

.rtcb-zalo-word {
  font: 800 12px/1 "Lexend", Arial, sans-serif;
  letter-spacing: -.2px;
}

/* ── Desktop: one toggle button, contact buttons fan out above it ─────────── */
.rtcb-float {
  position: fixed;
  right: 37px;              /* same centre line as #backtotop: 40px + 20px - 23px */
  bottom: 37px;             /* in #backtotop's spot (bottom 40px, 40px high) … */
  z-index: 1040;
  width: 46px;
  height: 46px;
  transition: transform .45s var(--rtcb-ease);
}
.rtcb-float.has-top {        /* … and right above it (10px gap) once it shows */
  transform: translate3d(0, -53px, 0);
}
.rtcb-list {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  display: flex;
  flex-direction: column;
  gap: 12px;
  visibility: hidden;
  pointer-events: none;
  transition: visibility 0s linear .35s;
}
.rtcb-float.is-open .rtcb-list {
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.rtcb-list .rtcb-btn {
  opacity: 0;
  transform: translate3d(0, 14px, 0) scale(.6);
  transition: opacity .25s ease, transform .4s var(--rtcb-ease), box-shadow .35s var(--rtcb-ease);
}
.rtcb-float.is-open .rtcb-list .rtcb-btn { opacity: 1; transform: none; }
.rtcb-float.is-open .rtcb-list .rtcb-btn:nth-last-child(2) { transition-delay: .04s; }
.rtcb-float.is-open .rtcb-list .rtcb-btn:nth-last-child(3) { transition-delay: .08s; }
.rtcb-float.is-open .rtcb-list .rtcb-btn:nth-last-child(n+4) { transition-delay: .12s; }
.rtcb-float.is-open .rtcb-list .rtcb-btn:focus-visible { transform: translateY(-2px) scale(1.06); transition-delay: 0s; }
@media (hover: hover) {
.rtcb-float.is-open .rtcb-list .rtcb-btn:hover { transform: translateY(-2px) scale(1.06); transition-delay: 0s; }
}

.rtcb-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .18);
  transition: transform .35s var(--rtcb-ease), box-shadow .35s var(--rtcb-ease);
}
.rtcb-btn:focus-visible {
  color: #fff;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .24);
}
@media (hover: hover) {
.rtcb-btn:hover {
  color: #fff;
  transform: translateY(-2px) scale(1.06);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .24);
}
}
.rtcb-btn.rtcb-fab { background: var(--rtcb-red); }
.rtcb-btn.rtcb-call      { background: var(--rtcb-red-dark); }
.rtcb-btn.rtcb-whatsapp  { background: var(--rtcb-whatsapp); }
.rtcb-btn.rtcb-zalo      { background: var(--rtcb-zalo); }
.rtcb-btn.rtcb-messenger { background: var(--rtcb-messenger); }
.rtcb-btn.rtcb-contact   { background: #fff; color: var(--rtcb-red); }
.rtcb-btn.rtcb-contact:focus-visible { color: var(--rtcb-red-dark); }
@media (hover: hover) {
.rtcb-btn.rtcb-contact:hover { color: var(--rtcb-red-dark); }
}

/* Toggle icon: chat bubble ⇄ X. */
.rtcb-fab svg { position: absolute; transition: opacity .2s ease, transform .35s var(--rtcb-ease); }
.rtcb-fab__close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.rtcb-float.is-open .rtcb-fab__chat { opacity: 0; transform: rotate(90deg) scale(.6); }
.rtcb-float.is-open .rtcb-fab__close { opacity: 1; transform: none; }
.rtcb-float.is-open .rtcb-fab::after { animation: none; }
.rtcb-float.is-open .rtcb-fab .rtcb-tip { display: none; }

/* Soft ring on the call button only. */
.rtcb-btn.rtcb-fab::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(181, 35, 42, .45);
  animation: rtcb-ring 2.2s ease-out infinite;
}
@keyframes rtcb-ring {
  0%   { box-shadow: 0 0 0 0 rgba(181, 35, 42, .45); }
  70%  { box-shadow: 0 0 0 14px rgba(181, 35, 42, 0); }
  100% { box-shadow: 0 0 0 0 rgba(181, 35, 42, 0); }
}

/* Label bubble on hover. */
.rtcb-tip {
  position: absolute;
  right: calc(100% + 12px);
  top: 50%;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--rtcb-ink);
  color: #fff;
  font: 600 13px/1.2 "Lexend", Arial, sans-serif;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(6px, -50%, 0);
  transition: opacity .2s ease, transform .3s var(--rtcb-ease);
}
.rtcb-btn:focus-visible .rtcb-tip { opacity: 1; transform: translate3d(0, -50%, 0); }
@media (hover: hover) {
.rtcb-btn:hover .rtcb-tip { opacity: 1; transform: translate3d(0, -50%, 0); }
}

/* ── Phone/tablet bottom bar ────────────────────────────────────────────── */
.rtcb-bar,
.rtcb-spacer { display: none; }

@media (max-width: 991.98px) {
  .rtcb-float { display: none; }

  .rtcb-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1040;
    display: flex;
    align-items: flex-end;
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    background: #fff;
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .1);
  }
  .rtcb-spacer { display: block; height: calc(70px + env(safe-area-inset-bottom)); }
  /* Keep the theme's back-to-top clear of the bar. */
  #backtotop { bottom: calc(80px + env(safe-area-inset-bottom)) !important; }

  .rtcb-bar__item {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 2px 0;
    color: var(--rtcb-ink);
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
  }
  .rtcb-bar__item:active { opacity: .7; }
  .rtcb-bar__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
  }
  .rtcb-bar__icon svg { width: 19px; height: 19px; }
  .rtcb-bar__label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font: 600 11px/1.2 "Lexend", Arial, sans-serif;
  }
  .rtcb-whatsapp  .rtcb-bar__icon { background: var(--rtcb-whatsapp); }
  .rtcb-zalo      .rtcb-bar__icon { background: var(--rtcb-zalo); }
  .rtcb-messenger .rtcb-bar__icon { background: var(--rtcb-messenger); }
  .rtcb-contact   .rtcb-bar__icon { background: #fdf1f1; color: var(--rtcb-red); }
  .rtcb-zalo-word { font-size: 10px; }

  /* Call: raised red circle in the middle. */
  .rtcb-bar__item--main .rtcb-bar__icon {
    width: 54px;
    height: 54px;
    margin-top: -26px;
    background: var(--rtcb-red);
    border: 4px solid #fff;
    box-shadow: 0 6px 16px rgba(181, 35, 42, .35);
    animation: rtcb-ring 2.2s ease-out infinite;
  }
  .rtcb-bar__item--main .rtcb-bar__icon svg { width: 22px; height: 22px; }
  .rtcb-bar__item--main .rtcb-bar__label { color: var(--rtcb-red); font-weight: 700; }
}

@media (prefers-reduced-motion: reduce) {
  .rtcb-btn.rtcb-fab::after,
  .rtcb-bar__item--main .rtcb-bar__icon { animation: none; }
}
@media print {
  .rtcb-float, .rtcb-bar { display: none !important; }
}
