@charset "UTF-8";
/* =========================================================
   Woo -> Toast (TCP Design Tokens)
   ========================================================= */
/* Ẩn Woo notice gốc khi JS đã bật */
html.tcp-js .woocommerce-error,
html.tcp-js .woocommerce-message,
html.tcp-js .woocommerce-info {
  display: none !important;
}

/* Toast root */
#tcp-toast-root {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 999999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: min(420px, 100vw - 32px);
}

/* Dialog / Card style */
.tcp-toast {
  border-radius: var(--semantic-rounded-xl, 12px);
  border: 1px solid var(--general-border, #E5E7EB);
  background: var(--general-background, #FFF);
  /* shadow-lg */
  box-shadow: var(--lg-shadow-1-x, 0) var(--lg-shadow-1-y, 10px) var(--lg-shadow-1-blur, 15px) var(--lg-shadow-1-spread, -3px) var(--lg-color, rgba(55, 65, 81, 0.1)), var(--lg-shadow-2-x, 0) var(--lg-shadow-2-y, 4px) var(--lg-shadow-2-spread, 6px) var(--lg-shadow-2-blur, -4px) var(--lg-color, rgba(55, 65, 81, 0.1));
  padding: 14px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: start;
}

/* Typography */
.tcp-toast__title {
  margin: 0 0 6px;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  color: var(--general-foreground, #111827);
}

.tcp-toast__desc {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  color: var(--general-muted-foreground, #374151);
}

/* Actions */
.tcp-toast__actions {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* Button base */
.tcp-toast__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--semantic-rounded-lg, 8px);
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  border: 1px solid transparent;
  text-decoration: none;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
  cursor: pointer;
  transition: transform 0.08s ease, opacity 0.12s ease, filter 0.12s ease;
}

.tcp-toast__btn:active {
  transform: translateY(1px);
}

/* Primary */
.tcp-toast__btn-primary {
  background: var(--general-primary, #4F46E5);
  color: var(--general-primary-foreground, #FFF);
}

/* Secondary (Destructive) */
.tcp-toast__btn-secondary,
.tcp-toast__btn-destructive {
  background: var(--general-destructive, #DC2626);
  color: var(--general-destructive-foreground, #FFF);
}

/* Hover */
.tcp-toast__btn:hover {
  filter: brightness(0.98);
}

/* Close button */
.tcp-toast__close {
  width: 34px;
  height: 34px;
  border-radius: var(--semantic-rounded-lg, 8px);
  border: 1px solid var(--general-border, #E5E7EB);
  background: transparent;
  cursor: pointer;
  opacity: 0.75;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.12s ease, background 0.12s ease;
}

.tcp-toast__close:hover {
  opacity: 1;
  background: rgba(17, 24, 39, 0.04);
}

/* Optional: accent nhẹ theo type (không phá design) */
.tcp-toast[data-type=error] {
  /* viền hơi nhấn nhẹ */
  border-color: color-mix(in srgb, var(--general-destructive, #DC2626) 22%, var(--general-border, #E5E7EB));
}

.tcp-toast[data-type=success] {
  border-color: color-mix(in srgb, #16A34A 18%, var(--general-border, #E5E7EB));
}

.tcp-toast[data-type=info] {
  border-color: color-mix(in srgb, var(--general-primary, #4F46E5) 14%, var(--general-border, #E5E7EB));
}

/* Mobile: full width toast */
@media (max-width: 480px) {
  #tcp-toast-root {
    left: 16px;
    right: 16px;
    width: auto;
  }
}
