/* Nút "Sự kiện" nổi (js/tdd-sk-float.js), ngay trên nút liên hệ .td-contact (58px, 52px trên điện thoại). */
.tdd-skf {
  --tdd-skf-size: 58px;
  --tdd-skf-contact-size: 58px;
  position: fixed;
  left: max(calc(var(--tdd-skf-left, 20px) + (var(--tdd-skf-contact-size) - var(--tdd-skf-size)) / 2), env(safe-area-inset-left, 0px));
  bottom: calc(max(var(--tdd-skf-contact-bottom, 24px), env(safe-area-inset-bottom, 0px)) + var(--tdd-skf-contact-size) + 16px);
  z-index: 1000;
  color: #14233c;
  font-family: inherit;
  text-align: left;
  transition: opacity 0.2s ease, visibility 0.2s;
}
/* Bảng liên hệ mở lên trên sẽ che chỗ này. */
body:has(.td-contact.is-open) .tdd-skf {
  visibility: hidden;
  opacity: 0;
}

.tdd-skf .tdd-skf__toggle {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--tdd-skf-size);
  height: var(--tdd-skf-size);
  min-height: 0;
  margin: 0;
  padding: 15px;
  border: 0;
  border-radius: 50%;
  background: #153994;
  background-image: radial-gradient(circle at 28% 15%, #ffffff40, transparent 55%), linear-gradient(155deg, #ffffff12 30%, #00000030);
  color: #fff;
  box-shadow: 0 8px 20px #0003, 0 2px 4px #0002, inset 0 1px 1px #ffffff70, inset 0 -2px 3px #0002;
  isolation: isolate;
  overflow: visible;
  cursor: pointer;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1.3), box-shadow 0.3s ease;
}
/* Hiệu ứng giống nút "Kết nối Thành Đô" (css/contact-buttons.css): quầng sáng, sóng tỏa, vệt sáng lướt (biểu tượng đứng yên). */
.tdd-skf__toggle::before,
.tdd-skf__toggle::after {
  content: "";
  position: absolute;
  inset: -4px;
  z-index: -1;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
}
.tdd-skf__toggle::before {
  inset: -14px;
  background: radial-gradient(circle, transparent 35%, #153994 48%, transparent 72%);
  animation: tdd-skf-glow 3.6s ease-in-out infinite;
}
.tdd-skf__toggle::after {
  border: 1px solid #153994;
  animation: tdd-skf-ripple 3.6s ease-out infinite;
}
.tdd-skf__shine {
  position: absolute;
  inset: 0;
  overflow: hidden;
  border-radius: inherit;
  pointer-events: none;
}
.tdd-skf__shine::before {
  content: "";
  position: absolute;
  inset: -30%;
  background: linear-gradient(110deg, transparent 35%, #ffffff08 40%, #ffffff50 50%, #ffffff08 60%, transparent 65%);
  transform: translateX(-110%);
  animation: tdd-skf-shine 7.2s ease-in-out infinite;
}
.tdd-skf.is-open .tdd-skf__toggle::before,
.tdd-skf.is-open .tdd-skf__toggle::after,
.tdd-skf.is-open .tdd-skf__shine::before,
.tdd-skf.is-open .tdd-skf__caption {
  animation: none;
  opacity: 0;
}
@keyframes tdd-skf-ripple {
  0%, 12% { transform: scale(.98); opacity: 0; }
  20% { opacity: .35; }
  75%, 100% { transform: scale(1.5); opacity: 0; }
}
@keyframes tdd-skf-glow {
  0%, 100% { transform: scale(.94); opacity: .12; }
  45% { transform: scale(1.08); opacity: .28; }
}
@keyframes tdd-skf-shine {
  0%, 58% { transform: translateX(-110%); }
  78%, 100% { transform: translateX(110%); }
}
@keyframes tdd-skf-nudge {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(6px); }
}
.tdd-skf .tdd-skf__toggle > svg {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}
@media (hover: hover) {
  .tdd-skf .tdd-skf__toggle:hover {
    transform: translateY(-3px) scale(1.04);
  }
}
.tdd-skf .tdd-skf__toggle:active {
  transform: scale(0.94);
}
.tdd-skf__toggle:focus-visible,
.tdd-skf a:focus-visible,
.tdd-skf__close:focus-visible {
  outline: 3px solid #f5a623;
  outline-offset: 3px;
}
.tdd-skf__count {
  position: absolute;
  z-index: 1;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 99px;
  background: #fba10a; /* vàng logo */
  color: #0e2a75; /* chữ xanh đậm: chữ trắng trên vàng khó đọc */
  font-size: 11px;
  font-weight: 800;
  line-height: 16px;
  text-align: center;
}
.tdd-skf__count[hidden] {
  display: none;
}
.tdd-skf__caption {
  position: absolute;
  left: calc(100% + 10px);
  width: max-content;
  padding: 8px 12px;
  border-radius: 8px;
  background: #153994;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.4;
  pointer-events: none;
  animation: tdd-skf-nudge 2.4s ease-in-out infinite;
}
.tdd-skf__caption::before {
  content: "";
  position: absolute;
  top: 50%;
  right: 100%;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-right: 7px solid #153994;
  transform: translateY(-50%);
}
.tdd-skf.is-open .tdd-skf__caption {
  visibility: hidden;
}

/* Bảng danh sách */
.tdd-skf__panel {
  position: absolute;
  left: 0;
  bottom: calc(100% + 12px);
  width: min(340px, calc(100vw - var(--tdd-skf-left, 20px) - 16px));
  max-height: calc(100vh - var(--tdd-skf-contact-bottom, 24px) - var(--tdd-skf-contact-size) - var(--tdd-skf-size) - 60px);
  max-height: calc(100dvh - var(--tdd-skf-contact-bottom, 24px) - var(--tdd-skf-contact-size) - var(--tdd-skf-size) - 60px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px;
  border: 1px solid #e3e9f2;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 44px rgb(10 25 60 / 22%);
  visibility: hidden;
  opacity: 0;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}
.tdd-skf.is-open .tdd-skf__panel {
  visibility: visible;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.tdd-skf__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.tdd-skf__title {
  margin: 0;
  color: #153994;
  font-size: 16px;
  font-weight: 800;
}
.tdd-skf .tdd-skf__close {
  width: 30px;
  height: 30px;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: #5b6b82;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.tdd-skf .tdd-skf__close:hover {
  background: #eef2f9;
}
.tdd-skf .tdd-skf__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}
.tdd-skf .tdd-skf__list li {
  margin: 0;
}
.tdd-skf .tdd-skf__item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 8px;
  border: 1px solid #e8edf4;
  border-radius: 12px;
  color: #14233c;
  text-decoration: none;
  transition: background 0.2s, border-color 0.2s;
}
.tdd-skf .tdd-skf__item:hover {
  border-color: #c9d6ee;
  background: #f4f7fd;
}
.tdd-skf__date {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 5px 0;
  border-radius: 9px;
  background: #e5efff;
  color: #1557b8;
  line-height: 1.1;
}
.is-dang .tdd-skf__date {
  background: #e1f6ea;
  color: #087a41;
}
.tdd-skf__date b {
  font-size: 17px;
}
.tdd-skf__date small {
  font-size: 10.5px;
  font-weight: 600;
}
.tdd-skf__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tdd-skf__name {
  display: -webkit-box;
  overflow: hidden;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.tdd-skf__meta {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #5b6b82;
  font-size: 12px;
}
.tdd-skf__dot {
  flex: 0 0 7px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1d6fe0;
}
.is-dang .tdd-skf__dot {
  background: #0b9a52;
  box-shadow: 0 0 0 3px rgb(11 154 82 / 18%);
}
.tdd-skf .tdd-skf__empty {
  padding: 14px;
  border: 1px dashed #cdd7e6;
  border-radius: 12px;
  color: #5b6b82;
  font-size: 14px;
  text-align: center;
}
.tdd-skf .tdd-skf__all {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px;
  border-radius: 10px;
  background: #153994;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.tdd-skf .tdd-skf__all:hover {
  background: #0e2a75;
  color: #fff;
}

@media (max-width: 549px) {
  .tdd-skf {
    --tdd-skf-size: 52px;
    --tdd-skf-contact-size: 52px;
  }
  .tdd-skf .tdd-skf__toggle {
    padding: 12px;
  }
  .tdd-skf__caption {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .tdd-skf,
  .tdd-skf .tdd-skf__toggle,
  .tdd-skf__panel {
    transition: none;
  }
  .tdd-skf__toggle::before,
  .tdd-skf__toggle::after,
  .tdd-skf__shine::before,
  .tdd-skf__caption {
    animation: none !important;
  }
}
