/* Independent selectors also style student cards mounted in the body portal. */
.btl-student-info-trigger {
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #4b4ba4;
  font: inherit;
  line-height: 1;
  vertical-align: middle;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btl-student-info-initial {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #eeeffa;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  transition: background-color 150ms, color 150ms, box-shadow 150ms, transform 150ms;
}

.btl-student-info-trigger.is-roomy .btl-student-info-initial {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.btl-student-info-trigger[aria-expanded="true"] .btl-student-info-initial {
  background: #e3e6ff;
  color: #3449df;
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px #c3caf5;
}

.btl-student-info-trigger:active .btl-student-info-initial {
  transform: scale(.96);
}

.btl-student-info-popover {
  position: fixed;
  z-index: 500;
  box-sizing: border-box;
  width: 420px;
  max-width: calc(100vw - 24px);
  max-height: calc(100vh - 24px);
  max-height: calc(100dvh - 24px);
  padding: 16px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid #e5e7ee;
  border-radius: 12px;
  background: #fff;
  color: #202534;
  box-shadow: 0 2px 5px rgb(32 37 52 / 4%), 0 10px 26px rgb(32 37 52 / 10%), 0 24px 56px rgb(32 37 52 / 6%);
  font-family: "BTL Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.6;
  letter-spacing: -.015em;
  font-variant-numeric: tabular-nums;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  scrollbar-width: thin;
  scrollbar-color: #cdd2df transparent;
}

.btl-student-info-popover *,
.btl-student-info-popover *::before,
.btl-student-info-popover *::after {
  box-sizing: border-box;
}

.btl-student-info-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 12px;
}

.btl-student-info-header > :first-child {
  min-width: 0;
}

.btl-student-info-eyebrow {
  margin: 0 0 3px;
  color: #737b8c;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}

.btl-student-info-name {
  margin: 0;
  color: #202534;
  font-size: 18px;
  font-weight: 750;
  line-height: 1.35;
  letter-spacing: -.035em;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-wrap: balance;
}

.btl-student-info-close {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  margin: -6px -6px 0 0;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #737b8c;
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  touch-action: manipulation;
  transition: color 150ms, background-color 150ms, transform 150ms;
}

.btl-student-info-close svg {
  width: 18px;
  height: 18px;
}

.btl-student-info-close:active {
  transform: scale(.96);
}

.btl-student-info-contacts {
  padding: 4px 10px;
  border-radius: 8px;
  background: #f7f8fb;
}

.btl-student-info-contact {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 44px;
}

.btl-student-info-contact + .btl-student-info-contact {
  box-shadow: 0 -1px 0 rgb(32 37 52 / 6%);
}

.btl-student-info-contact > :first-child {
  color: #737b8c;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.btl-student-info-contact > :last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.btl-student-info-phone {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  max-width: 100%;
  border-radius: 4px;
  color: #3f468a;
  font-size: 14px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color 150ms;
}

.btl-student-info-empty {
  color: #737b8c;
  font-size: 12px;
  font-weight: 400;
}

.btl-student-info-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 16px;
  margin: 16px 0 0;
  padding: 0;
}

.btl-student-info-details > div {
  min-width: 0;
}

.btl-student-info-details dt {
  margin: 0 0 3px;
  color: #737b8c;
  font-size: 11px;
  font-weight: 500;
}

.btl-student-info-details dd {
  margin: 0;
  color: #333b4c;
  font-size: 13px;
  font-weight: 550;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: keep-all;
  text-wrap: pretty;
}

.btl-student-info-details dd.btl-student-info-empty {
  color: #737b8c;
  font-weight: 400;
}

.btl-student-info-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 18px;
  padding: 4px;
  border-radius: 10px;
  background: #f3f4f8;
}

.btl-student-info-tabs > button {
  flex: 1;
  min-height: 40px;
  padding: 8px 12px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #737b8c;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 150ms, color 150ms, box-shadow 150ms;
}

.btl-student-info-tabs > button[aria-selected="true"] {
  background: #fff;
  color: #3f468a;
  box-shadow: 0 1px 3px rgb(32 37 52 / 8%);
}

.btl-student-activity-controls {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 20px;
}

.btl-student-activity-date {
  flex: 1;
  min-width: 0;
}

