.meeting-header.has-header-branding {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: #111827;
  color: #fff;
  border-bottom-color: #ffffff24;
  min-height: 92px;
}
.meeting-header.has-header-branding.branding-comfortable {
  min-height: 136px;
}
.meeting-header.has-header-branding.branding-banner {
  min-height: 190px;
}
.meeting-header.has-header-branding > .header-branding-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -2;
  pointer-events: none;
}
.meeting-header.has-header-branding::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(5, 12, 25, var(--header-dim, 0.6));
  pointer-events: none;
}
.meeting-header.has-header-branding .brand,
.meeting-header.has-header-branding h2,
.meeting-header.has-header-branding .connection {
  color: #fff;
}
.meeting-header.has-header-branding button {
  background: #111827df;
  border-color: #ffffff40;
  color: #fff;
}
.header-branding-motion {
  position: absolute;
  bottom: 5px;
  right: 12px;
  font-size: 11px;
  padding: 4px 7px;
  min-height: 28px;
}
.branding-settings {
  margin-top: 28px;
}
.branding-settings .branding-preview {
  position: relative;
  min-height: 112px;
  overflow: hidden;
  border-radius: 16px;
  background: var(--surface, #172033);
  margin: 16px 0;
  display: grid;
  place-items: center;
}
.branding-preview img,
.branding-preview video {
  width: 100%;
  max-height: 190px;
  object-fit: cover;
}
.branding-settings .branding-status {
  min-height: 1.6em;
}
.branding-settings input[type="file"] {
  max-width: 100%;
  padding: 10px;
}
.branding-settings .actions {
  flex-wrap: wrap;
}
.branding-preview .branding-preview-empty {
  padding: 24px;
  color: var(--muted, #93a4bb);
}
@media (max-width: 600px) {
  .meeting-header.has-header-branding {
    min-height: 82px;
  }
  .meeting-header.has-header-branding.branding-comfortable {
    min-height: 112px;
  }
  .meeting-header.has-header-branding.branding-banner {
    min-height: 152px;
  }
  .branding-settings .actions > * {
    flex: 1;
    min-width: 120px;
  }
}
@media (max-height: 550px) and (orientation: landscape) {
  .meeting-header.has-header-branding.branding-comfortable,
  .meeting-header.has-header-branding.branding-banner {
    min-height: 74px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .header-branding-media {
    animation: none !important;
    transition: none !important;
  }
}

/* The room image is decorative and stays below every video and control. */
.meeting.has-room-background {
  isolation: isolate;
  background: #0b1220;
}
.meeting > .room-background-media {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  object-fit: cover;
  pointer-events: none;
}
.meeting.has-room-background::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(5, 12, 25, var(--room-dim, 0.65));
  pointer-events: none;
}
.meeting.has-room-background .meeting-controls {
  background: transparent;
}
.room-background-motion {
  min-height: 30px;
  padding: 5px 9px;
  font-size: 11px;
}
.branding-settings {
  margin-top: 0;
}
.branding-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin-top: 24px;
}
.branding-card {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
}
.branding-card-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.branding-card-heading h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}
.branding-card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
.branding-number {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  height: 34px;
  border-radius: 10px;
  color: var(--accent);
  background: var(--surface);
  font-weight: 700;
  font-size: 0.8rem;
}
.branding-card .branding-preview {
  width: 100%;
  min-width: 0;
  isolation: isolate;
  aspect-ratio: 16/6;
  min-height: 130px;
  background: #101a2d;
  color: white;
}
.branding-card .preview-background {
  aspect-ratio: 16/9;
}
.branding-card .branding-preview > img,
.branding-card .branding-preview > video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  z-index: 0;
}
.branding-card .branding-preview::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: rgba(5, 12, 25, var(--preview-dim, 0.65));
  pointer-events: none;
}
.branding-preview-label {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 12px;
  color: #fff;
  font-weight: 650;
  text-shadow: 0 1px 3px #000;
  pointer-events: none;
}
.branding-preview-empty {
  z-index: 2;
}
.branding-card .branding-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}
.branding-card input,
.branding-card select {
  width: 100%;
  min-width: 0;
}
.branding-card input[type="range"] {
  padding-inline: 0;
}
.branding-card small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
  font-weight: 400;
}
.branding-dim-value {
  font-weight: 400;
  color: var(--muted);
}
.branding-card [hidden] {
  display: none !important;
}
.branding-card .branding-status {
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}
.branding-upload-info {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.branding-upload-info p {
  margin: 0;
}
.branding-upload-info p + p,
.branding-upload-info ul + p {
  margin-top: 8px;
}
.branding-upload-info ul {
  margin: 8px 0;
  padding-left: 20px;
}
.branding-upload-info.has-issues {
  border-color: var(--accent);
}
.branding-card .actions {
  gap: 8px;
}
.branding-card .actions button {
  flex: 1 1 120px;
  padding: 10px;
}
#meeting-appearance-settings .branding-cards {
  grid-template-columns: minmax(0, 1fr);
}
#meeting-appearance-settings .branding-card {
  padding: 16px;
}
#header-branding-settings {
  margin-top: 28px;
}
@media (max-width: 1000px) {
  .branding-cards {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .branding-card {
    padding: 16px;
  }
  .room-background-motion {
    position: absolute;
    left: 12px;
    bottom: 5px;
    font-size: 10px;
    background: var(--panel);
  }
  .meeting-header:has(.room-background-motion) {
    position: relative;
    padding-bottom: 32px;
  }
  .header-branding-motion {
    font-size: 10px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .room-background-media {
    animation: none !important;
    transition: none !important;
  }
}
