@import "../../variables";
@import "../../../../../../vendor/joomla-custom-elements/css/joomla-alert";
// The following is a restyle for the system alerts
#system-message-container joomla-alert {
position: relative;
display: flex;
width: 100%;
min-width: 16rem;
padding: 0;
margin-bottom: 1rem;
color: var(--alert-accent-color, var(--template-bg-dark));
background-color: var(--alert-bg-color, var(--white));
border: 1px solid var(--alert-accent-color, var(--template-bg-dark));
border-radius: .25rem;
transition: opacity .15s linear;
.alert-heading {
display: flex;
flex-direction: column;
justify-content: center;
padding: .8rem;
color: var(--white);
background: var(--alert-accent-color, var(--template-bg-dark));
align-content: center;
.message::before,
.success::before {
display: inline-block;
width: 1em;
height: 1em;
content: "";
background-image: url('data:image/svg+xml;utf8,');
background-size: 100%;
}
.notice::before,
.info::before {
display: inline-block;
width: 1em;
height: 1em;
content: "";
background-image: url('data:image/svg+xml;utf8,');
background-size: 100%;
}
.warning::before {
display: inline-block;
width: 1em;
height: 1em;
content: "";
background-image: url('data:image/svg+xml;utf8,');
background-size: 100%;
}
.error::before,
.danger::before {
display: inline-block;
width: 1em;
height: 1em;
content: "";
background-image: url('data:image/svg+xml;utf8,');
background-size: 100%;
}
}
.alert-wrapper {
width: 100%;
}
.alert-link {
color: var(--template-link-color);
text-decoration: underline;
}
&[type="success"],
&[type="message"] {
--alert-accent-color: #{$state-success-text};
--alert-bg-color: #{$state-success-bg};
}
&[type="info"],
&[type="notice"] {
--alert-accent-color: #{$state-info-text};
--alert-bg-color: #{$state-info-bg};
}
&[type="warning"] {
.joomla-alert--close {
color: #{$state-warning-text};
}
color: #{$state-warning-text};
--alert-accent-color: #{$warning};
--alert-bg-color: #{$state-warning-bg};
}
&[type="error"],
&[type="danger"] {
--alert-accent-color: #{$state-danger-text};
--alert-bg-color: #{$state-danger-bg};
}
.joomla-alert--close,
.joomla-alert-button--close {
position: absolute;
top: 0;
inset-inline-end: 0;
padding: .75rem .8rem;
font-size: 2rem;
line-height: 1rem;
color: var(--alert-accent-color);
background: none;
border: 0;
opacity: 1;
&:hover,
&:focus {
text-decoration: none;
cursor: pointer;
opacity: .75;
}
}
div {
font-size: 1rem;
.alert-message {
padding: .15rem .3rem;
padding-inline-end: 2rem;
margin: .5rem;
}
.alert-message:not(:first-of-type) {
border-top: 1px solid var(--alert-accent-color);
}
}
}