/* react-datetime calendar overrides */
.rdt {
  position: relative;
}

.rdt input {
  width: 100%;
  min-height: 44px;
  padding: 0.625rem 1rem;
  background-color: var(--color-input-bg);
  border: 1px solid var(--color-input-border);
  border-radius: 0.5rem;
  color: var(--color-text-primary);
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.rdt input:focus {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-brand-primary) 20%, transparent);
}

.rdtPicker {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 9999 !important;
  min-width: 280px;
  padding: 12px;
  background-color: var(--color-surface-primary) !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.rdtPicker table {
  width: 100%;
  border-collapse: collapse;
}

.rdtPicker thead th {
  color: var(--color-text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 8px 4px;
  text-align: center;
}

.rdtPicker thead tr:first-of-type th {
  padding: 4px 8px 12px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-primary);
  text-transform: none;
}

.rdtPicker thead tr:first-of-type th:hover {
  background: var(--color-surface-secondary) !important;
  border-radius: 6px;
  cursor: pointer;
}

.rdtPicker td {
  text-align: center;
  padding: 2px;
}

.rdtPicker td.rdtDay,
.rdtPicker td.rdtHour,
.rdtPicker td.rdtMinute,
.rdtPicker td.rdtSecond {
  color: var(--color-text-primary);
  font-size: 0.8125rem;
  padding: 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.rdtPicker td.rdtDay:hover,
.rdtPicker td.rdtHour:hover,
.rdtPicker td.rdtMinute:hover,
.rdtPicker td.rdtSecond:hover,
.rdtPicker .rdtTimeToggle:hover {
  background: var(--color-surface-secondary) !important;
}

.rdtPicker td.rdtActive,
.rdtPicker td.rdtActive:hover {
  background: var(--color-brand-primary) !important;
  color: #fff !important;
  border-radius: 8px;
}

.rdtPicker td.rdtToday {
  position: relative;
}

.rdtPicker td.rdtToday::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-brand-primary);
}

.rdtPicker td.rdtOld,
.rdtPicker td.rdtNew {
  color: var(--color-text-tertiary);
}

.rdtPicker td.rdtDisabled,
.rdtPicker td.rdtDisabled:hover {
  color: var(--color-text-tertiary);
  opacity: 0.4;
  cursor: not-allowed;
  background: transparent !important;
}

.rdtPicker .rdtTimeToggle {
  color: var(--color-text-primary);
  font-size: 0.875rem;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
}

.rdtPicker th.rdtPrev,
.rdtPicker th.rdtNext {
  font-size: 1.25rem;
  cursor: pointer;
  border-radius: 8px;
  width: 32px;
  line-height: 32px;
  color: var(--color-text-secondary);
}

.rdtPicker th.rdtPrev:hover,
.rdtPicker th.rdtNext:hover {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
}

.rdtPicker th.rdtSwitch {
  cursor: pointer;
  border-radius: 6px;
}

td.rdtMonth,
td.rdtYear {
  color: var(--color-text-primary);
  font-size: 0.8125rem;
  padding: 12px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
}

td.rdtMonth:hover,
td.rdtYear:hover {
  background: var(--color-surface-secondary) !important;
}

td.rdtMonth.rdtActive,
td.rdtYear.rdtActive {
  background: var(--color-brand-primary) !important;
  color: #fff !important;
}

/* Time picker */
.rdtCounter {
  display: inline-block;
  width: 40px;
  text-align: center;
}

.rdtCounter .rdtBtn {
  color: var(--color-text-secondary);
  cursor: pointer;
  display: block;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.15s;
}

.rdtCounter .rdtBtn:hover {
  background: var(--color-surface-secondary);
  color: var(--color-text-primary);
}

.rdtCounter .rdtCount {
  color: var(--color-text-primary);
  font-size: 1rem;
  font-weight: 500;
  padding: 4px 0;
}

.rdtMilli {
  display: none;
}

/* Live Streaming Layout */
.videoWrap {
  display: flex !important;
  flex-direction: row !important;
  gap: 0 !important;
  height: calc(100vh - 120px) !important;
  overflow: hidden !important;
}
.videoWrap.nochat {
  height: calc(100vh - 120px) !important;
}
.videoWrap > div:first-child {
  flex: 1 !important;
  min-width: 0 !important;
  position: relative !important;
  background: #000 !important;
  border-radius: 0.5rem !important;
  overflow: hidden !important;
  order: 2 !important;
}
.videoWrap > div:first-child #video_container,
.videoWrap > div:first-child #video,
.videoWrap > div:first-child #local_stream {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.videoWrap > .flex.flex-col,
.videoWrap > div:last-child {
  width: 320px !important;
  flex-shrink: 0 !important;
  overflow: hidden !important;
  order: 1 !important;
}
.Lschat-wrapper {
  display: flex;
  flex-direction: row;
  height: 100%;
}
.Lschat-side-menu {
  display: flex;
  flex-direction: column;
  background: var(--color-surface-secondary);
  padding: 0.5rem 0;
  border-inline-end: 1px solid var(--color-border);
}
.Lschat-contentWrap {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
}
.livechatBox {
  height: 100%;
  display: flex;
  flex-direction: column;
}
.lsBanner-wrap {
  padding: 0.75rem;
}
.lsVideoTop {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  z-index: 20;
  pointer-events: none;
}
.lsVideoTop > * {
  pointer-events: auto;
}
.liveTimeWrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.liveText {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: #ef4444;
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
}
.liveTime {
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
}
.participentNo {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 9999px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: auto;
}
.ls_footer {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
}
.ls_footerOption {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.ls_footerOption > div,
.ls_footerOption > .icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 9999px;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(8px);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s;
}
.ls_footerOption > div:hover,
.ls_footerOption > .icon:hover {
  background: rgba(0,0,0,0.8);
}
.ls_footerOption .endBtn {
  width: auto;
  padding: 0 1.5rem;
}
.ls_footerOption .endBtn button {
  background: #ef4444;
  color: #fff;
  border: none;
  border-radius: 9999px;
  padding: 0.5rem 1.25rem;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
}
.video-placeholder {
  width: 100%;
  height: 100%;
  position: relative;
  background: #000;
}
.centeredForm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 400px;
}
.finishedStream {
  text-align: center;
  color: #fff;
  padding: 2rem;
}
.finishedStream .head {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
}
.finishedStream .thumbStream {
  position: relative;
  width: 120px;
  height: 120px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
}
.finishedStream .thumbStream img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.finishedStream .foot {
  margin-top: 1rem;
}
@media (max-width: 1024px) {
  .videoWrap {
    flex-direction: column;
    height: auto;
  }
  .videoWrap > div:first-child {
    aspect-ratio: 16/9;
  }
  .videoWrap > .flex.flex-col {
    width: 100%;
  }
  .Lschat-wrapper {
    flex-direction: column;
  }
}
