/**
 * MegaStoreVn — Bricks element: mega-contact-action
 */

.wpt-contact-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.wpt-contact-card {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  width: 320px;
  background: #ffffff;
  border-radius: 14px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(20px) scale(0.95);
  transform-origin: bottom right;
  transition: opacity 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), visibility 0.25s;
}

.wpt-contact-wrap.is-open .wpt-contact-card {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.wpt-contact-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: #1a51a2;
  color: #ffffff;
}

.wpt-contact-card__title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
  color: #ffffff;
}

.wpt-contact-card__close {
  background: transparent;
  border: 0;
  color: #ffffff;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  opacity: 0.85;
  transition: opacity 0.2s, background 0.2s;
}

.wpt-contact-card__close:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.15);
}

.wpt-contact-card__list {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}

.wpt-contact-card__list li {
  margin: 0;
}

.wpt-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
}

.wpt-contact-item:hover {
  background: #f5f7fb;
}

.wpt-contact-item__icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.wpt-icon--phone {
  background: #22c55e;
}

.wpt-icon--zalo {
  background: #1e66f5;
}

.wpt-icon--messenger {
  background: #3b9cff;
}

.wpt-icon--email {
  background: #f59e0b;
}

.wpt-icon--store {
  background: #ef4444;
}

.wpt-contact-item__body {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
  min-width: 0;
}

.wpt-contact-item__label {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.wpt-contact-item__desc {
  font-size: 13px;
  color: #6b7280;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wpt-contact-toggle {
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 0;
  cursor: pointer;
  background: #d31100;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(26, 81, 162, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  transition: transform 0.3s ease, background 0.3s ease;
}

.wpt-contact-toggle:hover {
  transform: scale(1.05);
}

.wpt-contact-wrap.is-open .wpt-contact-toggle {
  background: #111827;
}

.wpt-contact-toggle__pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: #d31100;
  z-index: -1;
  animation: wpt-contact-pulse 2s infinite ease-out;
}

.wpt-contact-wrap.is-open .wpt-contact-toggle__pulse {
  display: none;
}

@keyframes wpt-contact-pulse {
  0% {
    transform: scale(1);
    opacity: 0.55;
  }
  100% {
    transform: scale(1.7);
    opacity: 0;
  }
}

.wpt-contact-toggle__icon {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.wpt-contact-toggle__icon--close {
  opacity: 0;
  transform: rotate(-90deg);
}

.wpt-contact-wrap.is-open .wpt-contact-toggle__icon--open {
  opacity: 0;
  transform: rotate(90deg);
}

.wpt-contact-wrap.is-open .wpt-contact-toggle__icon--close {
  opacity: 1;
  transform: rotate(0);
}

.megastorevn-contact-placeholder {
  padding: 12px 16px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  color: #64748b;
  font-size: 13px;
  background: #f8fafc;
}

@media (max-width: 480px) {
  .wpt-contact-wrap {
    bottom: 65px;
    right: 16px;
  }

  .wpt-contact-card {
    width: calc(100vw - 32px);
    max-width: 320px;
  }
}
