/* smilo.css: Smilo (linh vật Smile Go Travel) - bóng chat, chuyến bay, vòng viền, lời chào, màn chờ, keyframes. NGUỒN GỐC DUY NHẤT (skill sgt-smilo). Không sửa số đo, màu, thời gian khi chép sang dự án; cần đổi thì hỏi sếp và đổi ở skill.
 * Biến lấy từ trang chủ: --grad (nền nút .fab thường), --paper, --ink, --line (lời chào .fabtip). */
.ldsm { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; min-height: max(240px, calc(100vh - 330px)); padding: 12px 0 24px; }
.ldsm .ldb { width: 112px; height: 112px; }
.ldsm .smbird { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 10px 14px rgba(200, 39, 31, .28)); }
.ldsm .pw { transform-box: view-box; transform-origin: 50px 44px; } .ldsm .pw.far { transform-origin: 46px 42px; }
.ldsm .ldd { display: flex; gap: 9px; }
.ldsm .ldd i { width: 9px; height: 9px; border-radius: 50%; background: #ff3b3b; }
.ldsm .ldd i:nth-child(2) { background: #ff5a3c; } .ldsm .ldd i:nth-child(3) { background: #ff7a3d; } .ldsm .ldd i:nth-child(4) { background: #ff9e3d; } .ldsm .ldd i:nth-child(5) { background: #ffc23d; }
@media (max-width: 760px) { .ldsm { min-height: max(220px, calc(100vh - 300px)); } .ldsm .ldb { width: 96px; height: 96px; } }
.fab { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 30; cursor: pointer; border: 0; border-radius: 50%; width: 54px; height: 54px; padding: 0; display: inline-flex; align-items: center; justify-content: center; text-align: center; font-weight: 700; font-size: 12.5px; line-height: 1.1; color: #fff; background: var(--grad); box-shadow: 0 6px 18px rgba(200, 39, 31, .35); }
.fab:hover { filter: brightness(1.05); }
.fab.smi { width: 68px; height: 68px; background: transparent; box-shadow: none; overflow: visible; }
.fab.smi:hover { filter: none; }
.smilo { overflow: visible; display: block; }
.fab.smi .smilo .sm-base { filter: drop-shadow(0 8px 12px rgba(200, 39, 31, .42)); }
.fab.smi::after { content: ""; position: absolute; inset: 2px; border-radius: 50%; border: 3px solid rgba(255, 122, 61, .55); animation: smRing 2.8s ease-out infinite; pointer-events: none; }
.chatav { flex: 0 0 auto; width: 38px; height: 38px; display: inline-flex; border: 0; padding: 0; background: none; cursor: pointer; border-radius: 50%; color: inherit; } /* logo đầu khung là nút thu nhỏ (7zzp) */
@media (hover: hover) { .chatav:hover .smilo { animation: smHop .6s ease-in-out 1; } }
.chatav.hid { visibility: hidden; }
.smfly { position: fixed; z-index: 34; pointer-events: none; transform-origin: 50% 50%; will-change: transform; }
.smfly .smilo { width: 100%; height: 100%; display: block; filter: drop-shadow(0 10px 14px rgba(200, 39, 31, .35)); }
.smfly .bust, .smfly .bird { position: absolute; inset: 0; transform-origin: 50% 50%; }
.smfly .bird { opacity: 0; }
.smfly .bird .smbird { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(0 10px 14px rgba(200, 39, 31, .35)); }
.smfly .pw { transform-box: view-box; transform-origin: 50px 44px; } .smfly .pw.far { transform-origin: 46px 42px; } /* cánh vẹt xoay quanh vai (tọa độ viewBox), mục 7zzo */
.smfly .sm-float { animation: none; }
.smfly .sm-base, .smfly .sm-ring, .smfly .sm-tag { opacity: 0; } /* đang bay: Smilo đã thoát khỏi vòng tròn, chưa có nhãn AI; khi đậu (class land) mới hiện lại (mục 7zzn) */
.smfly .sm-base, .smfly .sm-ring { transform-box: fill-box; transform-origin: 50% 50%; }
.chatring { position: fixed; z-index: 33; pointer-events: none; box-sizing: border-box; border: 3px solid rgba(255, 122, 61, .85); box-shadow: 0 0 0 1px rgba(255, 194, 61, .35), 0 14px 40px rgba(200, 39, 31, .25); }
.fab.smi.pre { opacity: 0; }
.fabtip { position: fixed; right: 96px; bottom: calc(34px + env(safe-area-inset-bottom, 0px)); z-index: 30; max-width: 220px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; font-size: 13.5px; font-weight: 600; line-height: 1.35; box-shadow: 0 10px 26px rgba(30, 12, 8, .22); opacity: 0; animation: smTip 10s ease both; pointer-events: none; }
.fabtip::after { content: ""; position: absolute; right: -6px; bottom: 14px; width: 11px; height: 11px; background: var(--paper); border-right: 1px solid var(--line); border-top: 1px solid var(--line); transform: rotate(45deg); }
@keyframes smTip { 0%, 4% { opacity: 0; transform: translateY(6px) scale(.96); } 9%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(4px); } }
@keyframes smRing { 0% { transform: scale(1); opacity: .9; } 70%, 100% { transform: scale(1.38); opacity: 0; } }
@keyframes smBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
@keyframes smBlink { 0%, 90%, 100% { transform: scaleY(1); } 94% { transform: scaleY(.1); } }
@keyframes smTalk { 0%, 55%, 100% { transform: rotate(0); } 62% { transform: rotate(5deg); } 70% { transform: rotate(-1deg); } 78% { transform: rotate(4deg); } 86% { transform: rotate(0); } }
@keyframes smWave { 0%, 55%, 100% { transform: rotate(0); } 65% { transform: rotate(-24deg); } 75% { transform: rotate(8deg); } 85% { transform: rotate(-20deg); } 92% { transform: rotate(0); } }
@keyframes smTw { 0%, 100% { transform: scale(.35) rotate(0); opacity: .35; } 50% { transform: scale(1) rotate(20deg); opacity: 1; } }
@keyframes smTag { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes smHop { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-9px) rotate(-5deg); } 55% { transform: translateY(-4px) rotate(5deg); } 80% { transform: translateY(-6px) rotate(-3deg); } }
.smilo .sm-float, .smilo .sm-eye, .smilo .sm-beak, .smilo .sm-wing, .smilo .sm-sp, .smilo .sm-tag { transform-box: fill-box; }
.smilo .sm-float { transform-origin: 50% 100%; animation: smBob 2.6s ease-in-out infinite; }
.smilo .sm-eye { transform-origin: 50% 50%; animation: smBlink 4.2s infinite; }
.smilo .sm-beak { transform-origin: 0% 50%; animation: smTalk 5s ease-in-out infinite; }
.smilo .sm-wing { transform-origin: 85% 90%; animation: smWave 5s ease-in-out infinite; }
.smilo .sm-sp { transform-origin: 50% 50%; animation: smTw 2.4s ease-in-out infinite; }
.smilo .sm-sp2 { animation-delay: .8s; } .smilo .sm-sp3 { animation-delay: 1.6s; }
.smilo .sm-tag { transform-origin: 50% 50%; animation: smTag 2.8s ease-in-out infinite; }
.smilo.still .sm-float, .smilo.still .sm-beak, .smilo.still .sm-wing, .smilo.still .sm-sp, .smilo.still .sm-tag { animation: none; }
@media (hover: hover) { .fab.smi:hover .smilo { animation: smHop .6s ease-in-out 1; } }
@media (prefers-reduced-motion: reduce) { .smilo *, .fab.smi::after, .fabtip { animation: none !important; } .fabtip { opacity: 1; } }
@media (max-width: 760px) { .fab.smi { width: 62px; height: 62px; } .fab.smi .smilo { width: 62px; height: 62px; } .fabtip { right: 84px; } }
@media (prefers-reduced-motion: no-preference) {
  @keyframes aPop { from { opacity: 0; transform: translateY(8px) scale(.96); } to { opacity: 1; transform: none; } }
  /* Smilo bay (mục 7zzn): cánh vỗ mạnh và nhanh, thân nhấp theo nhịp cánh; đậu xuống (class land) thì khép cánh, nhún nhẹ, vòng tròn nền hiện lại quanh người rồi nhãn AI bật ra: thành logo */
  @keyframes smFlapBig { from { transform: rotate(14deg); } to { transform: rotate(-56deg); } }
  .smfly .sm-wing { animation: smFlapBig .17s ease-in-out infinite alternate; }
  @keyframes smBeat { from { transform: translateY(1px); } to { transform: translateY(-3px); } }
  .smfly .smilo { animation: smBeat .17s ease-in-out infinite alternate; }
  /* vẹt bay đủ thân (mục 7zzo): cánh gần quét từ -25 tới 115 độ, cánh xa từ -10 tới 100 độ, 0,13 giây mỗi nhịp lên hoặc xuống; thân nhấp theo nhịp */
  @keyframes pwFlap { from { transform: rotate(-25deg); } to { transform: rotate(115deg); } }
  @keyframes pwFlapFar { from { transform: rotate(-10deg); } to { transform: rotate(100deg); } }
  .smfly .bird .pw { animation: pwFlap .13s ease-in-out infinite alternate; }
  .smfly .bird .pw.far { animation-name: pwFlapFar; animation-delay: -.03s; }
  .smfly .bird .smbird { animation: smBeat .13s ease-in-out infinite alternate; }
  /* màn chờ tải (mục 7zzv): vẹt lượn tại chỗ, cánh vỗ chậm hơn chuyến bay một chút; chấm sáng lên lần lượt như đang chạy ngang */
  @keyframes ldHover { 0% { transform: translate(-7px, 5px) rotate(-5deg); } 50% { transform: translate(0, -7px) rotate(2deg); } 100% { transform: translate(7px, 3px) rotate(-2deg); } }
  .ldsm .ldb { animation: ldHover 1.8s ease-in-out infinite alternate; }
  .ldsm .pw { animation: pwFlap .17s ease-in-out infinite alternate; }
  .ldsm .pw.far { animation-name: pwFlapFar; animation-delay: -.04s; }
  .ldsm .smbird { animation: smBeat .17s ease-in-out infinite alternate; }
  @keyframes ldDot { 0%, 55%, 100% { transform: scale(.65); opacity: .3; } 22% { transform: scale(1.2); opacity: 1; } }
  .ldsm .ldd i { animation: ldDot 1.25s ease-in-out infinite; }
  .ldsm .ldd i:nth-child(2) { animation-delay: .12s; } .ldsm .ldd i:nth-child(3) { animation-delay: .24s; } .ldsm .ldd i:nth-child(4) { animation-delay: .36s; } .ldsm .ldd i:nth-child(5) { animation-delay: .48s; }
  @keyframes smFoldW { from { transform: rotate(-56deg); } 60% { transform: rotate(6deg); } to { transform: rotate(0); } }
  .smfly.land .sm-wing { animation: smFoldW .28s ease-out both; }
  @keyframes smSettle { 0% { transform: translateY(-3px); } 45% { transform: translateY(2px) scaleY(.94); } 100% { transform: none; } }
  .smfly.land .smilo { animation: smSettle .42s cubic-bezier(.2, .8, .2, 1) both; transform-origin: 50% 100%; }
  @keyframes smCircIn { from { opacity: 0; transform: scale(.5); } to { opacity: 1; transform: scale(1); } }
  .smfly.land .sm-base, .smfly.land .sm-ring { animation: smCircIn .32s .1s ease-out both; }
  @keyframes smTagIn { from { opacity: 0; transform: scale(0); } to { opacity: 1; transform: scale(1); } }
  .smfly.land .sm-tag { animation: smTagIn .3s .26s cubic-bezier(.3, 1.5, .5, 1) both; }
  .fab.smi.pop { animation: aPop .32s cubic-bezier(.2, .8, .2, 1) both; }
  /* mỏ Smilo nhép khi đang "nói" (mục 7zzm) */
  @keyframes smTalkFast { from { transform: rotate(0); } to { transform: rotate(8deg); } }
  .fab.smi.talk .sm-beak, .smfly.talk .sm-beak, .chatav.talk .sm-beak { animation: smTalkFast .14s ease-in-out infinite alternate; }
  .smilo .sm-look { transform: translate(var(--lx, 0px), var(--ly, 0px)); transition: transform .14s ease-out; }
  .smilo .sm-tilt { transform: rotate(var(--tilt, 0deg)); transform-origin: 50px 74px; transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
}
