.card-config {
  width: 100%;
  display: flex;
  gap: 12px;
  flex-direction: column;
  border: 1px solid var(--divider-color, rgba(0, 0, 0, 0.87));
  justify-content: space-evenly;
  margin: 0;
  box-sizing: border-box;
  padding: 8px;
}

.header-container {
  flex: 1 1 0%;
  display: flex;
  border-bottom: inherit;
  min-height: 48px;
  align-items: center;
  overflow: hidden;
  font-weight: 500;
  outline: 0px;
}

.header-title {
  flex: 1 1 0%;
  display: flex;
  flex-direction: column;
}

.header-title>span.secondary {
  display: block;
  color: var(--secondary-text-color);
  font-size: 12px;
}

.search-button {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.switches {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(45%, 1fr));
  grid-gap: 0.5rem 1.4rem;
  padding: 0.5rem;
}


.comboboxes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}

ha-textfield {
  display: block;
  width: 100%;
}


ha-select {
  width: 100%;
}

.sub-config-wrapper {
  display: flex;
  flex-direction: column;
  gap: inherit;
}

.sub-config-content {
  display: grid;
  grid-gap: 8px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: center;
}

.sub-config-content>*:nth-last-child(1):nth-child(odd) {
  grid-column: span 2;
}

.sub-config-type {
  display: flex;
  padding: 8px;
  justify-content: space-between;
  align-items: stretch;
  flex-direction: row;
  flex-wrap: wrap;
}

.sub-config-type .title {
  font-weight: 500;
  text-transform: uppercase;
}

.sub-config-type .desc {
  font-weight: 400;
}

.right-icon {
  padding-inline: 0.5rem;
  cursor: pointer;
}

.search-form {
  display: flex;
  gap: 8px;
  align-items: center;
  width: 100%;
}

ul.search-results {
  list-style-type: none;
  padding-left: 0;
  padding-right: 0;
  margin-top: 0;
  margin-bottom: 0;
  max-height: 250px;
  overflow-y: auto;
  background-color: var(--divider-color);
}

li.search-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px;
  cursor: pointer;
  border-bottom: 1px solid var(--divider-color);
  min-height: 40px;
}

li.search-item:nth-child(odd) {
  background-color: var(--secondary-background-color);
}

li.search-item:hover {
  background-color: var(--divider-color);
}

li.search-item:last-child {
  border-bottom: none;
}



.location-item {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: stretch;
  padding-inline: 8px;
}

.location-item .primary {
  font-weight: 500;
}

.location-item .secondary {
  color: var(--secondary-text-color);
  text-transform: capitalize;
}


img.bg-thumbnail {
  width: 70%;
  height: auto;
  -o-object-fit: cover;
  object-fit: cover;
  border-radius: 12px;
  aspect-ratio: 3;
}

.custom-background-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 1rem;
  text-wrap: nowrap;
}

.file-input {
  display: none;
}

.file-upload {
  cursor: pointer;
  display: inline-block;
  padding: 0.5rem 1rem;
  border: 1px solid var(--divider-color);
  border-radius: 8px;
  color: var(--primary-text-color);
}

.file-upload:hover {
  background-color: var(--primary-color);
}

.radios-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.version {
  color: var(--secondary-text-color);
  justify-content: space-around;
  align-items: stretch;
  display: flex;
  flex-direction: column;
  gap: 8px;
  /* position: absolute; */
  bottom: auto;
  padding: 1rem 0;
}

.version .update {
  color: var(--accent-color);
  opacity: 0.7;
}

#toast {
  visibility: hidden;
  opacity: 0;
  max-height: 0;
}

#toast.show {
  visibility: visible;
  opacity: 1;
  max-height: 100px;
  animation: fadeIn 0.3s ease-in-out forwards;
  display: flex;
  justify-content: center;
  align-items: center;
}

ha-alert {
  width: 100%;
}

ha-alert>.alert-icon {
  display: flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding-inline: 0.5rem;
}

.vic-tabbar>mwc-tab[active] {
  background-color: var(--secondary-background-color) !important;
}