.sp-panel{grid-column:1/-1;width:100%;min-width:0;background:#fff;color:#172b45;border:1px solid #cbd5e1;border-radius:14px;padding:16px;box-sizing:border-box}.sp-panel h2,.sp-dialog h2{margin:0 0 8px}.sp-toolbar{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap}.sp-toolbar p,.sp-note{color:#475569;font-size:14px}.sp-actions{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:10px 0}.sp-panel button,.sp-dialog button{cursor:pointer;min-height:34px}.sp-actions button[aria-pressed=true]{background:#123a67;color:white}.sp-scroll,.sp-table-scroll{overflow:auto;max-width:100%;border:1px solid #d3dce7;border-radius:8px}.sp-week{display:flex;min-width:1400px}.sp-axis{flex:0 0 58px;background:#f4f7fb;position:sticky;left:0;z-index:3}.sp-axis>div:last-child{position:relative}.sp-axis span{position:absolute;font-size:12px;padding:2px 5px}.sp-day{flex:1;min-width:180px;border-left:1px solid #cbd5e1}.sp-day-title{height:80px;box-sizing:border-box;padding:8px;background:#eaf0f7;color:#172b45;font-weight:700;position:relative}.sp-day-title small{display:block;font-weight:400}.sp-day-title button{position:absolute;right:5px;bottom:4px}.sp-day-slots{position:relative;background:repeating-linear-gradient(to bottom,#fff 0,#fff 29px,#e2e8f0 29px,#e2e8f0 30px);cursor:crosshair}.sp-panel .sp-lesson{display:block;box-sizing:border-box;overflow:hidden;text-align:left;background:#eff6ff;color:#102b4e;border:1px solid #bacce1;border-left:5px solid #2563eb;border-radius:5px;padding:3px 5px;font-size:12px;line-height:1.25;min-height:0;cursor:pointer;touch-action:manipulation}.sp-lesson span,.sp-lesson small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sp-positioned{position:absolute}.sp-lesson:hover,.sp-lesson:focus-visible{z-index:2;outline:2px solid #1d4ed8;background:#dbeafe}.sp-month{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:10px}.sp-month-day{padding:10px;border:1px solid #d3dce7;border-radius:8px}.sp-month-day h3{font-size:14px}.sp-month-day .sp-lesson{width:100%;margin:5px 0}.sp-dialog{box-sizing:border-box;border:1px solid #b6c6d9;border-radius:14px;background:#fff;color:#172b45;width:min(720px,94vw);max-height:90vh;padding:24px;overflow:auto;box-shadow:0 24px 90px #0005}.sp-dialog::backdrop{background:#0c1c32aa}.sp-fields{display:grid;grid-template-columns:1fr 1fr;gap:14px}.sp-fields label{display:flex;flex-direction:column;gap:5px;font-size:14px}.sp-dialog input,.sp-dialog select,.sp-actions input{padding:9px;border:1px solid #a5b6cb;border-radius:6px;background:#fff;color:#172b45;min-width:0;width:100%;box-sizing:border-box}.sp-fields .sp-check{flex-direction:row;align-items:center}.sp-check input{width:auto}.sp-error,#sp-status{color:#9f2525;white-space:pre-wrap}.sp-table{border-collapse:collapse;width:100%;font-size:14px}.sp-table th,.sp-table td{text-align:left;padding:12px;border-bottom:1px solid #d3dce7}.sp-table th{background:#edf2f8}.sp-invite-url{width:100%}@media(max-width:600px){.sp-fields{grid-template-columns:1fr}.sp-dialog{padding:16px}.sp-panel{padding:10px}.sp-table{min-width:650px}}

.sp-scroll{max-height:75vh}.sp-week{width:max-content;min-width:100%}.sp-day{flex:1 0 auto}.sp-axis{width:72px;flex:0 0 72px}.sp-day-title{position:sticky;top:0;z-index:2}.sp-day-slots{background:repeating-linear-gradient(to bottom,#fff 0,#fff 41px,#e2e8f0 41px,#e2e8f0 42px)}.sp-lesson strong{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sp-axis{width:96px;flex-basis:96px}
/* Globalny button:hover zmienia position i transform. Elementy siatki
   muszą zachować współrzędne podczas wskazywania i przeciągania. */
.sp-panel button,
.sp-panel button:hover,
.sp-panel button:focus-visible,
.sp-panel button:active,
.sp-dialog button,
.sp-dialog button:hover,
.sp-dialog button:focus-visible,
.sp-dialog button:active {
  transform: none !important;
  transition: background-color 140ms ease, filter 140ms ease, box-shadow 140ms ease;
}
.sp-panel .sp-day-title > button {
  position: absolute !important;
  right: 5px;
  bottom: 4px;
  width: 38px;
  height: 34px;
  padding: 0;
}
.sp-panel .sp-lesson.sp-positioned {
  position: absolute !important;
}

.sp-panel .sp-day-title > .sp-hide-day{top:4px;right:5px;bottom:auto;width:28px;height:28px;min-height:28px;background:transparent;color:#475569;border:1px solid #b8c6d8;font-size:20px;line-height:1;padding:0}.sp-day-name{display:block;padding-right:32px}.sp-day-settings{margin:12px 0;padding:10px 12px;border:1px solid #cbd5e1;border-radius:8px;background:#f4f7fb}.sp-day-settings summary{cursor:pointer;font-weight:700}.sp-day-options{display:flex;flex-wrap:wrap;gap:12px;margin-top:12px}.sp-day-options label{display:flex;align-items:center;gap:5px;color:#172b45;font-size:14px}.sp-day-options input{width:18px;height:18px;margin:0;accent-color:#123a67}

/* Siatka mieści wszystkie widoczne dni w szerokości panelu. */
.sp-scroll{width:100%;min-width:0;box-sizing:border-box;overflow-x:hidden;overflow-y:auto}
.sp-week{display:grid;grid-template-columns:54px repeat(var(--sp-day-count,7),minmax(0,1fr));width:100%;min-width:0;max-width:100%;align-items:start}
.sp-axis{width:auto;min-width:0;position:sticky;left:0}.sp-axis .sp-day-title{font-size:10px;padding:8px 3px}.sp-axis span{font-size:10px;padding:2px 3px}
.sp-day{min-width:0;width:100%;box-sizing:border-box;container-type:inline-size}
.sp-day-title{font-size:12px;padding:8px 5px}.sp-day-title small{font-size:11px;white-space:nowrap}.sp-day-name{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;padding-right:28px;line-height:20px;min-width:0}
.sp-day-short{display:none}.sp-day-slots{width:100%;min-width:0}
.sp-panel .sp-day-title>.sp-hide-day{width:24px;height:24px;min-height:24px;right:3px;font-size:18px}
.sp-panel .sp-day-title>[data-sp="new"]{width:28px;height:28px;min-height:28px;right:3px;font-size:16px}
.sp-panel .sp-lesson{min-width:0;max-width:100%;font-size:clamp(10px,6cqw,12px);padding:3px;border-left-width:3px;line-height:1.25}
.sp-panel .sp-lesson strong,.sp-panel .sp-lesson span,.sp-panel .sp-lesson small{max-width:100%;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;word-break:normal;overflow-wrap:normal}
.sp-mobile-time{display:none}
@container(max-width:155px){.sp-day-full{display:none}.sp-day-short{display:inline}.sp-day-name{font-size:11px}}
@media(max-width:600px){
 .sp-week{grid-template-columns:minmax(0,1fr)}.sp-week>.sp-axis{display:none}
 .sp-day{border-left:0;border-bottom:2px solid #cbd5e1;--sp-gutter:40px}
 .sp-day-title{height:66px}.sp-day-name{font-size:14px}.sp-day-title small{font-size:12px}
 .sp-mobile-time{display:block;position:absolute;left:0;width:37px;box-sizing:border-box;font-size:10px;padding:2px;background:#f4f7fb;color:#475569;pointer-events:none}
 .sp-panel .sp-lesson{font-size:12px}.sp-scroll{max-height:75vh}
 .sp-toolbar>div,.sp-actions{min-width:0;max-width:100%}.sp-toolbar button{max-width:100%}
}

/* Uczestnicy lekcji: dialog pozostaje otwarty po ostrzeżeniu o kolizji. */
.sp-student-picker{width:min(620px,calc(100vw - 32px));max-height:85dvh;overflow:auto}
.sp-student-list{display:grid;gap:6px;max-height:45dvh;overflow:auto;margin:16px 0}
.sp-student-row{display:grid!important;grid-template-columns:24px minmax(0,1fr);gap:5px 10px;align-items:center;padding:10px;border:1px solid #ccd3df;border-radius:8px}
.sp-student-row[hidden]{display:none!important}
.sp-student-row input{width:18px!important;height:18px;min-height:0;margin:0}
.sp-student-row small{grid-column:2;overflow-wrap:anywhere}
.sp-student-row.sp-student-conflict{border-color:#b42318;background:#fff3f0;color:#7a2018}
.sp-group-warning p{white-space:pre-line;overflow-wrap:anywhere}
.sp-participant-button{font-size:.85rem;white-space:normal!important;margin-top:6px}
[data-sp-student-summary]{display:block;white-space:normal;overflow-wrap:anywhere}
