/********************************************************************************
 * Copyright (C) 2018 Ericsson and others.
 *
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v. 2.0 which is available at
 * http://www.eclipse.org/legal/epl-2.0.
 *
 * This Source Code may also be made available under the following Secondary
 * Licenses when the conditions for such availability set forth in the Eclipse
 * Public License v. 2.0 are satisfied: GNU General Public License, version 2
 * with the GNU Classpath Exception which is available at
 * https://www.gnu.org/software/classpath/license.html.
 *
 * SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-only WITH Classpath-exception-2.0
 ********************************************************************************/

/* message container */
.theia-alert-message-container {
  padding-block: calc(var(--theia-ui-padding) * 2);
  padding-inline: calc(var(--theia-ui-padding) * 3) max(var(--theia-scrollbar-width), var(--theia-ui-padding));
  flex-shrink: 0;
}

.theia-alert-message-container .theia-message-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--theia-ui-padding);
}

.theia-alert-message-container .theia-message-header,
.theia-alert-message-container .theia-message-content {
  text-overflow: ellipsis;
  overflow: hidden;
}

/* base alert message */
.theia-alert {
  display: grid;
  gap: var(--theia-ui-padding);
  border-radius: 4px;
  padding: calc(var(--theia-ui-padding) * 2);
  border: var(--theia-border-width) solid var(--theia-inputValidation-infoBorder);
  line-height: 16px;
}

/* information message */
.theia-info-alert {
  background-color: var(--theia-inputValidation-infoBackground);
  color: var(--theia-inputValidation-infoForeground);
}

/* warning message */
.theia-warning-alert {
  border-color: var(--theia-inputValidation-warningBorder);
  background-color: var(--theia-inputValidation-warningBackground);
  color: var(--theia-inputValidation-warningForeground);
}

/* error message */
.theia-error-alert {
  border-color: var(--theia-inputValidation-errorBorder);
  background-color: var(--theia-inputValidation-errorBackground);
  color: var(--theia-inputValidation-errorForeground);
}
