/* GMC2 Sunday Rota frontend UI refresh v3.1.0 */
.gmc2-rota-frontend{margin:1.5em 0;overflow-x:auto;-webkit-overflow-scrolling:touch;color:#111!important;background:transparent!important}.gmc2-rota-frontend,.gmc2-rota-frontend table,.gmc2-rota-frontend thead,.gmc2-rota-frontend tbody,.gmc2-rota-frontend tr,.gmc2-rota-frontend th,.gmc2-rota-frontend td,.gmc2-rota-frontend div,.gmc2-rota-frontend span,.gmc2-rota-frontend label{color:#111!important}.gmc2-frontend-controls{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:12px;align-items:center;padding:10px;background:#f6f7f7!important;border:1px solid #dcdcde;border-radius:6px}.gmc2-frontend-view-toggle{display:inline-flex;gap:4px}.gmc2-view-mode-btn,.gmc2-filter-input,.gmc2-filter-select,.gmc2-print-button,.gmc2-reveal-form input,.gmc2-reveal-form button{padding:7px 10px;border:1px solid #8c8f94;border-radius:4px;background:#fff!important;color:#111!important;min-height:38px}.gmc2-exceptions-wrap{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid #8c8f94;border-radius:4px;background:#fff!important;color:#111!important;min-height:38px;box-sizing:border-box;font-weight:600;white-space:nowrap}.gmc2-date-range-label{display:inline-flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid #8c8f94;border-radius:4px;background:#fff!important;color:#111!important;min-height:38px;box-sizing:border-box;font-weight:600;white-space:nowrap}.gmc2-date-range-label input[type=date]{border:1px solid #8c8f94;border-radius:4px;padding:4px 6px;background:#fff!important;color:#111!important}.gmc2-view-mode-btn.is-active,.gmc2-print-button,.gmc2-reveal-form button{cursor:pointer;background:#2271b1!important;color:#fff!important;border-color:#135e96;font-weight:600}.gmc2-reveal-form{margin:0 0 12px;padding:10px;background:#f7f7f7!important;border:1px solid #dcdcde;border-radius:6px;color:#111!important}.gmc2-reveal-error{color:#b32d2e!important;margin-left:8px;font-weight:700}.gmc2-print-title{display:none;font-size:1.35rem;font-weight:700;margin:0 0 12px;color:#111!important}.gmc2-print-stamp{display:none;font-size:.85rem;margin:-8px 0 12px;color:#555!important}.gmc2-frontend-table{width:100%;min-width:900px;border-collapse:collapse;background:#fff!important;color:#111!important;border:1px solid #ccd0d4;box-shadow:0 1px 2px rgba(0,0,0,.08)}.gmc2-frontend-table th{background:#2c3338!important;color:#fff!important;text-align:center;padding:10px 12px;border:1px solid #444c56;font-weight:700;white-space:nowrap}.gmc2-frontend-table td{background:#fff!important;color:#111!important;padding:8px 12px;border:1px solid #dcdcde;white-space:nowrap;font-weight:600;text-align:center}.gmc2-frontend-table tbody tr:nth-child(odd) td{background:#fff!important}.gmc2-frontend-table tbody tr:nth-child(even) td{background:#f3f5f7!important}.gmc2-frontend-table tbody tr:hover td{background:#eaf3ff!important}.gmc2-frontend-table tr[hidden],.gmc2-frontend-table [hidden]{display:none!important}.gmc2-card-list{display:none}.gmc2-card-view .gmc2-frontend-table{display:none}.gmc2-card-view .gmc2-card-list{display:grid;gap:12px}.gmc2-rota-card{background:#fff!important;border:1px solid #dcdcde;border-radius:10px;box-shadow:0 1px 3px rgba(0,0,0,.12);overflow:hidden;color:#111!important}.gmc2-card-header{display:flex;justify-content:space-between;gap:12px;align-items:center;background:#2c3338!important;color:#fff!important;padding:10px 12px}.gmc2-card-header strong,.gmc2-card-header span{color:#fff!important}.gmc2-card-body{padding:8px 12px}.gmc2-card-line{display:grid;grid-template-columns:minmax(90px,38%) 1fr;gap:10px;align-items:center;padding:8px 0;border-bottom:1px solid #eee}.gmc2-card-line:last-child{border-bottom:0}.gmc2-card-line span{font-weight:700;color:#333!important}.gmc2-card-line strong{font-weight:700;color:#111!important}.gmc2-card-line-selected{font-size:1.05rem}.gmc2-frontend-table th[data-col="lead"],.gmc2-frontend-table td[data-col="lead"],.gmc2-area-lead{border-left:4px solid #0f766e}.gmc2-frontend-table th[data-col="music"],.gmc2-frontend-table td[data-col="music"],.gmc2-area-music{border-left:4px solid #9333ea}.gmc2-frontend-table th[data-col="read"],.gmc2-frontend-table td[data-col="read"],.gmc2-area-read{border-left:4px solid #0891b2}.gmc2-frontend-table th[data-col="testimony"],.gmc2-frontend-table td[data-col="testimony"],.gmc2-area-testimony{border-left:4px solid #be123c}.gmc2-frontend-table th[data-col="prayer"],.gmc2-frontend-table td[data-col="prayer"],.gmc2-area-prayer{border-left:4px solid #16a34a}.gmc2-frontend-table th[data-col="slides"],.gmc2-frontend-table td[data-col="slides"],.gmc2-area-slides{border-left:4px solid #ea580c}.gmc2-frontend-table th[data-col="sound"],.gmc2-frontend-table td[data-col="sound"],.gmc2-area-sound{border-left:4px solid #2563eb}.gmc2-frontend-table th[data-col="stream"],.gmc2-frontend-table td[data-col="stream"],.gmc2-area-stream{border-left:4px solid #7c3aed}.gmc2-frontend-table th[data-col="jam"],.gmc2-frontend-table td[data-col="jam"],.gmc2-area-jam{border-left:4px solid #ca8a04}.gmc2-frontend-table th[data-col="teens"],.gmc2-frontend-table td[data-col="teens"],.gmc2-area-teens{border-left:4px solid #db2777}@media(max-width:700px){.gmc2-frontend-controls{display:grid;grid-template-columns:1fr}.gmc2-frontend-view-toggle{display:grid;grid-template-columns:1fr 1fr}.gmc2-filter-input,.gmc2-filter-select,.gmc2-print-button,.gmc2-view-mode-btn,.gmc2-exceptions-wrap{width:100%;box-sizing:border-box}.gmc2-card-view .gmc2-card-list{display:grid}.gmc2-table-view .gmc2-frontend-table{display:table}}
/* Area picker: choose one or more columns to show. Checkboxes in a collapsible panel rather
   than a native multi-select, which is awkward to operate on a phone or tablet. */
.gmc2-area-picker{position:relative}
.gmc2-area-picker>summary{cursor:pointer;list-style:none;display:flex;align-items:center;justify-content:space-between;gap:8px}
.gmc2-area-picker>summary::-webkit-details-marker{display:none}
.gmc2-area-picker>summary:after{content:'\25BE';margin-left:6px;opacity:.7}
.gmc2-area-picker[open]>summary:after{content:'\25B4'}
.gmc2-area-picker-list{position:absolute;z-index:20;left:0;right:0;margin-top:4px;padding:8px;background:#fff;border:1px solid #8c8f94;border-radius:4px;box-shadow:0 4px 14px rgba(0,0,0,.15);max-height:260px;overflow:auto}
.gmc2-area-picker-list label{display:flex;align-items:center;gap:8px;padding:6px 4px;min-height:34px;cursor:pointer}
.gmc2-area-picker-list input{margin:0}
.gmc2-area-clear{margin-top:6px;width:100%;padding:7px 10px;border:1px solid #8c8f94;border-radius:4px;background:#f6f7f7;cursor:pointer}

/* Area set buttons inside the public rota's column picker. */
.gmc2-area-sets-bar{display:flex;flex-direction:column;gap:2px;padding-bottom:8px;margin-bottom:8px;border-bottom:1px solid #e5e5e5;font-size:12px;color:#555}
.gmc2-area-set-opt{display:flex;align-items:center;gap:8px;padding:5px 4px;min-height:32px;cursor:pointer;font-weight:600;color:#111}
.gmc2-print-hint{margin:6px 0 0;font-size:12px;color:#555;line-height:1.4}
@media print{.gmc2-print-hint{display:none!important}html body .gmc2-rota-frontend .gmc2-frontend-table th[data-col],html body .gmc2-rota-frontend .gmc2-frontend-table td[data-col]{position:static!important;min-width:0!important}html body .gmc2-rota-frontend .gmc2-frontend-table tbody tr:hover td{background:inherit!important}@page{size:landscape;margin:8mm}body *{visibility:hidden!important}.gmc2-rota-frontend,.gmc2-rota-frontend *{visibility:visible!important}.gmc2-rota-frontend{position:absolute;left:0;top:0;width:100%;overflow:visible!important;margin:0!important;color:#000!important;background:#fff!important}.gmc2-frontend-controls,.gmc2-reveal-form,.gmc2-print-button{display:none!important}.gmc2-print-title{display:block!important;color:#000!important}.gmc2-print-stamp{display:block!important;color:#000!important}.gmc2-rota-frontend .gmc2-card-list{display:none!important}.gmc2-rota-frontend .gmc2-frontend-table{display:table!important}.gmc2-rota-card{break-inside:avoid;box-shadow:none!important;border:1px solid #666!important;margin-bottom:8px}.gmc2-card-header{background:#eee!important;color:#000!important}.gmc2-card-header strong,.gmc2-card-header span{color:#000!important}}

  /* Date and AM/PM need only enough room for their content; with table-layout:fixed the rest of
     the width is then shared by the area columns. Without this every column was equal, so
     printing a single area left the names crushed while Date took a third of the page. */
  /* Column widths are emitted per-print by the shortcode (it knows which columns are Info and
     how many there are), so no blanket nth-child sizing here. */

/* Expandable public cards v4.5.0 (#11) */
.gmc2-card-header{width:100%;border:0;cursor:pointer;text-align:left;font:inherit}
.gmc2-card-chevron{margin-left:auto;color:#fff!important;font-size:.8em}
.gmc2-card-body[hidden]{display:none}
@media print{.gmc2-card-body[hidden]{display:block!important}.gmc2-card-chevron{display:none!important}}


/* Single-area view: stop the table forcing 900px so Date doesn't balloon (v4.5.3).
   Note: we deliberately do NOT use table-layout:fixed here - on a narrow phone it squeezed
   the Date column and overlapped it with Slot. Natural layout + nowrap Date behaves correctly. */
.gmc2-rota-frontend[class*="gmc2-selected-area-"] .gmc2-frontend-table,.gmc2-areas-narrowed .gmc2-frontend-table{min-width:0!important;width:100%!important}
.gmc2-rota-frontend[class*="gmc2-selected-area-"] .gmc2-frontend-table th,
.gmc2-rota-frontend[class*="gmc2-selected-area-"] .gmc2-frontend-table td,.gmc2-areas-narrowed .gmc2-frontend-table td{white-space:normal;overflow-wrap:break-word;word-break:normal}
/* Date and AM/PM get tight, sensible widths; the area column takes the rest */
.gmc2-rota-frontend[class*="gmc2-selected-area-"] .gmc2-frontend-table th[data-col="date"],
.gmc2-rota-frontend[class*="gmc2-selected-area-"] .gmc2-frontend-table td[data-col="date"],.gmc2-areas-narrowed .gmc2-frontend-table td[data-col="date"],.gmc2-areas-narrowed .gmc2-frontend-table th[data-col="date"]{width:10.5em;min-width:10.5em;white-space:nowrap}
.gmc2-rota-frontend[class*="gmc2-selected-area-"] .gmc2-frontend-table th[data-col="slot"],
@media(max-width:700px){
  .gmc2-rota-frontend[class*="gmc2-selected-area-"] .gmc2-frontend-table th[data-col="date"],
  .gmc2-rota-frontend[class*="gmc2-selected-area-"] .gmc2-frontend-table td[data-col="date"]{width:9.5em;min-width:9.5em}
}

/* Sticky header + sticky Date column so headings and dates stay as anchors when scrolling.
   Header sticks to the top of the viewport as the page scrolls; the Date column sticks to the
   left as the table scrolls sideways. Backgrounds are opaque so content scrolls underneath. */
.gmc2-frontend-table thead th{position:sticky;top:0;z-index:4}
.gmc2-frontend-table th[data-col="date"]{position:sticky;left:0;z-index:5}
.gmc2-frontend-table td[data-col="date"]{position:sticky;left:0;z-index:3;background:#fff!important}
.gmc2-frontend-table tbody tr:nth-child(even) td[data-col="date"]{background:#eef1f4!important}
.gmc2-frontend-table tbody tr:hover td[data-col="date"]{background:#e2edfb!important}
/* the date header is both top- and left-sticky, so it needs the highest z-index */
.gmc2-frontend-table thead th[data-col="date"]{z-index:6}
@media print{
  .gmc2-frontend-table thead th,
  .gmc2-frontend-table th[data-col="date"],
  .gmc2-frontend-table td[data-col="date"]{position:static!important}
}

/* AM/PM area tagging: an area not used at a row's slot shows an empty muted cell */
.gmc2-frontend-table td.gmc2-fe-slot-na{background:repeating-linear-gradient(45deg,#fafafa,#fafafa 6px,#f2f2f2 6px,#f2f2f2 12px);color:#999!important;font-weight:400;font-size:0.85em;font-style:italic}
/* Exceptional service time, shown under AM/PM only when it differs from the Settings default */
/* The slot sits under the date rather than in a column of its own - it is a few characters
   describing the date, and the width is better given to the areas. */
.gmc2-frontend-table td[data-col="date"] .gmc2-fe-date{display:block;white-space:nowrap}
.gmc2-frontend-table td[data-col="date"] .gmc2-fe-slotline{display:block;font-size:.85em;color:#555;margin-top:1px}
.gmc2-slot-time{display:block;font-size:0.8em;font-weight:400;color:#333!important;margin-top:2px}
.gmc2-fe-exc-time{font-size:0.95em;color:#333!important}
@media print{.gmc2-slot-time{color:#000!important}}

/* "Last updated" stamp, right under the brand header - same wording/class as the PWA (app_page())
   and the admin editor (page_rota()), styled identically to the PWA's own inline copy. */
.gmc2-app-last-updated{font-size:12px;color:#646970;margin:0 0 8px}
/* Church branding header above the public rota */
.gmc2-brand-header{display:flex;align-items:center;gap:14px;margin:0 0 16px;flex-wrap:wrap}
.gmc2-brand-logo{max-height:56px;max-width:220px;width:auto;height:auto;object-fit:contain}
.gmc2-brand-title{font-size:1.5em;font-weight:700;line-height:1.2}
@media(max-width:600px){.gmc2-brand-title{font-size:1.25em}}

/* "Email me my link" on the public rota - the way back in for anyone who has lost theirs. */
.gmc2-prefs-request{margin:22px 0 4px;padding:14px 16px;background:#f6f7f7;border:1px solid #dcdcde;border-radius:8px}
.gmc2-prefs-request label{display:block;margin-bottom:8px;font-size:14px;color:#3c434a;line-height:1.45}
.gmc2-prefs-request-row{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.gmc2-prefs-request input[type=email]{flex:1 1 240px;min-width:0;padding:10px;font-size:16px;border:1px solid #8c8f94;border-radius:6px}
.gmc2-prefs-request button{padding:10px 16px;font-size:16px;border-radius:6px;border:1px solid #2271b1;background:#2271b1;color:#fff;cursor:pointer}
.gmc2-prefs-sent{margin:0 0 10px;padding:10px 12px;background:#edfaef;border:1px solid #68de7c;border-radius:6px;font-size:14px}
.gmc2-prefs-request-form .gmc2-hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.gmc2-prefs-note{display:block;margin-top:8px;font-size:13px;color:#646970}

/* A group's own name, shown above its members when a manager has opted a group in to display
   publicly (see public_group_match() server-side) - on screen and in print alike, since print
   simply prints this same markup. */
.gmc2-group-heading{display:inline-block;font-weight:700}
