.yhn-contact {
  --yhn-contact-color: #e87992;
  --yhn-contact-bottom: 92px;
  --yhn-contact-side: 18px;
  --yhn-contact-mobile-bottom: 18px;
  --yhn-contact-mobile-side: 12px;
  position: fixed;
  bottom: calc(var(--yhn-contact-bottom) + env(safe-area-inset-bottom, 0px));
  z-index: 9998;
  color: #263238;
  font: 500 14px/1.35 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

.yhn-contact--right { right: var(--yhn-contact-side); }
.yhn-contact--left { left: var(--yhn-contact-side); }

.yhn-contact summary {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-left: auto;
  color: #fff;
  background: linear-gradient(145deg, #f08aa1 0%, var(--yhn-contact-color) 52%, #d95d7a 100%);
  border: 1px solid rgba(255,255,255,.88);
  border-radius: 50%;
  box-shadow: 0 10px 26px rgba(196,65,96,.28), inset 0 1px 0 rgba(255,255,255,.28);
  cursor: pointer;
  list-style: none;
  transition: transform .18s ease, box-shadow .18s ease;
}

.yhn-contact--left summary { margin: 0 auto 0 0; }
.yhn-contact summary::-webkit-details-marker { display: none; }
.yhn-contact summary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(196,65,96,.34), inset 0 1px 0 rgba(255,255,255,.3); }
.yhn-contact summary:focus-visible { outline: 3px solid rgba(232,121,146,.35); outline-offset: 3px; }
.yhn-contact summary svg { width: 25px; height: 25px; fill: currentColor; }
.yhn-contact__ring { position:absolute;inset:-5px;border:1px solid rgba(232,121,146,.2);border-radius:inherit;pointer-events:none; }
.yhn-contact__close { display: none; font-size: 30px; font-weight: 300; line-height: 1; transform: translateY(-1px); }
.yhn-contact[open] .yhn-contact__open { display: none; }
.yhn-contact[open] .yhn-contact__close { display: block; }

.yhn-contact__panel {
  position: absolute;
  bottom: 66px;
  width: 278px;
  overflow: hidden;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(115,77,87,.1);
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(62,39,48,.18), 0 4px 14px rgba(62,39,48,.08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(8px) scale(.98);
  transform-origin: bottom right;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease;
}

.yhn-contact--right .yhn-contact__panel { right: 0; }
.yhn-contact--left .yhn-contact__panel { left: 0; transform-origin: bottom left; }
.yhn-contact[open] .yhn-contact__panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }

.yhn-contact__header {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 72px;
  padding: 14px 16px;
  color: #fff;
  background: linear-gradient(125deg, #d95d7a 0%, #e87992 52%, #f19aab 100%);
}

.yhn-contact__brand-icon {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: rgba(255,255,255,.17);
  border: 1px solid rgba(255,255,255,.26);
  border-radius: 12px;
}

.yhn-contact__brand-icon svg { width: 21px; height: 21px; fill: currentColor; }
.yhn-contact__brand-icon img { display:block;width:100%;height:100%;object-fit:contain;border-radius:10px; }
.yhn-contact__brand-copy { display: grid; gap: 3px; min-width: 0; }
.yhn-contact__brand-copy strong { color: #fff; font-size: 15px; font-weight: 700; letter-spacing: .01em; }
.yhn-contact__brand-copy small { display:flex;align-items:center;gap:6px;color:rgba(255,255,255,.88);font-size:11.5px;font-weight:500;white-space:nowrap; }
.yhn-contact__brand-copy i { display:block;width:7px;height:7px;background:#86efac;border:1px solid rgba(255,255,255,.75);border-radius:50%;box-shadow:0 0 0 3px rgba(134,239,172,.16); }
.yhn-contact--offline .yhn-contact__brand-copy i { background:#fde68a;box-shadow:0 0 0 3px rgba(253,230,138,.18); }

.yhn-contact__channels { display: grid; gap: 7px; padding: 12px 12px 8px; }

.yhn-contact__item {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 52px;
  padding: 7px 9px 7px 7px;
  color: #263238 !important;
  background: #faf8f8;
  border: 1px solid #f1ebed;
  border-radius: 13px;
  text-decoration: none !important;
  transition: background .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.yhn-contact__item:hover { color: #111827 !important; background: #fff; border-color:#eadde1;box-shadow:0 7px 18px rgba(67,39,48,.08);transform: translateX(-2px); }
.yhn-contact--left .yhn-contact__item:hover { transform: translateX(2px); }
.yhn-contact__item:focus-visible { outline: 2px solid var(--yhn-contact-color); outline-offset: 1px; }

.yhn-contact__icon {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  color: #fff;
  background: var(--yhn-contact-color);
  border-radius: 50%;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 10px rgba(30,41,59,.1);
}

.yhn-contact__icon svg { width: 21px; height: 21px; fill: currentColor; }
.yhn-contact__item-copy { display:grid;flex:1;gap:1px;min-width:0; }
.yhn-contact__item-copy strong { overflow:hidden;color:#283138;font-size:13.5px;font-weight:650;text-overflow:ellipsis;white-space:nowrap; }
.yhn-contact__item-copy small { overflow:hidden;color:#8b7f83;font-size:11.5px;font-weight:450;text-overflow:ellipsis;white-space:nowrap; }
.yhn-contact__arrow { color:#b8adb0;font:300 25px/1 Arial,sans-serif;transition:color .16s ease,transform .16s ease; }
.yhn-contact__item:hover .yhn-contact__arrow { color:var(--yhn-contact-color);transform:translateX(2px); }

.yhn-contact__item--zalo .yhn-contact__icon { background: #0068ff; }
.yhn-contact__item--phone .yhn-contact__icon { background: #ec4899; }
.yhn-contact__item--messenger .yhn-contact__icon { background: #168aff; }
.yhn-contact__item--viber .yhn-contact__icon { background: #7360f2; }
.yhn-contact__item--whatsapp .yhn-contact__icon { background: #25d366; }
.yhn-contact__item--telegram .yhn-contact__icon { background: #229ed9; }
.yhn-contact__item--sms .yhn-contact__icon { background: #22a06b; }
.yhn-contact__item--email .yhn-contact__icon { background: #64748b; }
.yhn-contact__item--tiktok .yhn-contact__icon { background: #111; }
.yhn-contact__privacy { margin:0;padding:7px 12px 11px;color:#a09699;font-size:10.5px;text-align:center; }

@media (max-width: 782px) {
  .yhn-contact {
    bottom: calc(var(--yhn-contact-mobile-bottom) + env(safe-area-inset-bottom, 0px));
  }
  .yhn-contact--right { right: var(--yhn-contact-mobile-side); }
  .yhn-contact--left { left: var(--yhn-contact-mobile-side); }
  .yhn-contact summary { width: 50px; height: 50px; }
  .yhn-contact__panel { bottom: 62px; width:min(278px, calc(100vw - 24px));max-height:min(520px, 72vh);overflow-y:auto; }
  .yhn-contact--compact-mobile .yhn-contact__panel { width:min(268px, calc(100vw - 24px)); }
  .yhn-contact--compact-mobile .yhn-contact__header { min-height:64px;padding:11px 13px;gap:9px; }
  .yhn-contact--compact-mobile .yhn-contact__brand-icon { flex-basis:35px;width:35px;height:35px;border-radius:11px; }
  .yhn-contact--compact-mobile .yhn-contact__brand-copy strong { font-size:14px; }
  .yhn-contact--compact-mobile .yhn-contact__brand-copy small { font-size:10.5px; }
  .yhn-contact--compact-mobile .yhn-contact__channels { gap:5px;padding:9px 9px 6px; }
  .yhn-contact--compact-mobile .yhn-contact__item { min-height:47px;padding:5px 8px 5px 6px;gap:9px;border-radius:12px; }
  .yhn-contact--compact-mobile .yhn-contact__icon { flex-basis:35px;width:35px;height:35px; }
  .yhn-contact--compact-mobile .yhn-contact__icon svg { width:19px;height:19px; }
  .yhn-contact--compact-mobile .yhn-contact__item-copy strong { font-size:13px; }
  .yhn-contact--compact-mobile .yhn-contact__item-copy small { font-size:10.8px; }
  .yhn-contact--compact-mobile .yhn-contact__privacy { padding:6px 9px 9px;font-size:10px; }
  .yhn-contact--no-mobile { display: none !important; }
}

@media (min-width: 783px) {
  .yhn-contact--no-desktop { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .yhn-contact summary,
  .yhn-contact__panel,
  .yhn-contact__item { transition: none; }
}

@media print {
  .yhn-contact { display: none !important; }
}
