.mds-alert {
  display: flex;
  gap: var(--mds-spacing-md);
  align-items: flex-start;
  inline-size: 100%;
  padding: var(--mds-spacing-md);
  border: var(--mds-stroke-weight-sm) solid var(--mds-border-feedback-primary);
  border-radius: var(--mds-border-radius-md);
  background-color: var(--mds-bg-feedback-primary-light);
  color: var(--mds-text-feedback-primary);
}

.mds-alert--success {
  background-color: var(--mds-bg-feedback-success-light);
  border-color: var(--mds-border-feedback-success);
  color: var(--mds-text-feedback-success);
}

.mds-alert--warning {
  background-color: var(--mds-bg-feedback-warning-light);
  border-color: var(--mds-border-feedback-warning);
  color: var(--mds-text-feedback-warning);
}

.mds-alert--danger {
  background-color: var(--mds-bg-feedback-danger-light);
  border-color: var(--mds-border-feedback-danger);
  color: var(--mds-text-feedback-danger);
}

.mds-alert-icon-wrap {
  display: flex;
  flex-shrink: 0;
  inline-size: 20px; /* Figma defines icon frame as fixed 20x20. */
  block-size: 20px; /* Figma defines icon frame as fixed 20x20. */
}

.mds-alert--no-title .mds-alert-icon-wrap {
  block-size: 24px; /* Figma no-title variant uses a 20x24 icon frame. */
}

.mds-alert-icon {
  display: block;
  inline-size: 100%;
  block-size: 100%;
  background-color: var(--mds-bg-feedback-primary-default);
  mask-image: url('data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%3Cpath%20d%3D%22M10.0195%2020C6.42578%2020%203.14453%2018.125%201.34766%2015C-0.449219%2011.9141%20-0.449219%208.125%201.34766%205C3.14453%201.91406%206.42578%200%2010.0195%200C13.5742%200%2016.8555%201.91406%2018.6523%205C20.4492%208.125%2020.4492%2011.9141%2018.6523%2015C16.8555%2018.125%2013.5742%2020%2010.0195%2020ZM8.45703%2013.125C7.91016%2013.125%207.51953%2013.5547%207.51953%2014.0625C7.51953%2014.6094%207.91016%2015%208.45703%2015H11.582C12.0898%2015%2012.5195%2014.6094%2012.5195%2014.0625C12.5195%2013.5547%2012.0898%2013.125%2011.582%2013.125H11.2695V9.6875C11.2695%209.17969%2010.8398%208.75%2010.332%208.75H8.45703C7.91016%208.75%207.51953%209.17969%207.51953%209.6875C7.51953%2010.2344%207.91016%2010.625%208.45703%2010.625H9.39453V13.125H8.45703ZM10.0195%205C9.31641%205%208.76953%205.58594%208.76953%206.25C8.76953%206.95312%209.31641%207.5%2010.0195%207.5C10.6836%207.5%2011.2695%206.95312%2011.2695%206.25C11.2695%205.58594%2010.6836%205%2010.0195%205Z%22%20fill%3D%22currentColor%22%2F%3E%20%3C%2Fsvg%3E');
  mask-repeat: no-repeat;
  mask-position: center;
  mask-size: contain;
  -webkit-mask-image: url('data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%3Cpath%20d%3D%22M10.0195%2020C6.42578%2020%203.14453%2018.125%201.34766%2015C-0.449219%2011.9141%20-0.449219%208.125%201.34766%205C3.14453%201.91406%206.42578%200%2010.0195%200C13.5742%200%2016.8555%201.91406%2018.6523%205C20.4492%208.125%2020.4492%2011.9141%2018.6523%2015C16.8555%2018.125%2013.5742%2020%2010.0195%2020ZM8.45703%2013.125C7.91016%2013.125%207.51953%2013.5547%207.51953%2014.0625C7.51953%2014.6094%207.91016%2015%208.45703%2015H11.582C12.0898%2015%2012.5195%2014.6094%2012.5195%2014.0625C12.5195%2013.5547%2012.0898%2013.125%2011.582%2013.125H11.2695V9.6875C11.2695%209.17969%2010.8398%208.75%2010.332%208.75H8.45703C7.91016%208.75%207.51953%209.17969%207.51953%209.6875C7.51953%2010.2344%207.91016%2010.625%208.45703%2010.625H9.39453V13.125H8.45703ZM10.0195%205C9.31641%205%208.76953%205.58594%208.76953%206.25C8.76953%206.95312%209.31641%207.5%2010.0195%207.5C10.6836%207.5%2011.2695%206.95312%2011.2695%206.25C11.2695%205.58594%2010.6836%205%2010.0195%205Z%22%20fill%3D%22currentColor%22%2F%3E%20%3C%2Fsvg%3E');
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-position: center;
  -webkit-mask-size: contain;
}

