/* PE-Class v1.20.71 — 학교스포츠클럽 출석 작업바·QR 모달 */

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceWorkspace {
  grid-template-columns: minmax(0, 1fr) !important;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceMain {
  width: 100%;
  min-width: 0;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceFilterBar {
  display: grid !important;
  grid-template-areas: "department date time qr present absent reset save" !important;
  grid-template-columns:
    minmax(112px, 1.35fr)
    minmax(112px, 1fr)
    minmax(80px, .72fr)
    repeat(5, minmax(72px, .72fr)) !important;
  align-items: stretch !important;
  gap: 7px !important;
  width: 100%;
  min-width: 0;
  padding: 2px 0 !important;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] :is(
  #clubPcDepartmentFilterSlot,
  #clubPcAttendanceDynamicFilters,
  .clubPcAttendanceFilterBar .clubHubHeaderActions,
  .clubPcAttendanceFilterBar .clubAttendanceSelectors,
  .clubPcAttendanceFilterBar .clubPcAttendanceActions
) {
  display: contents !important;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceFilterBar .clubHubHeaderActions label {
  grid-area: department !important;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceFilterBar .clubAttDateLabel {
  grid-area: date !important;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceFilterBar .clubAttSlotLabel {
  grid-area: time !important;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcQrAttendanceButton {
  grid-area: qr;
  border-color: #7bbbe8 !important;
  background: #168ee0 !important;
  color: #fff !important;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceActions > :nth-child(1) { grid-area: present; }
html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceActions > :nth-child(2) { grid-area: absent; }
html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceActions > :nth-child(3) { grid-area: reset; }
html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceActions > :nth-child(4) { grid-area: save; }

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceFilterBar :is(
  label,
  select,
  button
) {
  width: 100% !important;
  min-width: 0 !important;
  height: 46px !important;
  min-height: 46px !important;
  margin: 0 !important;
  box-sizing: border-box;
  text-align: center !important;
  text-align-last: center !important;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceFilterBar button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 6px 5px !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceActions {
  width: auto !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceActions > .btn {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 46px !important;
  margin: 0 !important;
}

html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceActions .clubBulkReset {
  border-color: #c6d2df !important;
  background: #fff !important;
  color: #3c5369 !important;
}

html.clubQrAttendanceModalOpen,
body.clubQrAttendanceModalOpen {
  overflow: hidden !important;
  overscroll-behavior: none !important;
}

.clubQrAttendanceModal {
  z-index: 100500 !important;
  box-sizing: border-box;
  padding: 20px;
}

.clubQrAttendanceModalCard {
  display: flex;
  flex-direction: column;
  width: min(640px, calc(100vw - 40px)) !important;
  max-height: min(88dvh, 760px) !important;
  box-sizing: border-box;
  overflow: hidden !important;
  padding: 0 !important;
}

.clubQrAttendanceModalHead {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border-bottom: 1px solid #dbe5ee;
  background: #f8fbfe;
}

.clubQrAttendanceModalHead > div {
  min-width: 0;
}

.clubQrAttendanceModalHead h3,
.clubQrAttendanceModalHead p {
  margin: 0;
}

.clubQrAttendanceModalHead h3 {
  color: #1d344a;
  font-size: 20px;
}

.clubQrAttendanceModalHead p {
  margin-top: 4px;
  color: #62778b;
  font-size: 12px;
  font-weight: 800;
}

.clubQrAttendanceModalBody {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  min-height: 0;
  padding: 18px;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.clubQrAttendanceMember {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  width: min(100%, 440px);
  margin-inline: auto;
  color: #52697f;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.clubQrAttendanceMember select {
  width: 100%;
  min-width: 0;
  height: 46px;
  box-sizing: border-box;
  border: 1px solid #cbd8e5;
  border-radius: 9px;
  background: #fff;
  color: #20384e;
  font-weight: 800;
  text-align: center;
  text-align-last: center;
}

.clubQrAttendanceModalBody .clubQrActions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  width: min(100%, 440px);
  margin: 0 auto !important;
}

.clubQrAttendanceModalBody .clubQrActions .btn {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  margin: 0;
}

.clubQrAttendanceModalBody #qrLinkBox {
  display: none !important;
}

.clubQrAttendanceModalBody .qrPreviewBox {
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 500px);
  min-height: 330px;
  margin-inline: auto;
  box-sizing: border-box;
  overflow: auto;
  border: 1px solid #dbe5ee;
  border-radius: 12px;
  background: #fbfdff;
  text-align: center;
}

.clubQrAttendanceModalBody .qrPreviewBox > .empty {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 160px;
  color: #62778b;
}

.clubQrAttendanceModalBody .clubPcQrPlaceholderIcon {
  color: #168ee0;
  font-size: 44px;
  line-height: 1;
}

.clubQrAttendanceModalBody .qrCard {
  display: grid;
  place-items: center;
  gap: 7px;
  width: min(100%, 360px);
  padding: 16px;
  box-sizing: border-box;
}

.clubQrAttendanceModalBody .qrCard img {
  width: min(240px, 65vw);
  height: min(240px, 65vw);
  object-fit: contain;
}

.clubQrAttendanceModalBody :is(.qrCard b, .qrCard span, .qrCard small) {
  text-align: center !important;
}

@media (min-width: 769px) and (max-width: 1200px) {
  html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceFilterBar {
    grid-template-columns:
      minmax(104px, 1.28fr)
      minmax(104px, 1fr)
      minmax(72px, .7fr)
      repeat(5, minmax(66px, .68fr)) !important;
    gap: 5px !important;
  }

  html[data-pe-tab="clubs"] #app.clubScreen[data-club-windows-pc="true"] .clubPcAttendanceFilterBar button {
    padding-inline: 3px !important;
    font-size: 10.5px !important;
    letter-spacing: -.25px;
  }
}

@media (max-width: 768px) {
  body.mobileClubView.mobileClubAttendanceMode #mobileClubContent {
    padding-bottom: calc(92px + env(safe-area-inset-bottom)) !important;
  }

  body.mobileClubView .mobileClubAttendanceDock {
    position: fixed;
    z-index: 1600;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(10px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #cbd8e5;
    border-radius: 14px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 12px 32px rgba(22, 43, 64, .22);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  body.mobileClubView .mobileClubAttendanceDock > :is(#mobileClubAttendanceBulkToggle, #mobileClubAttendanceSave) {
    position: relative;
    z-index: 2;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    margin: 0;
    padding: 8px 6px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.15;
    white-space: nowrap;
  }

  body.mobileClubView #mobileClubAttendanceBulkToggle {
    border: 1px solid #9fc7e7;
    background: #f2f9ff;
    color: #2479b4;
  }

  body.mobileClubView #mobileClubAttendanceSave {
    border: 1px solid #168e50;
    background: #1eaa61;
    color: #fff;
  }

  body.mobileClubView .mobileClubAttendanceDock button:disabled {
    opacity: .48;
  }

  body.mobileClubView .mobileClubAttendanceMenuBackdrop {
    position: fixed;
    z-index: 1;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  body.mobileClubView .mobileClubAttendanceBulkMenu {
    position: absolute;
    z-index: 3;
    right: 0;
    bottom: calc(100% + 8px);
    left: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 7px;
    box-sizing: border-box;
    padding: 8px;
    border: 1px solid #cbd8e5;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(22, 43, 64, .24);
  }

  body.mobileClubView .mobileClubAttendanceBulkMenu[hidden],
  body.mobileClubView .mobileClubAttendanceMenuBackdrop[hidden] {
    display: none !important;
  }

  body.mobileClubView .mobileClubAttendanceBulkMenu > button {
    width: 100%;
    min-width: 0;
    min-height: 48px;
    margin: 0;
    padding: 8px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.15;
  }

  body.mobileClubView .mobileClubAttendanceBulkMenu .bulkPresent {
    border: 1px solid #79c99e;
    background: #eefaf4;
    color: #177a45;
  }

  body.mobileClubView .mobileClubAttendanceBulkMenu .bulkAbsent {
    border: 1px solid #efb0b0;
    background: #fff3f3;
    color: #b93636;
  }

  body.mobileClubView .mobileClubAttendanceBulkMenu .bulkReset {
    border: 1px solid #c6d2df;
    background: #f8fafc;
    color: #3c5369;
  }
}
