/* ==========================================================================
   Schedule Modal Styles
   Based on Modal.tsx + ModalDetail.tsx from src/2025/components/
   ========================================================================== */

/* Modal Overlay */
.schedule-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: calc(var(--vh, 1vh) * 100);
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  justify-content: center;
  align-items: baseline !important;
  z-index: 1000;
  overflow-y: scroll;
  scrollbar-width: thin;
  scrollbar-color: #808080 #fff;
}

.schedule-modal::-webkit-scrollbar {
  width: 8px;
}

.schedule-modal::-webkit-scrollbar-track {
  background: #fff;
}

.schedule-modal::-webkit-scrollbar-thumb {
  background-color: #808080;
  border-radius: 4px;
}

/* Modal Container (wrapper for close button + content) */
.schedule-modal__container {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  max-width: 884px;
  align-self: center;
  margin: auto;
  padding-bottom: 20px;
}

.schedule-modal__close-btn button {
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.schedule-modal__close-btn i {
  display: block;
  width: 100%;
  height: 100%;
}

.schedule-modal__close-btn svg {
  display: block;
  width: 100%;
  height: 100%;
}

/* Modal Content */
.schedule-modal__content {
  max-width: 884px;
  width: 100%;
  height: auto;
  max-height: unset;
  background: #fff;
  overflow-y: visible;
  padding: 64px 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  border-radius: 18px;
}

/* Modal Top (Badge + Time/Location) */
.schedule-modal__top {
  width: 100%;
  display: flex;
  align-items: center;
}

/* Badge */
.schedule-modal__badge {
  display: inline-block;
  margin-right: 16px;
  padding: 6px 12px;
  border-radius: 5px;
  background: #000;
  color: #fff;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
}

/* Badge Variants */
.schedule-modal__badge--keynote {
  background: #000;
  color: #fff;
}

.schedule-modal__badge--session,
.schedule-modal__badge--track-a,
.schedule-modal__badge--track-b,
.schedule-modal__badge--track-c {
  background: #c00000;
  color: #fff;
}

.schedule-modal__badge--handson {
  background: #2350ff;
  color: #fff;
}

.schedule-modal__badge--partners {
  background: #f7c5cc;
  color: #c00000;
}

/* Top Right (Time + Location) */
.schedule-modal__top-right {
  display: flex;
  flex: 1;
}

/* Top Info (Time or Location) */
.schedule-modal__top-info {
  display: flex;
  align-items: center;
}

.schedule-modal__top-info--last::before {
  content: '|';
  margin: 0 10px;
  color: #000;
}

.schedule-modal__top-info-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.schedule-modal__top-info-text {
  display: inline-block;
  margin-left: 2px;
  color: #000;
  font-family: '42dotSansOTF', sans-serif;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
}

/* Title Box */
.schedule-modal__title-box {
  width: 100%;
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}

.schedule-modal__title {
  color: #000;
  font-size: 30px;
  font-weight: 700;
  line-height: 1.4;
}

/* Detail Section */
.schedule-modal__detail {
  width: 100%;
  margin: 40px 0;
  padding: 60px 0;
  border-top: 1px solid #c8c8c8;
  border-bottom: 1px solid #c8c8c8;
}

/* Video */
.schedule-modal__video {
  position: relative;
  padding-bottom: 56.25%;
  margin-bottom: 40px;
}

.schedule-modal__video .video_iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Detail Title */
.schedule-modal__detail-title {
  display: block;
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #000;
}

.schedule-modal__detail-title:not(:first-child) {
  margin-top: 24px;
}

.schedule-modal__detail-title a {
  color: #000;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Detail Description */
.schedule-modal__detail-desc {
  font-family: '42dotSansOTF', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #808080;
  /* white-space: pre-line; */
}

/* Bottom (Presenters + Social) */
.schedule-modal__bottom {
  width: 100%;
  display: flex;
  justify-content: space-between;
}

/* Presenter Box */
.schedule-modal__presenter-box {
  display: flex;
  flex-direction: column;
  gap: 15px 0;
}

.schedule-modal__presenter-item {
  display: flex;
  align-items: center;
  gap: 0 20px;
}

.schedule-modal__presenter-info {
  font-family: '42dotSansOTF', sans-serif;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
  color: #808080;
}

.schedule-modal__presenter-name {
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  color: #000;
}

.schedule-modal__presenter-position {
  display: inline-block;
  margin-left: 13px;
}

.schedule-modal__presenter-line {
  display: inline-block;
  margin: 0 10px;
  font-size: 14px;
}

.schedule-modal__presenter-intro {
  display: block;
  margin-top: 6px;
}

/* Social Share Buttons */
.schedule-modal__social {
  display: flex;
  align-self: center;
  gap: 0 8px;
}

/* If multiple presenters, align to flex-end (set via JS) */
.schedule-modal__social--multiple-presenters {
  align-self: flex-end;
}

.schedule-modal__social-icon {
  display: inline-block;
  cursor: pointer;
  width: 42px;
  height: 42px;
}

.schedule-modal__social-icon svg {
  overflow: visible;
  display: block;
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Desktop Responsive (min-width: 1024px)
   ========================================================================== */
@media screen and (min-width: 1024px) {
  .schedule-modal__close-btn {
    position: sticky;
    top: 0;
    right: 26px;
    transform: translate(calc(100% + 20px), 100%);
  }
}

/* ==========================================================================
   Tablet Responsive (768px - 1023px)
   ========================================================================== */
@media screen and (max-width: 1023px) and (min-width: 768px) {
  .schedule-modal {
    background: #00000060;
    align-items: center;
  }

  .schedule-modal__close-btn {
    /* Flex item - no position needed, just margin for spacing */
    /* 6vw because container already has padding-top: 20vw (calc(20/1200*100) + calc(6/1200*100) = calc(26/1200*100)) */
    margin-top: calc(6 / 1200 * 100vw);
    margin-right: calc(26 / 1200 * 100vw);
  }
}

/* ==========================================================================
   Tablet Responsive (768px - 1200px) - Common Styles
   ========================================================================== */
@media screen and (max-width: 1200px) and (min-width: 768px) {
  .schedule-modal__container {
    padding-bottom: calc(20 / 1200 * 100vw);
    gap: calc(12 / 1200 * 100vw);
  }

  .schedule-modal__content {
    min-width: calc(884 / 1200 * 100vw);
    padding: calc(62 / 1200 * 100vw) calc(26 / 1200 * 100vw)
      calc(54 / 1200 * 100vw);
  }

  .schedule-modal__badge {
    margin-right: calc(16 / 1200 * 100vw);
    padding: calc(6 / 1200 * 100vw) calc(12 / 1200 * 100vw);
    border-radius: calc(5 / 1200 * 100vw);
    font-size: calc(14 / 1200 * 100vw);
  }

  .schedule-modal__top-info--last::before {
    margin: 0 calc(10 / 1200 * 100vw);
  }

  .schedule-modal__top-info-icon {
    width: calc(20 / 1200 * 100vw);
    height: calc(20 / 1200 * 100vw);
  }

  .schedule-modal__top-info-text {
    margin-left: calc(2 / 1200 * 100vw);
    font-size: calc(17 / 1200 * 100vw);
  }

  .schedule-modal__title-box {
    margin-top: calc(20 / 1200 * 100vw);
  }

  .schedule-modal__title {
    font-size: calc(30 / 1200 * 100vw);
  }

  .schedule-modal__detail {
    margin: calc(40 / 1200 * 100vw) 0;
    padding: calc(60 / 1200 * 100vw) 0;
  }

  .schedule-modal__video {
    margin-bottom: calc(40 / 1200 * 100vw);
  }

  .schedule-modal__detail-title {
    margin-bottom: calc(8 / 1200 * 100vw);
    font-size: calc(18 / 1200 * 100vw);
  }

  .schedule-modal__detail-title:not(:first-child) {
    margin-top: calc(24 / 1200 * 100vw);
  }

  .schedule-modal__detail-title a {
    gap: calc(4 / 1200 * 100vw);
  }

  .schedule-modal__detail-title a i {
    width: calc(20 / 1200 * 100vw);
    height: calc(20 / 1200 * 100vw);
  }

  .schedule-modal__detail-desc {
    font-size: calc(16 / 1200 * 100vw);
  }

  .schedule-modal__presenter-box {
    gap: calc(15 / 1200 * 100vw) 0;
  }

  .schedule-modal__presenter-item {
    gap: 0 calc(20 / 1200 * 100vw);
  }

  .schedule-modal__presenter-info {
    font-size: calc(16 / 1200 * 100vw);
  }

  .schedule-modal__presenter-name {
    font-size: calc(18 / 1200 * 100vw);
  }

  .schedule-modal__presenter-position {
    margin-left: calc(13 / 1200 * 100vw);
  }

  .schedule-modal__presenter-line {
    margin: 0 calc(10 / 1200 * 100vw);
    font-size: calc(14 / 1200 * 100vw);
  }

  .schedule-modal__presenter-intro {
    margin-top: calc(6 / 1200 * 100vw);
  }

  .schedule-modal__social {
    gap: 0 calc(8 / 1200 * 100vw);
  }

  /* If multiple presenters, add margin-bottom (set via JS) */
  .schedule-modal__social--multiple-presenters {
    margin-bottom: calc(20 / 1200 * 100vw);
  }

  .schedule-modal__social-icon {
    width: calc(42 / 1200 * 100vw);
    height: calc(42 / 1200 * 100vw);
  }
}

/* ==========================================================================
   Mobile Responsive (max-width: 767px)
   ========================================================================== */
@media screen and (max-width: 767px) {
  .schedule-modal {
    align-items: center;
    padding: 0 20px;
  }

  .schedule-modal__container {
    gap: 12px;
    padding: 20px 0;
  }

  .schedule-modal__close-btn {
    /* Flex item - no position needed, just margin for spacing */
    /* 5px because container already has padding-top: 20px (20 + 5 = 25) */
    margin-top: 5px;
    margin-right: 25px;
  }

  .schedule-modal__close-btn button {
    width: 24px;
    height: 24px;
  }

  .schedule-modal__close-btn i {
    width: 32px;
    height: 32px;
  }

  .schedule-modal__content {
    min-width: 100%;
    padding: 48px 26px;
    width: 100%;
    /* max-height removed - modal container handles scroll */
  }

  .schedule-modal__content::-webkit-scrollbar {
    width: 6px;
  }

  .schedule-modal__content::-webkit-scrollbar-thumb {
    border: 0;
  }

  .schedule-modal__top {
    position: relative;
    flex-direction: column;
    align-items: baseline;
  }

  .schedule-modal__badge {
    margin-right: 0;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: '42dotSansOTF', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
  }

  .schedule-modal__top-right {
    margin-top: 10px;
  }

  .schedule-modal__top-info-icon {
    width: 16px;
    height: 16px;
  }

  .schedule-modal__top-info--last::before {
    margin: 0 6px;
  }

  .schedule-modal__top-info-text {
    font-family: '42dotSansOTF', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
  }

  .schedule-modal__title-box {
    align-items: center;
    margin-top: 8px;
  }

  .schedule-modal__title {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.4;
  }

  .schedule-modal__detail {
    margin: 24px 0;
    padding: 30px 0;
  }

  .schedule-modal__video {
    margin-bottom: 24px;
  }

  .schedule-modal__detail-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
  }

  .schedule-modal__detail-title:not(:first-child) {
    margin-top: 18px;
  }

  .schedule-modal__detail-title a {
    gap: 6px;
  }

  .schedule-modal__detail-desc {
    font-family: '42dotSansOTF', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
  }

  .schedule-modal__bottom {
    flex-direction: column;
    gap: 34px 0;
  }

  .schedule-modal__presenter-item {
    gap: 0 14px;
  }

  .schedule-modal__presenter-info {
    font-family: '42dotSansOTF', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
  }

  .schedule-modal__presenter-name {
    display: block;
    margin-bottom: 2px;
    font-family: '42dotSansOTF', sans-serif;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
  }

  .schedule-modal__presenter-position {
    margin: 0;
  }

  .schedule-modal__presenter-line {
    margin: 0 6px;
    font-size: 11px;
  }

  .schedule-modal__presenter-intro {
    margin-top: 2px;
  }

  .schedule-modal__social {
    gap: 0 9px;
    justify-content: center;
    width: 100%;
    padding: 30px 0;
    background: #f3f3f3;
    border-radius: 14px;
  }

  /* If multiple presenters, add margin-bottom (set via JS) */
  .schedule-modal__social--multiple-presenters {
    margin-bottom: 10px;
  }

  .schedule-modal__social-icon {
    width: 42px;
    height: 42px;
  }
}