.mds-alert--success .mds-alert-icon {
  background-color: var(--mds-bg-feedback-success-default);
  mask-image: url('data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%3Cpath%20d%3D%22M10%2020C4.45312%2020%200%2015.5469%200%2010C0%204.49219%204.45312%200%2010%200C15.5078%200%2020%204.49219%2020%2010C20%2015.5469%2015.5078%2020%2010%2020ZM14.4141%208.16406H14.375C14.7656%207.8125%2014.7656%207.22656%2014.375%206.83594C14.0234%206.48438%2013.4375%206.48438%2013.0859%206.83594L8.75%2011.2109L6.91406%209.375C6.52344%208.98438%205.9375%208.98438%205.58594%209.375C5.19531%209.72656%205.19531%2010.3125%205.58594%2010.6641L8.08594%2013.1641C8.4375%2013.5547%209.02344%2013.5547%209.41406%2013.1641L14.4141%208.16406Z%22%20fill%3D%22currentColor%22%2F%3E%20%3C%2Fsvg%3E');
  -webkit-mask-image: url('data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%3Cpath%20d%3D%22M10%2020C4.45312%2020%200%2015.5469%200%2010C0%204.49219%204.45312%200%2010%200C15.5078%200%2020%204.49219%2020%2010C20%2015.5469%2015.5078%2020%2010%2020ZM14.4141%208.16406H14.375C14.7656%207.8125%2014.7656%207.22656%2014.375%206.83594C14.0234%206.48438%2013.4375%206.48438%2013.0859%206.83594L8.75%2011.2109L6.91406%209.375C6.52344%208.98438%205.9375%208.98438%205.58594%209.375C5.19531%209.72656%205.19531%2010.3125%205.58594%2010.6641L8.08594%2013.1641C8.4375%2013.5547%209.02344%2013.5547%209.41406%2013.1641L14.4141%208.16406Z%22%20fill%3D%22currentColor%22%2F%3E%20%3C%2Fsvg%3E');
}

.mds-alert--warning .mds-alert-icon {
  background-color: var(--mds-bg-feedback-warning-default);
  mask-image: url('data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2218%22%20viewBox%3D%220%200%2020%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%3Cpath%20d%3D%22M10.0193%200C10.5667%200%2011.075%200.312798%2011.3487%200.781996L19.7943%2015.1707C20.068%2015.679%2020.068%2016.2655%2019.7943%2016.7347C19.5206%2017.243%2019.0123%2017.5167%2018.4649%2017.5167H1.57377C0.987269%2017.5167%200.478972%2017.243%200.205274%2016.7347C-0.0684246%2016.2655%20-0.0684246%2015.679%200.205274%2015.1707L8.65083%200.781996C8.92452%200.312798%209.43282%200%2010.0193%200ZM10.0193%205.00477C9.47192%205.00477%209.08092%205.43487%209.08092%205.94317V10.3223C9.08092%2010.8697%209.47192%2011.2607%2010.0193%2011.2607C10.5276%2011.2607%2010.9577%2010.8697%2010.9577%2010.3223V5.94317C10.9577%205.43487%2010.5276%205.00477%2010.0193%205.00477ZM11.2705%2013.7631C11.2705%2013.0984%2010.684%2012.5119%2010.0193%2012.5119C9.31552%2012.5119%208.76812%2013.0984%208.76812%2013.7631C8.76812%2014.4669%209.31552%2015.0143%2010.0193%2015.0143C10.684%2015.0143%2011.2705%2014.4669%2011.2705%2013.7631Z%22%20fill%3D%22currentColor%22%2F%3E%20%3C%2Fsvg%3E');
  -webkit-mask-image: url('data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2218%22%20viewBox%3D%220%200%2020%2018%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%3Cpath%20d%3D%22M10.0193%200C10.5667%200%2011.075%200.312798%2011.3487%200.781996L19.7943%2015.1707C20.068%2015.679%2020.068%2016.2655%2019.7943%2016.7347C19.5206%2017.243%2019.0123%2017.5167%2018.4649%2017.5167H1.57377C0.987269%2017.5167%200.478972%2017.243%200.205274%2016.7347C-0.0684246%2016.2655%20-0.0684246%2015.679%200.205274%2015.1707L8.65083%200.781996C8.92452%200.312798%209.43282%200%2010.0193%200ZM10.0193%205.00477C9.47192%205.00477%209.08092%205.43487%209.08092%205.94317V10.3223C9.08092%2010.8697%209.47192%2011.2607%2010.0193%2011.2607C10.5276%2011.2607%2010.9577%2010.8697%2010.9577%2010.3223V5.94317C10.9577%205.43487%2010.5276%205.00477%2010.0193%205.00477ZM11.2705%2013.7631C11.2705%2013.0984%2010.684%2012.5119%2010.0193%2012.5119C9.31552%2012.5119%208.76812%2013.0984%208.76812%2013.7631C8.76812%2014.4669%209.31552%2015.0143%2010.0193%2015.0143C10.684%2015.0143%2011.2705%2014.4669%2011.2705%2013.7631Z%22%20fill%3D%22currentColor%22%2F%3E%20%3C%2Fsvg%3E');
}

