/* =========================
   HEADER
========================= */

.sc-header{
display:flex;
align-items:center;
justify-content:space-between;
margin-bottom:2px;
}

.sc-logo img{
max-height:55px;
width:auto;
}

.sc-month{
font-size:46px;
margin:0;
color:var(--sc-primary);
font-weight:700;
text-align:right;
letter-spacing:.5px;
}

.sc-month-wrap{
flex-grow:1;
text-align:center;
}

.sc-calendar td{
border:1px solid #ddd;
vertical-align:top;
padding:6px;
height:auto;
height:110px;
font-size:13px;
}


/* =========================
   NAV / BUTTON BAR
========================= */

.sc-print{
display:flex;
align-items:center;
justify-content:center;
gap:10px;
margin-bottom:10px;
flex-wrap:wrap;
}

.sc-nav-btn{
text-decoration:none;
font-weight:600;
padding:6px 10px;
border-radius:4px;
background:#f5f5f5;
color:#333;
}

/* base button */
.sc-btn{
border:none;
padding:8px 14px;
border-radius:4px;
font-weight:600;
cursor:pointer;
color:#fff;
}

/* print buttons */
.sc-btn-print{
background:var(--sc-primary);
}

.sc-btn-print:hover{
opacity:.9;
}

/* exclude button */
.sc-btn-exclude{
background:color-mix(in srgb, var(--sc-primary) 70%, black);
}

/* =========================
   CALENDAR
========================= */

.sc-calendar{
width:100%;
border-collapse:collapse;
table-layout:fixed;
}

.sc-calendar td{
line-height:1.1;
}

.sc-calendar th{
padding:6px;
border-bottom:2px solid var(--sc-primary);
text-align:center;
font-weight:600;
}

.sc-calendar strong{
display:inline !important;
color:var(--sc-primary);
font-size:14px;
margin-bottom:3px;
font-weight:600;
}

.sc-calendar td .sc-event{
display:block;
margin-left:14px;
}

/* =========================
   EVENTS
========================= */

.sc-event{
font-size:14px;
line-height:1.1;
margin-bottom:1px;
white-space:normal;
word-break:keep-all;
overflow-wrap:normal;
padding-left:2px;
}

.sc-title{
font-weight:600;
color:#222;
letter-spacing:.1px;
}

.sc-time{
white-space:nowrap;
font-size:.9em;
}

.sc-inst{
font-size:.9em;
opacity:.8;
}

.sc-time,
.sc-inst{
white-space:nowrap;
}

/* indent multi-day continuation */
.sc-mid-day{
margin-left:10px;
opacity:.7;
}

/* =========================
   FOOTER
========================= */

.sc-footer{
display:flex;
align-items:center;
gap:20px;
margin-top:14px;
}

.sc-footer-qr img{
width:65px;
height:auto;
max-width:65px;
}

.sc-footer-text{
flex:1;
text-align:left;
}

.sc-footer-info{
flex:0 0 auto;
text-align:right;
}

.sc-phone{
font-weight:700;
font-size:16px;
}

.sc-footer{
border-top:1px solid #ddd;
padding-top:8px;
}

/* =========================
   MODAL
========================= */

.sc-modal{
display:none;
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
background:rgba(0,0,0,.5);
z-index:9999;
}

.sc-modal-content{
background:#fff;
padding:20px;
max-width:600px;
margin:60px auto;
max-height:70vh;
overflow-y:auto;
border-radius:6px;
text-align: left;
}

.sc-exclude-item.sc-middle{
margin-left:14px;
opacity:.85;
font-size:0.95em;
}

.sc-exclude-item{
display:block;
margin-bottom:6px;
cursor:pointer;
}

.sc-excluded span{
text-decoration:line-through;
opacity:.5;
}

.sc-modal-footer{
margin-top:20px;
text-align:center;
}

/* =========================
   PRINT
========================= */

@media print {

@page{
margin:4mm;
}
	
body{
margin:0;
padding:0;
}

}

@media print{

/* hide UI */
.sc-print,
.sc-nav-btn,
.sc-btn{
display:none !important;
}

/* remove site layout */
header,
nav,
footer,
.sidebar,
.site-header,
.site-footer{
display:none !important;
}

/* ensure calendar fills page */
.sc-print-area{
width:100%;
margin:0;
}
}

.sc-calendar{
width:100%;
table-layout:fixed;
}

/* =========================
   2-UP PRINT LAYOUT
========================= */

.sc-print-sheet{
display:block;
width:100%;
}

/* two halves per page */

.sc-half{
height:50%;
min-height:48%;
display:flex;
align-items:center;
justify-content:center;
page-break-inside:avoid;
}

/* page breaks */

.sc-sheet-front{
page-break-after:always;
}

/* =========================
   WEEK SPLITTING
========================= */

/* table rows:
1 weekday header
2 week1
3 week2
4 week3
5 week4
6 week5
7 week6
*/

/* FRONT = weeks 1–3 */

.sc-front .sc-calendar tr:nth-child(n+5){
display:none;
}

/* BACK = weeks 4–6 */

.sc-back .sc-calendar tr:nth-child(-n+4){
display:none;
}
