/* Social Proof Recent Contracts / Bookings Toast Widget for Thuê Xe Minh Khang */

/* =====================================================
   DESKTOP DEFAULT: Bottom-left Toast Card
   ===================================================== */
.txmk-sp-toast {
  position: fixed;
  bottom: 24px;
  left: 24px;
  top: auto;
  right: auto;
  z-index: 99990;
  max-width: 360px;
  width: calc(100% - 48px);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(217, 119, 6, 0.22);
  border-radius: 14px;
  padding: 11px 13px;
  color: #1e293b;
  box-shadow: 0 12px 30px -4px rgba(15, 23, 42, 0.14), 0 4px 14px rgba(217, 119, 6, 0.08);
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.96);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.35s;
  font-family: inherit;
  overflow: hidden;
  user-select: none;
}

.txmk-sp-toast.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.txmk-sp-toast.exiting {
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px) scale(0.96);
}

.txmk-sp-desktop-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
}

.txmk-sp-mobile-bar {
  display: none !important;
}

/* Avatar Wrap & Image */
.txmk-sp-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.txmk-sp-avatar {
  width: 60px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #fffaf3 0%, #fef3c7 100%);
  border: 1px solid rgba(245, 158, 11, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.txmk-sp-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.txmk-sp-toast:hover .txmk-sp-avatar img {
  transform: scale(1.06);
}

.txmk-sp-avatar-icon {
  font-size: 22px;
  color: #d97706;
}

.txmk-sp-badge-check {
  position: absolute;
  bottom: -3px;
  right: -3px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  border: 2px solid #ffffff;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Content Area */
.txmk-sp-body {
  flex: 1;
  min-width: 0;
}

.txmk-sp-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 2px;
  padding-right: 18px;
}

.txmk-sp-name {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.txmk-sp-status-tag {
  background: rgba(16, 185, 129, 0.12);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.25);
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 20px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  letter-spacing: 0.2px;
}

.txmk-sp-action {
  font-size: 12px;
  color: #475569;
  line-height: 1.35;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.txmk-sp-car-name {
  color: #d97706;
  font-weight: 700;
}

.txmk-sp-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #64748b;
}

.txmk-sp-meta-item {
  display: flex;
  align-items: center;
  gap: 3.5px;
  white-space: nowrap;
}

.txmk-sp-meta-item i {
  font-size: 11px;
}

.txmk-sp-dot {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

/* Close Button (Desktop) */
.txmk-sp-close {
  position: absolute;
  top: 6px;
  right: 6px;
  background: rgba(241, 245, 249, 0.85);
  border: none;
  color: #64748b;
  font-size: 15px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
  z-index: 2;
  padding: 0;
}

.txmk-sp-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Progress Bar (Desktop) */
.txmk-sp-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2.5px;
  width: 100%;
  background: linear-gradient(90deg, #f59e0b, #d97706);
  border-bottom-left-radius: 14px;
  border-bottom-right-radius: 14px;
}

/* =====================================================
   MOBILE: Dark Bottom Ticker Bar (Text slides Right -> Left)
   ===================================================== */
@media (max-width: 768px) {
  .txmk-sp-desktop-wrap {
    display: none !important;
  }

  .txmk-sp-toast {
    position: fixed !important;
    bottom: 0 !important;
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border-radius: 0 !important;
    border: none !important;
    border-top: 1px solid rgba(245, 158, 11, 0.4) !important;
    background: rgba(15, 23, 42, 0.96) !important;
    backdrop-filter: blur(14px) !important;
    -webkit-backdrop-filter: blur(14px) !important;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.35) !important;
    z-index: 99990 !important;
    transform: translateY(100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: transform 0.38s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.35s ease, visibility 0.38s !important;
    overflow: hidden !important;
    user-select: none;
  }

  .txmk-sp-toast.active {
    transform: translateY(0) !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .txmk-sp-toast.exiting {
    transform: translateY(100%) !important;
    opacity: 0 !important;
    visibility: hidden !important;
  }

  .txmk-sp-mobile-bar {
    display: flex !important;
    align-items: center;
    width: 100%;
    height: 38px;
    padding: 0 10px;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: content-box;
    gap: 8px;
    overflow: hidden;
  }

  .txmk-sp-mobile-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 4px;
    letter-spacing: 0.4px;
    white-space: nowrap;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.35);
  }

  .txmk-sp-mobile-badge i {
    font-size: 10.5px;
  }

  .txmk-sp-mobile-track {
    flex: 1;
    overflow: hidden;
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    min-width: 0;
    mask-image: linear-gradient(90deg, transparent 0%, black 12px, black calc(100% - 12px), transparent 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, black 12px, black calc(100% - 12px), transparent 100%);
  }

  .txmk-sp-mobile-text {
    display: inline-block;
    white-space: nowrap;
    color: #f8fafc;
    font-size: 12.5px;
    font-weight: 500;
    will-change: transform;
    padding-right: 20px;
  }

  @keyframes txmkTickerSlide {
    0% {
      transform: translateX(100vw);
    }
    100% {
      transform: translateX(-100%);
    }
  }

  .txmk-sp-m-name {
    font-weight: 700;
    color: #6ee7b7;
  }

  .txmk-sp-m-car {
    font-weight: 700;
    color: #fbbf24;
  }

  .txmk-sp-m-loc,
  .txmk-sp-m-time {
    color: #94a3b8;
    font-size: 11.5px;
  }

  .txmk-sp-m-loc i,
  .txmk-sp-m-time i {
    font-size: 10.5px;
    margin-right: 1px;
  }

  .txmk-sp-mobile-close {
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #cbd5e1;
    font-size: 16px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    margin-left: 2px;
    z-index: 2;
    transition: all 0.2s ease;
  }

  .txmk-sp-mobile-close:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
  }
}