/* =========================================
   samples-v5 Common Styles
   ========================================= */

/* Reset */
* {
  margin: 0;
  padding: 0;
}

/* Layout */
main {
  width: 60%;
  /* min-width: 840px; */
  margin: 25px auto;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  background-color: white;
  padding: 20px;
  border-radius: 32px;
  box-shadow: 0 8px 24px rgba(66, 110, 175, 0.06),
  0 6px 8px rgba(32, 77, 141, 0.08);
}

body {
  background-image: url("https://web.sdk.qcloud.com/trtc/webrtc/v5/demo/samples/assets/background.png");
}

/* Typography */
h1,
h2 {
  text-align: center;
  font-family: "Oxygen";
  margin-bottom: 0.8rem;
}

h3 {
  font-family: "Oxygen";
  margin-bottom: 18px;
}

@media screen and (max-width: 768px) {
  h1 {
    font-size: 1.5rem;
  }
  h2 {
    font-size: 1rem;
  }
}

/* Utility */
.note {
  color: #084298;
  font-family: "Oxygen";
}

.warning {
  display: block;
  color: red;
  font-family: "Oxygen";
  margin: 3px 0;
}

/* Feature Container */
.feature-container {
  width: 100%;
}

/* Section Cards */
section {
  padding: 1rem;
  background-image: linear-gradient(
    rgb(237, 242, 252),
    rgb(255, 255, 255) 66.15%
  );
  border-radius: 16px;
  margin-bottom: 1rem;
  box-shadow: 0 8px 24px rgba(66, 110, 175, 0.06),
    0 6px 8px rgba(32, 77, 141, 0.08);
}

section:not(:last-child) {
  overflow: auto;
}

/* Video Views */
.video-container {
  width: 100%;
  display: flex;
  justify-content: center;
  max-width: 100%;
  overflow: hidden;
}

.video-sub-container {
  width: 50%;
  padding: 8px;
  max-width: 100%;
  box-sizing: border-box;
}

.video-view {
  aspect-ratio: 16 / 9;
  background-color: black;
  max-width: 100%;
  overflow: hidden;
}

.video-view video {
  vertical-align: top;
  max-width: 100%;
  height: auto;
}

/* Buttons */
.btn-list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
}

.btn {
  flex-shrink: 0;
  background-color: #0d6efd;
  padding: 0.5rem;
  border: 1px solid #0d6efd;
  border-radius: 8px;
  margin-bottom: 3px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn:not(:last-child) {
  margin-right: 16px;
}

.btn:hover {
  background-color: #144fb6;
  border: 1px solid #144fb6;
  transition: all 0.2s ease-out;
}

.btn:disabled {
  background-color: rgb(182, 187, 198);
  border: 1px solid transparent;
  cursor: not-allowed;
}

.btn-text {
  font-size: 0.85rem;
  color: #ffffff;
  line-height: 1;
  vertical-align: middle;
}

/* Invite Link */
.invite-input {
  border: 1px solid #d5d5d5;
  border-left: none;
  border-radius: 0 6px 6px 0;
  line-height: 30px;
  height: 32px;
  font-size: 12px;
  width: 100%;
  box-sizing: border-box;
  padding: 1px 6px;
}

.copy {
  display: flex;
  align-items: center;
  padding-top: 0.8rem;
  gap: 0;
}

.invite-actions {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.invite-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  margin: 0;
  color: #555;
  cursor: pointer;
  background-color: #f8f9fa;
  border: 1px solid #d5d5d5;
  border-radius: 0;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.invite-action-btn:first-child {
  border-radius: 6px 0 0 6px;
}

.invite-action-btn:last-child {
  border-radius: 0;
  border-left: none;
}

.invite-action-btn:hover {
  background-color: #e9ecef;
  color: #0d6efd;
}

.invite-action-btn:active {
  background-color: #dee2e6;
}

/* Tooltip */
.tooltipped {
  position: relative;
}

.tooltipped:after {
  position: absolute;
  z-index: 1000000;
  display: none;
  padding: 5px 8px;
  font: normal normal 11px/1.5 Helvetica, arial, nimbussansl, liberationsans,
    freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
  color: #fff;
  text-align: center;
  text-decoration: none;
  text-shadow: none;
  text-transform: none;
  letter-spacing: normal;
  word-wrap: break-word;
  white-space: pre;
  pointer-events: none;
  content: attr(aria-label);
  background: rgba(0, 0, 0, 0.8);
  border-radius: 3px;
  -webkit-font-smoothing: subpixel-antialiased;
}

.tooltipped:before {
  position: absolute;
  z-index: 1000001;
  display: none;
  width: 0;
  height: 0;
  color: rgba(0, 0, 0, 0.8);
  pointer-events: none;
  content: "";
}

.tooltipped:hover:before,
.tooltipped:hover:after,
.tooltipped:active:before,
.tooltipped:active:after,
.tooltipped:focus:before,
.tooltipped:focus:after {
  display: inline-block;
  text-decoration: none;
}

.tooltipped-s:after {
  top: 100%;
  right: 50%;
  margin-top: 5px;
}

.tooltipped-s:before {
  top: auto;
  right: 50%;
  bottom: -5px;
  margin-right: -5px;
  border-bottom-color: rgba(0, 0, 0, 0.8);
}

.tooltipped-s:after {
  transform: translateX(50%);
}

/* Select (common base) */
select {
  font-size: 0.85rem;
  color: #4f586b;
  border-radius: 8px;
  border: 1px solid #ced4da;
  padding: 3px;
}

/* Responsive */
@media screen and (max-width: 1024px) {
  .video-sub-container {
    width: 45%;
  }
}

@media screen and (max-width: 768px) {
  .feature-container {
    width: 100%;
  }

  .video-sub-container {
    width: 100%;
  }

  .video-container {
    flex-direction: column;
    align-items: center;
  }

  .btn-list {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    margin-right: 0;
  }
    
  .btn:not(:last-child) {
      margin-right: 0px;
  }
}

/* Iframe Mode */
body.in-iframe {
  background-image: none !important;
}

body.in-iframe header-nav {
  display: none;
}

body.in-iframe main {
  width: 100%;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  overflow-x: hidden;
}

body.in-iframe {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

body.in-iframe::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

html:has(body.in-iframe) {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

html:has(body.in-iframe)::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

@media screen and (min-width: 1024px) {
  main {
    width: 90%;
    max-width: 1220px;
  }

  .feature-container {
    min-width: 800px;
    max-width: 1180px;
  }
}

@media screen and (max-width: 1024px) {
  main {
    width: 90%;
  }
}
