/* SealHR — น้องซีล Call Center VDO + LINE OA FAB */
.seal-support-fab {
  position: fixed;
  right: 16px;
  bottom: 4px;
  z-index: 9990;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.seal-support-line-cluster {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.seal-support-close {
  position: absolute;
  top: -4px;
  right: -4px;
  z-index: 3;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #64748b;
  color: #fff;
  font-size: .75rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(15, 23, 42, .2);
  transition: background .15s, transform .15s;
}

.seal-support-close:hover {
  background: #475569;
  transform: scale(1.05);
}

.seal-support-close:focus-visible {
  outline: 2px solid #14b8a6;
  outline-offset: 2px;
}

.seal-support-line-cluster .seal-support-btn--line {
  flex-shrink: 0;
  order: 1;
}

.seal-support-line-cluster .seal-support-mascot-btn {
  order: 2;
  margin-bottom: -8px;
}

.seal-support-line-cluster .seal-mascot-chroma,
.seal-support-line-cluster .seal-mascot-canvas,
.seal-support-line-cluster .seal-support-mascot,
.seal-support-line-cluster .seal-mascot--fallback {
  width: 236px;
  height: 236px;
}

.seal-support-mascot-btn {
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  line-height: 0;
  flex-shrink: 0;
  filter: drop-shadow(0 8px 20px rgba(15, 23, 42, .14));
}

/* พื้นหลังโปร่งใส — ตัดด้วย canvas flood-fill ใน seal-mascot-video.js */
.seal-mascot-chroma {
  display: inline-block;
  position: relative;
  background: transparent !important;
  line-height: 0;
  overflow: visible;
}

.seal-mascot-chroma .seal-mascot--video-src {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none;
  overflow: hidden;
}

.seal-mascot-canvas {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  background: transparent !important;
}

.seal-support-mascot,
.seal-mascot--fallback {
  display: block;
  width: 118px;
  height: 118px;
  object-fit: contain;
  vertical-align: bottom;
  background: transparent !important;
}

.seal-support-mascot:not(.seal-mascot--fallback),
.seal-line-panel__head-mascot,
.seal-line-widget__mascot.seal-mascot--sprite {
  transform-origin: center bottom;
  animation: seal-mascot-bob 2.4s ease-in-out infinite, seal-mascot-wave 4.8s ease-in-out infinite;
}

.seal-mascot--sprite {
  background-repeat: no-repeat;
  background-size: 300% 300%;
  background-position: 50% 0%;
}

@keyframes seal-mascot-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(-1.5deg); }
}

@keyframes seal-mascot-wave {
  0%, 78%, 100% { filter: none; }
  82% { transform: translateY(-4px) rotate(2deg); }
  86% { transform: translateY(-6px) rotate(-2deg); }
  90% { transform: translateY(-4px) rotate(1deg); }
}

.seal-support-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 800;
  font-size: .85rem;
  box-shadow: 0 8px 24px rgba(6, 199, 85, .28);
  text-decoration: none;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.seal-support-btn--line {
  background: #06C755;
  color: #fff;
}

.seal-support-btn--line:hover {
  filter: brightness(1.05);
}

.seal-line-panel {
  display: none;
  width: 320px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(15, 23, 42, .18);
  overflow: hidden;
}

.seal-line-panel.is-open {
  display: block;
}

.seal-line-panel__head {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  padding: 12px 16px;
  font-weight: 800;
  font-size: .88rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.seal-line-panel__head .seal-mascot-canvas {
  width: 48px;
  height: 48px;
  mix-blend-mode: normal;
}

.seal-line-panel__head-mascot,
.seal-line-panel__head .seal-mascot-canvas,
.seal-line-panel__head .seal-mascot--fallback {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
}

.seal-line-panel__head-mascot.seal-mascot--sprite {
  background-repeat: no-repeat;
  background-size: 300% 300%;
  background-position: 50% 0%;
}

.seal-line-panel__body {
  padding: 16px;
  font-size: .88rem;
  color: #475569;
  line-height: 1.55;
}

.seal-line-panel__body a {
  color: #0f766e;
  font-weight: 700;
}

.seal-line-qr {
  display: block;
  width: 132px;
  height: 132px;
  margin: 10px auto 8px;
  border-radius: 12px;
  border: 2px solid #bbf7d0;
}

.seal-line-id {
  text-align: center;
  font-weight: 800;
  color: #059669;
  font-size: .92rem;
  margin: 0 0 8px;
}

.seal-line-widget__actions--with-mascot {
  display: flex;
  flex-direction: row;
  align-items: flex-end;
  gap: 10px;
}

.seal-line-widget__mascot,
.seal-line-widget__actions .seal-mascot-canvas,
.seal-line-widget__actions .seal-mascot--fallback {
  width: 88px;
  height: 88px;
  object-fit: contain;
  flex-shrink: 0;
}

.seal-line-widget__mascot.seal-mascot--sprite {
  background-repeat: no-repeat;
  background-size: 300% 300%;
  background-position: 50% 0%;
}

.seal-line-widget__mascot--sm,
.seal-ext-line-btn-row .seal-mascot-canvas,
.seal-ext-line-btn-row .seal-mascot--fallback {
  width: 72px !important;
  height: 72px !important;
}

@media (max-width: 480px) {
  .seal-support-line-cluster .seal-mascot-chroma,
  .seal-support-line-cluster .seal-mascot-canvas,
  .seal-support-line-cluster .seal-support-mascot,
  .seal-support-line-cluster .seal-mascot--fallback {
    width: 192px;
    height: 192px;
  }
  .seal-mascot-canvas,
  .seal-mascot--fallback { width: 96px; height: 96px; }
  .seal-support-btn { padding: 10px 14px; font-size: .8rem; }
  .seal-support-fab { right: 8px; bottom: 2px; }
  .seal-support-line-cluster { gap: 4px; }
  .seal-support-line-cluster .seal-support-mascot-btn { margin-bottom: -4px; }
}

@media (prefers-reduced-motion: reduce) {
  .seal-support-mascot:not(.seal-mascot--fallback),
  .seal-line-panel__head-mascot,
  .seal-mascot--sprite {
    animation: none;
  }
}
