/* Alert base (light) */
.md-alert{
  --bg: transparent;
  --border: var(--wp--preset--color--primary);
  --icon: var(--wp--preset--color--primary);

  display: flex;
  gap: 12px;
  align-items: flex-start;

  padding: 12px 14px;
  margin: 14px 0;
  border-radius: 10px;
  font: "DM Sans"

  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
}

.md-alert::before{
  content:"";
  width: 22px;
  height: 22px;
  margin-top: 2px;
  flex: 0 0 22px;
  background-color: var(--icon);

  /* icon mask (default: info icon) */
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-6h2v6Zm0-8h-2V7h2v2Z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm1 15h-2v-6h2v6Zm0-8h-2V7h2v2Z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.md-alert p{ margin: 0; }
.md-alert p + p{ margin-top: 8px; }

/* Variants (light) */
.md-alert--info{
  --bg: transparent;
}
.md-alert--success{
  --bg: transparent;
  --border: green;
  --icon: green;
  -webkit-mask: none; mask: none;
}
.md-alert--warning{
  --bg: transparent;
  --border: yellow;
  --icon: yellow;
}
.md-alert--error{
  --bg: transparent;
  --border: red;
  --icon: red;
}

/* Different icons per type */
.md-alert--success::before{
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9 16.2 4.8 12l-1.4 1.4L9 19 21 7l-1.4-1.4z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.md-alert--warning::before{
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1 21h22L12 2 1 21Zm12-3h-2v-2h2v2Zm0-4h-2v-4h2v4Z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M1 21h22L12 2 1 21Zm12-3h-2v-2h2v2Zm0-4h-2v-4h2v4Z'/%3E%3C/svg%3E") no-repeat center / contain;
}
.md-alert--error::before{
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm5 13.6L15.6 17 12 13.4 8.4 17 7 15.6 10.6 12 7 8.4 8.4 7 12 10.6 15.6 7 17 8.4 13.4 12 17 15.6Z'/%3E%3C/svg%3E") no-repeat center / contain;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm5 13.6L15.6 17 12 13.4 8.4 17 7 15.6 10.6 12 7 8.4 8.4 7 12 10.6 15.6 7 17 8.4 13.4 12 17 15.6Z'/%3E%3C/svg%3E") no-repeat center / contain;
}
