.modal-footer-spacer {
  flex: 1 1 auto;
}

.modal-secondary-action {
  color: #1769d2;
  border-color: #aac8ee;
  background: #f8fbff;
}

.modal-secondary-action:hover {
  border-color: #1769d2;
  background: #edf5ff;
}

.admin-student-preview-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(17, 30, 48, 0.68);
  backdrop-filter: blur(5px);
}

.admin-student-preview-dialog {
  width: min(1540px, 96vw);
  height: min(940px, 94vh);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: #eef2f7;
  box-shadow: 0 26px 80px rgba(8, 22, 42, 0.34);
}

.admin-student-preview-toolbar {
  min-height: 64px;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 20px;
  border-bottom: 1px solid #dfe5ec;
  background: #fff;
}

.admin-student-preview-heading,
.admin-student-preview-controls {
  display: flex;
  align-items: center;
}

.admin-student-preview-heading {
  min-width: 0;
  gap: 11px;
}

.admin-student-preview-heading img,
.admin-preview-student-topbar img {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  object-fit: contain;
}

.admin-student-preview-heading div {
  min-width: 0;
}

.admin-student-preview-heading strong,
.admin-student-preview-heading span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-student-preview-heading strong {
  color: #182b42;
  font-size: 15px;
}

.admin-student-preview-heading span {
  margin-top: 2px;
  color: #7b8998;
  font-size: 12px;
}

.admin-student-preview-controls {
  flex: 0 0 auto;
  gap: 6px;
}

.admin-preview-mode,
.admin-preview-close {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid #dbe3ec;
  border-radius: 6px;
  background: #fff;
  color: #617184;
  cursor: pointer;
}

.admin-preview-mode:hover,
.admin-preview-mode.active {
  border-color: #1769d2;
  background: #edf5ff;
  color: #1769d2;
}

.admin-preview-close {
  margin-left: 6px;
}

.admin-preview-close:hover {
  border-color: #c94a4a;
  background: #fff5f5;
  color: #b42318;
}

.admin-preview-mode svg,
.admin-preview-close svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.admin-student-preview-stage {
  min-height: 0;
  flex: 1 1 auto;
  overflow: auto;
  padding: 28px;
}

.admin-preview-device {
  width: 100%;
  min-height: 100%;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #dce3eb;
  border-radius: 8px;
  background: #f6f8fb;
  box-shadow: 0 14px 36px rgba(31, 48, 70, 0.12);
  transition: width 0.2s ease;
}

.admin-preview-device.student-fidelity {
  background: #fff;
}

.admin-preview-device.student-fidelity .admin-student-preview-page {
  padding: 28px 32px 36px;
  background: #fff;
}

.admin-preview-device.mobile {
  width: 390px;
  max-width: 100%;
}

.admin-preview-student-topbar {
  height: 58px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 22px;
  border-bottom: 1px solid #e2e7ed;
  background: #fff;
  color: #182b42;
}

.admin-preview-student-topbar img {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
}

.admin-preview-student-topbar strong {
  font-size: 15px;
}

.admin-preview-student-topbar span {
  margin-left: auto;
  color: #7b8998;
  font-size: 12px;
}

.admin-student-preview-page {
  min-height: 680px;
  padding: 30px;
  background: #f6f8fb;
}

.admin-student-preview-page > * {
  width: 100%;
}

.admin-student-preview-page button:disabled {
  opacity: 1;
  cursor: default;
}

.admin-student-preview-page [aria-disabled="true"] {
  pointer-events: none;
  cursor: default;
}

.admin-preview-course-modal {
  width: min(820px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(31, 48, 70, 0.08);
}

.admin-preview-course-titlebar {
  padding: 18px 22px;
  border-bottom: 1px solid #e4e8ee;
  color: #1f2933;
  font-size: 17px;
}

.admin-preview-course-modal .course-detail-modal {
  padding: 20px 22px;
}

.admin-preview-cover-fallback {
  min-height: 230px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eaf2ff;
  color: #1769d2;
  font-size: 15px;
  font-weight: 700;
}

.admin-preview-course-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  border-top: 1px solid #e4e8ee;
  background: #fff;
}