.mds-alert--danger .mds-alert-icon {
  background-color: var(--mds-bg-feedback-danger-default);
  mask-image: url('data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%3Cpath%20d%3D%22M10%2020C4.45312%2020%200%2015.5469%200%2010C0%204.49219%204.45312%200%2010%200C15.5078%200%2020%204.49219%2020%2010C20%2015.5469%2015.5078%2020%2010%2020ZM6.83594%206.83594C6.44531%207.22656%206.44531%207.8125%206.83594%208.16406L8.67188%2010L6.83594%2011.8359C6.44531%2012.2266%206.44531%2012.8125%206.83594%2013.1641C7.1875%2013.5547%207.77344%2013.5547%208.125%2013.1641L9.96094%2011.3281L11.7969%2013.1641C12.1875%2013.5547%2012.7734%2013.5547%2013.125%2013.1641C13.5156%2012.8125%2013.5156%2012.2266%2013.125%2011.8359L11.2891%2010L13.125%208.16406C13.5156%207.8125%2013.5156%207.22656%2013.125%206.83594C12.7734%206.48438%2012.1875%206.48438%2011.7969%206.83594L9.96094%208.67188L8.125%206.83594C7.77344%206.48438%207.1875%206.48438%206.83594%206.83594Z%22%20fill%3D%22currentColor%22%2F%3E%20%3C%2Fsvg%3E');
  -webkit-mask-image: url('data:image/svg+xml,%3Csvg%20width%3D%2220%22%20height%3D%2220%22%20viewBox%3D%220%200%2020%2020%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%20%3Cpath%20d%3D%22M10%2020C4.45312%2020%200%2015.5469%200%2010C0%204.49219%204.45312%200%2010%200C15.5078%200%2020%204.49219%2020%2010C20%2015.5469%2015.5078%2020%2010%2020ZM6.83594%206.83594C6.44531%207.22656%206.44531%207.8125%206.83594%208.16406L8.67188%2010L6.83594%2011.8359C6.44531%2012.2266%206.44531%2012.8125%206.83594%2013.1641C7.1875%2013.5547%207.77344%2013.5547%208.125%2013.1641L9.96094%2011.3281L11.7969%2013.1641C12.1875%2013.5547%2012.7734%2013.5547%2013.125%2013.1641C13.5156%2012.8125%2013.5156%2012.2266%2013.125%2011.8359L11.2891%2010L13.125%208.16406C13.5156%207.8125%2013.5156%207.22656%2013.125%206.83594C12.7734%206.48438%2012.1875%206.48438%2011.7969%206.83594L9.96094%208.67188L8.125%206.83594C7.77344%206.48438%207.1875%206.48438%206.83594%206.83594Z%22%20fill%3D%22currentColor%22%2F%3E%20%3C%2Fsvg%3E');
}

.mds-alert-content {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: var(--mds-spacing-md);
  min-inline-size: 0;
}

.mds-alert-text {
  display: flex;
  flex-direction: column;
  gap: var(--mds-spacing-xs);
}

.mds-alert-title {
  margin: 0;
  font-family: var(--mds-font-family-base);
  font-size: var(--mds-font-size-headings-6);
  font-weight: var(--mds-font-weight-medium);
  line-height: var(--mds-line-height-headings-6);
  color: inherit;
}

.mds-alert-message {
  margin: 0;
  font-family: var(--mds-font-family-base);
  font-size: var(--mds-font-size-paragraph-default);
  font-weight: var(--mds-font-weight-regular);
  line-height: var(--mds-line-height-paragraph-default);
  color: inherit;
}

.mds-alert-message a,
.mds-alert-custom a {
  color: var(--mds-text-link-primary-default);
  text-decoration: underline;
}

.mds-alert-custom {
  font-family: var(--mds-font-family-base);
  font-size: var(--mds-font-size-paragraph-default);
  font-weight: var(--mds-font-weight-regular);
  line-height: var(--mds-line-height-paragraph-default);
  color: inherit;
}

.mds-alert-actions {
  display: flex;
}

.mds-alert-dismiss {
  display: flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
}

.mds-alert-dismiss-button {
  color: inherit;
}
