/*
 * Globals
 */

/* Links */
a,
a:focus,
a:hover {
  color: #fff;
}

/* Custom default button */
.btn-secondary,
.btn-secondary:hover,
.btn-secondary:focus {
  color: #333;
  text-shadow: none; /* Prevent inheritance from `body` */
  background-color: #fff;
  border: .05rem solid #fff;
}

/*
 * Base structure
 */

html,
body {
  height: 100%;
  background-color: #333;
}

body {
  display: flex;
  background-color: #222;
  color: #fff;
  text-shadow: 0 .05rem .1rem rgba(0, 0, 0, .5);
  box-shadow: inset 0 0 5rem rgba(0, 0, 0, .5);
}

.cover-container {
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

/*
 * Header
 */
.masthead {
  padding: 1rem 1.5rem;
}

.masthead .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.masthead-brand {
  margin-bottom: 0;
  text-align: left;
}

.masthead-events {
  display: inline-block;
  margin-right: .4rem;
  line-height: 1;
  vertical-align: middle;
}

.masthead-events img {
  position: relative;
  top: -4px;
  width: auto;
  height: 32px;
  vertical-align: middle;
}

.nav-masthead {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-masthead .nav-link {
  padding: .25rem 0;
  font-weight: 700;
  color: rgba(255, 255, 255, .5);
  background-color: transparent;
  border-bottom: .25rem solid transparent;
}

.nav-masthead .nav-link:hover,
.nav-masthead .nav-link:focus {
  border-bottom-color: rgba(255, 255, 255, .25);
}

.nav-masthead .active {
  color: #fff;
  border-bottom-color: #fff;
}

.nav-masthead #nav-live {
  color: #ff0000;
}

.nav-masthead #nav-live:hover,
.nav-masthead #nav-live:focus {
  color: #ff0000;
  border-bottom-color: rgba(255, 0, 0, .5);
}

.nav-masthead #nav-live.active {
  color: #ff0000;
  border-bottom-color: #ff0000;
}

.nav-masthead .nav-link-hls {
  color: #ffb74d;
}

.nav-masthead .nav-link-hls:hover,
.nav-masthead .nav-link-hls:focus {
  color: #ffd08a;
  border-bottom-color: rgba(255, 183, 77, .5);
}

/*
 * Content
 */
main.inner.cover {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: none;
  padding: 0 1.5rem 1.5rem;
}

.live-layout {
  display: flex;
  flex: 1;
  align-items: stretch;
  gap: 1rem;
  width: 100%;
  min-width: 0;
}

.live-video {
  display: flex;
  flex-direction: column;
  flex: 4 1 0;
  min-width: 0;
}

.video-frame {
  position: relative;
  display: flex;
  flex: 1;
  min-height: 0;
}

.offline-panel {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 1rem;
  text-align: center;
  background-color: rgba(0, 0, 0, .72);
}

.offline-panel[hidden] {
  display: none;
}

.offline-title {
  font-size: 1.25rem;
  font-weight: 700;
}

.offline-note {
  font-size: .9rem;
  color: rgba(255, 255, 255, .65);
}

.rec-label {
  position: absolute;
  top: .5rem;
  right: .5rem;
  z-index: 2;
  padding: .15rem .5rem;
  font-size: 1rem;
  color: #fff;
  text-align: left;
  background-color: #198754;
  border-radius: 2px;
  pointer-events: none;
}

.live-layout-no-chat .live-video {
  flex: 1 1 100%;
}

.video-frame video-js,
.video-frame .video-js {
  width: 100%;
  height: 100%;
}

.video-js .vjs-live-control {
  color: #ff4d5e;
}

@media (min-width: 992px) {
  .live-video {
    display: flex;
    align-self: stretch;
  }

  .live-video .vjs-tech {
    object-fit: contain;
  }
}

.live-chat {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
}

/*
 * Recordings offcanvas
 */
.recordings-panel {
  color: #fff;
  background-color: #2b2b2b;
  border-left: 1px solid rgba(255, 255, 255, .15);
}