.admin-preview-course-footer .btn {
  min-width: 118px;
}

.admin-student-preview-page .oto-page,
.admin-student-preview-page .expert-detail-page {
  max-width: 1180px;
}

.admin-preview-expert-hero {
  display: block;
  min-height: 0;
  padding: 28px;
}

.admin-preview-expert-hero .expert-detail-profile {
  position: static;
}

.admin-preview-device.mobile .admin-preview-student-topbar {
  padding: 0 15px;
}

.admin-preview-device.mobile .admin-student-preview-page {
  min-height: 620px;
  padding: 16px;
}

.admin-preview-device.mobile.student-fidelity .admin-student-preview-page {
  padding: 16px;
}

.admin-preview-device.mobile .oto-page {
  gap: 16px;
  padding-bottom: 20px;
}

.admin-preview-device.mobile .oto-course-hero,
.admin-preview-device.mobile .oto-offer-hero,
.admin-preview-device.mobile .oto-teacher-hero,
.admin-preview-device.mobile .oto-offer-columns {
  grid-template-columns: 1fr;
  gap: 18px;
}

.admin-preview-device.mobile .oto-course-summary h1,
.admin-preview-device.mobile .oto-offer-summary h1,
.admin-preview-device.mobile .oto-teacher-hero h1 {
  font-size: 26px;
}

.admin-preview-device.mobile .oto-shell-nav > span {
  display: none;
}

.admin-preview-device.mobile .oto-shell-banner {
  height: 220px;
}

.admin-preview-device.mobile .oto-shell-banner-copy {
  left: 20px;
  bottom: 20px;
  width: calc(100% - 40px);
}

.admin-preview-device.mobile .oto-shell-banner-copy h1 {
  font-size: 25px;
}

.admin-preview-device.mobile .oto-shell-banner-copy p {
  font-size: 13px;
  -webkit-line-clamp: 1;
}

.admin-preview-device.mobile .oto-shell-teacher-grid,
.admin-preview-device.mobile .grid-2 {
  grid-template-columns: 1fr;
}

.admin-preview-device.mobile .oto-shell-section-head {
  align-items: flex-start;
}

.admin-preview-device.mobile .oto-course-option {
  grid-template-columns: 76px minmax(0, 1fr);
}

.admin-preview-device.mobile .oto-course-option-cover {
  width: 76px;
}

.admin-preview-device.mobile .oto-course-option > .btn {
  width: 100%;
  grid-column: 1 / -1;
}

.admin-preview-device.mobile .oto-book-btn {
  max-width: none;
}

.admin-preview-device.mobile .admin-preview-course-titlebar,
.admin-preview-device.mobile .admin-preview-course-modal .course-detail-modal,
.admin-preview-device.mobile .admin-preview-course-footer {
  padding-left: 16px;
  padding-right: 16px;
}

.admin-preview-device.mobile .admin-preview-course-footer,
.admin-preview-device.mobile .course-detail-head,
.admin-preview-device.mobile .course-class-card,
.admin-preview-device.mobile .expert-detail-service {
  align-items: stretch;
  grid-template-columns: 1fr;
  flex-direction: column;
}

.admin-preview-device.mobile .admin-preview-course-footer .btn,
.admin-preview-device.mobile .course-class-card .btn,
.admin-preview-device.mobile .expert-detail-service .btn {
  width: 100%;
}

@media (max-width: 680px) {
  .modal-footer-spacer {
    display: none;
  }

  .admin-student-preview-overlay {
    padding: 0;
  }

  .admin-student-preview-dialog {
    width: 100vw;
    height: 100vh;
    max-height: none;
    border: 0;
    border-radius: 0;
  }

  .admin-student-preview-toolbar {
    padding: 0 12px;
  }

  .admin-student-preview-stage {
    padding: 12px;
  }
}
