/* ===== MINI CALENDAR (homepage) ===== */
.sec-cal{width:100%;max-width:100%;margin:12px 0}
.sec-cal-inner.is-loading{opacity:.6; pointer-events:none}
.sec-cal-header{display:grid; grid-template-columns:26px 1fr 26px; align-items:center;gap:4px;}
.sec-cal-title{text-align:center; font-size:.9rem;font-weight:600;}
.sec-cal-arrow{width:26px;height:26px;border:1px solid #e6e6e6;border-radius:999px;background:#fff;cursor:pointer;font-size:16px;line-height:1;display:flex;align-items:center;justify-content:center;}
.sec-cal-arrow:hover{background:rgba(0,0,0,.05)}
.sec-cal-arrow:focus{outline:none}
.sec-cal-arrow:focus-visible{outline:2px solid rgba(0,0,0,.25); outline-offset:2px}
.sec-cal-arrow[disabled]{opacity:.35; cursor:default;}
.sec-cal-arrow[disabled]:hover{background:#fff}

/* datepicker-like grid */
.sec-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;margin-top:6px}
.sec-dow{font-weight:600;font-size:.7rem;padding:2px 0;text-align:center;opacity:.7}
.sec-cell{display:flex;justify-content:center;align-items:center;padding:0;margin:0}
.sec-cell.is-out{opacity:.35}
.sec-day{width:24px;height:24px;display:flex;align-items:center;justify-content:center;text-decoration:none;border-radius:999px;font-size:.85rem;padding-top:2px;position: relative;}
.sec-day:hover{background:rgba(0,0,0,.05)}
.sec-day:focus{outline:none}
.sec-day:focus-visible{outline:2px solid rgba(0,0,0,.25); outline-offset:2px}
.sec-day.is-selected{background:rgba(0,0,0,.08); font-weight:700;}

/* Today: warm charcoal that matches #f7f4f0 */
.sec-day.is-today{background:#605445;color:#fff;}
.sec-day.is-selected.is-today{background:#2f2a24;color:#fff;}
.sec-day.is-today:hover{background:#2f2a24;}

/* Event markers (non-today days):
   - normal events: grey underline
   - pinned events: red underline
*/

.sec-day.has-events:not(.is-today){background:transparent;color:inherit;}
.sec-day.has-events::after{content:'';position:absolute;left:50%;transform:translateX(-50%);bottom:2px;width:14px;height:2px;border-radius:2px;background:#f39200;opacity:.95;}
.sec-day.has-pinned::after{background:#be1622;}

/* Today + events: use a ring instead of underline (avoid visual clash) */
.sec-day.is-today.has-events::after,
.sec-day.is-today.has-pinned::after{display:none;}

/* Today ring color depends on event type */
.sec-day.is-today.has-events{box-shadow:0 0 0 3px #f39200;}
.sec-day.is-today.has-pinned{box-shadow:0 0 0 3px #be1622;}

@media (max-width:420px){
  .sec-cal{max-width:100%}
  .sec-day{width:30px;height:30px;font-size:.9rem}
}

/* ===== DAY PAGE */
.sec-daypage{
  max-width:1100px;
  margin:18px auto;
  padding:0 12px;
}

/* header: prev/next + title + back button */
.sec-daypage-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin:0 0 12px;
  flex-wrap:wrap;
}

.sec-daypage-nav{
  display:flex;
  align-items:center;
  gap:10px;
}

.sec-daypage-actions{
  display:flex;
  align-items:center;
  gap:10px;
}

.sec-daypage-title{
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
  min-width:220px;
  padding:2px 4px;
}
.sec-daypage-dow{
  font-size:.9rem; 
  opacity:.75;
}

.sec-daypage-date{
  font-size:1.05rem; 
  font-weight:700;
}

.sec-daybtn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border:1px solid #e8e8e8;
  border-radius:12px;
  background:#fff;
  text-decoration:none;
  font-weight:600;
  line-height:1;
  white-space:nowrap;
}

.sec-daybtn:hover{
  background:rgba(0,0,0,.04);
}

.sec-daybtn:focus{
  outline:2px solid rgba(0,0,0,.25); outline-offset:2px;
}

.sec-daybtn--disabled{
  opacity:.35;
  pointer-events:none;
}

.sec-daybtn--icon{
  width:42px;
  height:42px;
  padding:0;
  border-radius:999px;
  font-size:18px;
}
.sec-daybtn--back{
  padding:10px 14px;
}

.sec-daypage-grid{
  display:grid;
  grid-template-columns:minmax(0, 1fr) 320px;
  gap:14px;
  align-items:start;
}

.sec-day-empty{
  border:1px solid #eee;
  border-radius:12px;
  background:#fff;
  padding:14px;
  opacity:.8;
}

.sec-agenda{
  border:1px solid #eee;
  border-radius:12px;
  background:#fff;
  padding:6px 12px;
}

.sec-agenda-item{
  display:block;
  padding:12px 0 12px 14px;
  border-top:1px solid #f0f0f0;
  position:relative;
}
.sec-agenda-item:first-child{
  border-top:none;
}

.sec-agenda-item::before{
  content:'';
  position:absolute;
  left:0;
  top:12px;
  bottom:12px;
  width:3px;
  border-radius:3px;
  background:rgba(0,0,0,.35);
}

.sec-agenda-time{
  font-size:13px;
  opacity:.75;
  white-space:nowrap;
}

.sec-agenda-line1{
  display:flex;
  align-items:baseline;
  gap:8px;
  flex-wrap:wrap;
  min-width:0;
}

.sec-agenda-line2{
  margin-top:4px;
}

.sec-agenda-title{
  display:inline-block;
  min-width:0;
  text-decoration:none;
  font-weight:700;
  white-space:normal;
}

.sec-agenda-title:hover{
  text-decoration:underline;
}

.sec-agenda-pin{
  display:inline-flex;
  align-items:center;
  font-size:11px;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid #ddd;
  opacity:.9;
  flex:0 0 auto;
}

.sec-agenda-meta{
  margin:0;
  font-size:12px;
  opacity:.75;
}

.sec-agenda-line3{
  margin-top:6px;
  font-size:13px;
  opacity:.92;
}

.sec-agenda-snippet{
  opacity:.92;
}

.sec-agenda-readmore{
  text-decoration:underline;
}

.sec-agenda-edit{
  text-decoration:underline;
  white-space:nowrap;
}

.sec-agenda-readmore:hover,
.sec-agenda-edit:hover{
  text-decoration:none;
}

.sec-agenda-item.is-pinned::before{
  background:#d40000;
}

.sec-agenda-item.is-pinned .sec-agenda-title,
.sec-agenda-item.is-pinned .sec-agenda-meta{
  color:#d40000; 
  opacity:1;
}

.sec-agenda-item.is-pinned .sec-agenda-pin{
  border-color:rgba(212,0,0,.25);
}

/* sidebar card */
.sec-day-aside-card{
  border:1px solid #e7e3de;
  border-radius:12px;
  background:#f8f4f0;
  padding:10px;
}

.sec-cal--daymini{
  margin:0;
}

.sec-cal--daymini .sec-cal-header{
  margin-bottom:4px;
}

.sec-cal--daymini .sec-cal-title{
  font-size:.95rem;
}

/* single event nav: keep date and action buttons in one row on desktop */
.sec-eventnav{
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  align-items:center;
  gap:12px 16px;
}

.sec-eventnav .sec-daypage-nav{
  min-width:0;
}

.sec-eventnav .sec-daypage-title{
  min-width:180px;
}

.sec-eventnav .sec-daypage-actions{
  justify-content:flex-end;
  flex-wrap:nowrap;
  gap:8px;
}

.sec-eventnav .sec-daybtn--back{
  padding:10px 14px;
}

/* mobile: stack sidebar below + more compact rows */
@media (max-width:980px){
    .sec-daypage-grid{grid-template-columns:1fr;}
    .sec-daypage-title{min-width:180px;}
    .sec-eventnav{display:flex;}
    .sec-eventnav .sec-daypage-nav{width:100%; justify-content:center;}
    .sec-eventnav .sec-daypage-actions{width:100%; justify-content:center; flex-wrap:wrap;}
}

@media (max-width:520px){
  .sec-daypage-head{justify-content:center;}
  .sec-daypage-nav{width:100%; justify-content:center;}
  .sec-daypage-actions{width:100%; display:flex; justify-content:center; gap:10px; flex-wrap:wrap;}
  .sec-daypage-head{gap:10px;}
  .sec-daypage-title{min-width:140px;}
  .sec-agenda{padding:4px 10px;}
  .sec-agenda-item{padding:10px 0 10px 12px;}
  .sec-agenda-item::before{top:10px; bottom:10px;}
  .sec-agenda-line1{align-items:flex-start;}
  .sec-agenda-title{white-space:normal;}
}

/* ===== LARGE CALENDAR ===== */
.sec-cal--large{max-width:1100px;margin:18px auto}
.sec-grid--large{gap:6px;margin-top:10px; align-items:stretch}

/* large calendar uses the same header as the day view */
.sec-cal--large .sec-daypage-head{margin:0 0 12px;}
.sec-cal--large .sec-daypage-title--month .sec-daypage-date{font-size:1.2rem; font-weight:800;}
.sec-cal--large .sec-grid--large{margin-top:0;}

.sec-cell--large{
  border:1px solid #eee;
  border-radius:12px;
  padding:0;
  background:#f8f4ef;
  align-items:stretch;
  justify-content:flex-start;
  flex-direction:column;
  height:164px;
  min-height:164px;
  overflow:hidden;
  display:flex;
}

.sec-dayhead{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:8px;
  margin:0;
  flex:0 0 auto;
  background:#eae4de;
  border-radius:12px 12px 0 0;
}

.sec-dayhead:hover {
  background: #d1c7bc;
  color: #fff;
}

/* quick add (admins/editors only) */
.sec-dayadd{
  display:inline-flex;
  align-items:center;
  gap:4px;
  text-decoration:none;
  font-size:12px;
  line-height:1;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(0,0,0,.16);
  background:rgba(255,255,255,.65);
  color:inherit;
  margin-left:6px;
  margin-right:auto;
}
.sec-dayadd:hover{background:rgba(255,255,255,.9)}
.sec-dayadd-icon{font-size:14px; line-height:1}

@media (max-width:980px){
  .sec-dayadd{margin:0; padding:4px 6px;}
  .sec-dayadd-text{display:none;}
}

.sec-cal--large .sec-cell--large.is-today .sec-dayadd{
  border-color:rgba(255,255,255,.25);
  background:rgba(255,255,255,.12);
  color:#fff;
}
.sec-cal--large .sec-cell--large.is-today .sec-dayadd:hover{background:rgba(255,255,255,.18)}

.sec-daydow {display:none; font-size:12px; opacity:.65;}

.sec-daynum{
  width:30px; height:30px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight:700;
}

/* .sec-daynum:hover{background:rgba(0,0,0,.05)} */

/* highlight current day: dark header (no circle highlight) */
.sec-cal--large .sec-cell--large.is-today .sec-dayhead{
  background:#404040;
  color:#fff;
}
.sec-cal--large .sec-cell--large.is-today .sec-daynum{
  background:transparent;
  box-shadow:none;
  color:#fff;
}
.sec-cal--large .sec-cell--large.is-today .sec-daynum:hover{background:rgba(255,255,255,.10)}
.sec-cal--large .sec-cell--large.is-today .sec-daydow{color:rgba(255,255,255,.85); opacity:1;}

.sec-dayevents{
  display:flex;
  flex-direction:column;
  gap:10px;
  flex:1 1 auto;
  overflow:hidden;
  padding:6px 8px 8px;
}

.sec-cal--large .sec-dayevents > .sec-evrow{
  display:block;
  min-width:0;
}

.sec-cal--large .sec-dayevents > .sec-evrow > a.sec-ev{
  display:block !important;
  float:none !important;
  clear:both !important;
  position:relative !important;
  margin:0 !important;
  min-width:0;
}

.sec-cal--large .sec-ev{
  text-decoration:none;
  padding:2px 4px;
  border-left:3px solid #9a9a8d;
  overflow:hidden;
  font-size:13px !important;
  line-height:1.25 !important;
}  

.sec-cal--large .sec-ev-edit{
  display:inline-block;
  margin-top:4px;
  margin-left:7px;
  white-space:nowrap;
  text-decoration:underline;
  font-size:12px;
  line-height:1.25;
}

.sec-cal--large .sec-ev-edit:hover{
  text-decoration:none;
}

.sec-cal--large .sec-ev:hover {
  background:rgba(0,0,0,.04);
}

.sec-cal--large .sec-ev-time{
  display:block;
  width:100%;
  font-size:12px !important;
  line-height:1.25 !important;
  opacity:.75;
  white-space:nowrap;
}

.sec-cal--large .sec-ev-title{
  font-size:13px !important;
  line-height:1.25 !important;
  font-weight:500;
}  

/* przypięte */
.sec-cal--large .sec-ev--pinned{border-left-color:#a85a4a;}
.sec-ev--pinned .sec-ev-title,
.sec-ev--pinned .sec-ev-time{color:#a85a4a; opacity:1;}
.sec-ev--pinned .sec-ev-title{font-weight:600;}


/* "+X więcej zobacz wszystkie" */
.sec-ev-more{
  display:flex;
  flex-wrap:wrap;
  align-items:baseline;
  font-size:12px;
  line-height:1.1;
  opacity:.8;
  margin-top:2px;
}
.sec-ev-more-count {opacity:.8;}
.sec-ev-more-link {text-decoration:underline;}
.sec-ev-more-link:hover{text-decoration:none;}






/* Mobile agenda */
@media (max-width:980px){

	.sec-cal--large {
		max-width:100%; 
		padding:0 10px;

	}

	.sec-grid--large {
		display:block;
	}

	.sec-grid--large .sec-dow {
		display:none;
	}

	.sec-grid--large .sec-cell--large:not(.has-events) .sec-dayevents::before{
		content:"Brak wydarzeń";
		display:block;
		opacity:.65;
		font-size:13px;
		padding:2px 0;
	}  

	.sec-grid--large .sec-cell--large{
		height:auto;
		min-height:0;
		margin:0 0 10px;
		overflow:visible;
		padding:0px;
		border-radius:10px;
		flex-direction:row;
		gap:8px;
		align-items:flex-start;
	}

	.sec-grid--large .sec-cell--large.is-out {
		display:none;
	}

	.sec-dayhead{
		justify-content:center;
		margin-bottom:0;
		flex-direction:column;
		align-items:center;
		text-align:center;
		gap:2px;
		flex:0 0 48px;
		padding:6px;
		border-radius:10px;
	}
	
	.sec-daydow {
		display:inline-block;
	}

	.sec-daynum {
		width:auto;
		height:auto;
		border-radius:8px;
		padding:2px 8px;
		font-size:16px;
	}

	.sec-dayevents {
		flex:1 1 auto;
		min-width:0;
		overflow:visible;
		gap:8px;
		padding:8px 0px;
	}

	.sec-cal--large .sec-ev{
		flex-wrap:wrap;
		align-items:flex-start;
		overflow:visible;
	}

	.sec-cal--large .sec-evrow{
		align-items:flex-start;
	}

	.sec-cal--large .sec-ev-edit{
		display:inline-block;
		margin-top:4px;
		margin-left:7px;
	}

	.sec-cal--large .sec-ev-title{
		white-space:normal !important;
		overflow:visible !important;
		text-overflow:clip !important;
		word-break:break-word;
	}

	.sec-cal--large .sec-ev-time{
		margin-right:6px !important;
	}

	.sec-ev-more{
		margin-top:0;
		column-gap:6px;
	}
}