.btl-student-activity-date label {
  display: block;
  margin-bottom: 5px;
  color: #737b8c;
  font-size: 11px;
  font-weight: 500;
}

.btl-student-activity-date input {
  display: block;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 7px 10px;
  border: 1px solid #e1e4ec;
  border-radius: 7px;
  background: #fff;
  color: #333b4c;
  font: inherit;
  font-variant-numeric: tabular-nums;
  color-scheme: light;
}

.btl-student-activity-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #e1e4ec;
  border-radius: 7px;
  background: #fff;
  color: #4b5367;
  font: inherit;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  cursor: pointer;
  touch-action: manipulation;
  transition: background-color 150ms, color 150ms, transform 150ms;
}

.btl-student-activity-button svg { flex-shrink: 0; }
.btl-student-activity-button:disabled { opacity: .5; cursor: wait; }
.btl-student-activity-button:active:not(:disabled) { transform: scale(.96); }

.btl-student-activity-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 5px;
  color: #4b5367;
  font-size: 12px;
  font-weight: 600;
}

.btl-student-activity-summary > :last-child {
  color: #737b8c;
  font-size: 11px;
  font-weight: 400;
}

.btl-student-activity-list { margin: 0; padding: 0; list-style: none; }

.btl-student-activity-list > li {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  padding: 13px 0;
}

.btl-student-activity-list > li + li { box-shadow: 0 -1px 0 rgb(32 37 52 / 6%); }
.btl-student-activity-list time { padding-top: 1px; color: #737b8c; font-size: 11px; font-variant-numeric: tabular-nums; }
.btl-student-activity-title { margin: 0; color: #333b4c; font-size: 13px; font-weight: 600; }
.btl-student-activity-detail { margin: 3px 0 0; color: #737b8c; font-size: 12px; line-height: 1.6; }
.btl-student-activity-title, .btl-student-activity-detail { word-break: keep-all; overflow-wrap: anywhere; text-wrap: pretty; }
.btl-student-activity-more { width: 100%; margin-top: 8px; }

.btl-student-activity-status,
.btl-student-activity-empty {
  display: grid;
  justify-items: center;
  gap: 12px;
  margin: 0;
  padding: 32px 8px;
  color: #737b8c;
  font-size: 12px;
  text-align: center;
  text-wrap: pretty;
}

.btl-student-activity-empty svg { color: #a0a8b9; }
.btl-student-activity-empty p, .btl-student-activity-error p { margin: 0; }
.btl-student-activity-error { display: grid; justify-items: center; gap: 12px; padding: 24px 8px; color: #9b4646; font-size: 12px; text-align: center; text-wrap: pretty; }
.btl-student-activity-note { margin: 18px 0 0; padding-top: 12px; box-shadow: 0 -1px 0 rgb(32 37 52 / 6%); color: #737b8c; font-size: 11px; line-height: 1.6; word-break: keep-all; text-wrap: pretty; }

.btl-student-info-trigger:focus-visible,
.btl-student-info-close:focus-visible,
.btl-student-info-phone:focus-visible,
.btl-student-info-tabs > button:focus-visible,
.btl-student-activity-date input:focus-visible,
.btl-student-activity-button:focus-visible {
  outline: 2px solid #3449df;
  outline-offset: 2px;
}

@media (hover: hover) {
  .btl-student-info-trigger:hover .btl-student-info-initial {
    background: #e3e6ff;
    color: #3449df;
  }
  .btl-student-info-close:hover {
    background: #f0f2f8;
    color: #202534;
  }
  .btl-student-info-phone:hover {
    color: #3449df;
    text-decoration: underline;
  }
  .btl-student-info-tabs > button:hover { color: #3f468a; }
  .btl-student-activity-button:hover:not(:disabled) { background: #f7f8fb; color: #3f468a; }
}

@media (max-width: 360px) {
  .btl-student-info-popover { padding: 14px; }
  .btl-student-info-details { gap: 12px; }
  .btl-student-activity-controls { gap: 8px; }
  .btl-student-activity-list > li { gap: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .btl-student-info-initial,
  .btl-student-info-close,
  .btl-student-info-phone,
  .btl-student-info-tabs > button,
  .btl-student-activity-button { transition: none; }
  .btl-student-info-trigger:active .btl-student-info-initial,
  .btl-student-info-close:active,
  .btl-student-activity-button:active:not(:disabled) { transform: none; }
}
