.component-container {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: start;
}

.component-row{
  flex-direction: row;
}

.component-container > *{
    display: block;
    background-color: var(--secondary-color);
    margin: 0px;
    padding-block: 0.2em;
    padding-inline: 0.5em;
}

.component-container > *{
    border-inline: 1px solid black;
}

.component-container:not(.component-row) > *:first-child{
    border-top: 1px solid black;
    border-top-left-radius: var(--corner-radius);
    border-top-right-radius: var(--corner-radius);
}

.component-container.component-row > *:first-child{
    border-left: 1px solid black;
    border-top-left-radius: var(--corner-radius);
    border-bottom-left-radius: var(--corner-radius);
}

.component-container:not(.component-row) > *:last-child{
    border-bottom: 1px solid black;
    border-bottom-left-radius: var(--corner-radius);
    border-bottom-right-radius: var(--corner-radius);
}

.component-container.component-row > *:last-child{
    border-right: 1px solid black;
    border-top-right-radius: var(--corner-radius);
    border-bottom-right-radius: var(--corner-radius);
}

.header, .footer{
    background-color: black;
    color: white;
    font-weight: bold;
    border-color: black;
    min-height: calc(var(--corner-radius) / 2);
    min-width: calc(var(--corner-radius) / 2);
}

.header .flat-button, .footer .flat-button{
    color: white;
}

@media screen and (min-width: 575px) {
  .component-container.widget {
    width: var(--component-width);
    min-width: 25vw;
  }
}
@media screen and (max-width: 574px) {
  .component-container.widget {
    width: 100%;
  }
}

/* buttons */
.button {
    padding: 0.3em 0.7em;
    display: inline-block;
    font-weight: bold;
    border: 1px solid;
    background-color: var(--primary-color);
    text-decoration: none;
    color: black;
    text-align: center;
    font-size: 1em;
  }

.button:not(.component-container > .button){
    border-radius: var(--corner-radius);
}

.button:hover {
    text-decoration: underline;
    background-color: var(--secondary-color);
}

.button:disabled {
    text-decoration: none;
    background-color: var(--dark-color);
    color: #0008;
}

.flat-button{
  border: 0;
  background-color: transparent;
}

/* forms */
form{
    display: flex;
    flex-direction: column;
}

form label{
    font-size: 0.9em;
}

/* avatar */

.avatar{
  width: 32px;
  height: 32px;
}

.avatar *{
  border-radius: 50%;
  height: 100%;
  width: 100%;
}

/* icons */
.icon {
  height: 1.1em;
  margin-inline: 2px;
  vertical-align: text-top;
}