.recordings-panel .offcanvas-header {
  border-bottom: 1px solid rgba(255, 255, 255, .15);
}

.recordings-panel .btn-close {
  filter: invert(1) grayscale(1);
}

.recordings-panel .offcanvas-body {
  text-align: left;
}

.recording-links {
  padding-top: 0;
}

.recording-links a {
  display: block;
  white-space: nowrap;
  padding: 0 0 4px 0;
  outline: none;
}

.recording-links a.active {
  color: #f00;
}

.recording-empty {
  color: rgba(255, 255, 255, .6);
}

/*
 * Live page chat
 */
.chat-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 0;
  background-color: rgba(0, 0, 0, .2);
}

.chat-messages {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  text-align: left;
  padding: .75rem;
}

.chat-message {
  margin-bottom: .6rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.chat-message-head {
  font-size: .8rem;
  color: rgba(255, 255, 255, .6);
}

.chat-message-name {
  font-weight: 700;
  color: rgba(255, 255, 255, .85);
}

.chat-message-time {
  color: rgba(255, 255, 255, .45);
}

.chat-message-body {
  white-space: pre-wrap;
  word-wrap: break-word;
}

.chat-message-body a,
.chat-message-body a:hover,
.chat-message-body a:focus {
  color: inherit;
}

.chat-quote {
  margin: .3rem 0 .45rem;
  padding: .35rem .5rem;
  color: #d8d8d8;
  background-color: #3c3c3c;
  border-left: 3px solid #777;
  border-radius: 0;
  cursor: pointer;
}

.chat-quote:hover,
.chat-quote:focus {
  background-color: #454545;
}

.chat-quote-author {
  margin-bottom: .15rem;
  font-size: .75rem;
  font-weight: 700;
  color: #bdbdbd;
}

.chat-quote-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.chat-message-highlight {
  animation: chat-highlight 2s ease;
}

@keyframes chat-highlight {
  from { background-color: rgba(255, 255, 255, .18); }
  to { background-color: transparent; }
}

.chat-message.tombstone .chat-message-body {
  color: rgba(255, 255, 255, .4);
  font-size: .85em;
  font-style: italic;
}

.chat-new {
  align-self: center;
  margin: 0 0 .25rem;
  padding: .15rem .6rem;
  font-size: .8rem;
  color: #fff;
  background-color: rgba(0, 0, 0, .55);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 1rem;
  cursor: pointer;
}

.chat-new:hover,
.chat-new:focus {
  background-color: rgba(0, 0, 0, .75);
  border-color: rgba(255, 255, 255, .5);
}

.chat-status {
  min-height: 1.2em;
  padding: 0 .75rem;
  font-size: .8rem;
  color: rgba(255, 255, 255, .6);
  text-align: left;
}

.chat-login {
  padding: .5rem .75rem;
  font-size: .85rem;
  text-align: left;
  border-top: 1px solid rgba(255, 255, 255, .15);
}

.chat-composer {
  display: flex;
  gap: .5rem;
  align-items: flex-end;
  padding: .5rem .75rem .75rem;
  border-top: 1px solid rgba(255, 255, 255, .15);
}

.chat-text {
  flex: 1;
  min-height: 2.25rem;
  max-height: 7rem;
  padding: .4rem .5rem;
  color: #fff;
  background-color: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: .375rem;
  resize: none;
}

.chat-text:focus {
  outline: none;
  border-color: rgba(255, 255, 255, .45);
}

.chat-composer-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .25rem;
}

.chat-count {
  font-size: .7rem;
  color: rgba(255, 255, 255, .45);
}

@media (max-width: 991.98px) {
  .live-layout {
    flex-direction: column;
  }

  .live-video,
  .live-chat {
    flex: none;
    width: 100%;
  }

  .video-frame {
    aspect-ratio: 16 / 9;
  }

  .live-chat {
    position: static;
  }

  .chat-panel {
    position: static;
    height: 360px;
  }
}
