/**
 * YOOAdmin — global admin toast (top-right, matches notifications dropdown).
 *
 * @package YOOAdmin
 */

.yp-toast-message {
  --yp-toast-font-size: 12px;
  --yp-toast-icon-size: 14px;
  position: fixed;
  top: 20px;
  right: 20px;
  background: #fff;
  border-left: 4px solid var(--yp-brand, #eda934);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  padding: 10px 14px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 260px;
  max-width: 420px;
  z-index: 100000;
  opacity: 0;
  transform: translateX(400px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: auto;
}

.yp-toast-message.yp-toast-show {
  opacity: 1;
  transform: translateX(0);
}

.yp-toast-message.yp-toast-success {
  border-left-color: var(--yp-brand, #eda934);
}

.yp-toast-message.yp-toast-error {
  border-left-color: #d63638;
}

.yp-toast-message.yp-toast-warning {
  border-left-color: #dba617;
}

.yp-toast-message.yp-toast-info {
  border-left-color: var(--yp-brand, #eda934);
}

.yp-toast-icon {
  font-size: var(--yp-toast-icon-size, 14px);
  font-weight: bold;
  flex-shrink: 0;
  line-height: 1;
}

.yp-toast-success .yp-toast-icon {
  color: var(--yp-brand, #eda934);
}

.yp-toast-error .yp-toast-icon {
  color: #d63638;
}

.yp-toast-warning .yp-toast-icon {
  color: #dba617;
}

.yp-toast-info .yp-toast-icon {
  color: var(--yp-brand, #eda934);
}

.yp-toast-text {
  flex: 1;
  font-size: var(--yp-toast-font-size, 12px);
  line-height: 1.45;
  color: #333;
}

html:is([data-yooadmin-studio-color-mode-effective="dark"], .is-dark-theme) body.wp-admin .yp-toast-message,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.wp-admin .yp-toast-message {
  background: var(--ysh-card, #1a1d23);
  box-shadow: var(--ysh-elev-2, 0 4px 16px rgba(0, 0, 0, 0.35));
}

html:is([data-yooadmin-studio-color-mode-effective="dark"], .is-dark-theme) body.wp-admin .yp-toast-message .yp-toast-text,
html.yooadmin-studio-hub-html[data-yooadmin-studio-color-mode-effective="dark"] body.wp-admin .yp-toast-message .yp-toast-text {
  color: var(--ysh-text, #e8edf4);
}

@media (max-width: 768px) {
  .yp-toast-message {
    left: 10px;
    right: 10px;
    min-width: auto;
    max-width: none;
  }
}
