/* Calendar and entity forms share bounded fields, repeat choices and weekday chips. */
.sc-calendar .sc-color-legend .sc-color-groups{display:flex;flex-wrap:wrap;gap:20px 28px}
.sc-color-groups>section{min-width:0}
.sc-calendar .sc-color-groups h3{font-size:14px;font-weight:700;margin:0 0 10px;color:var(--studio-text,#172033)}
.sc-color-groups>section>div{display:flex;flex-wrap:wrap;gap:8px 14px}
.sc-calendar .sc-dialog .sc-date-time-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:20px;align-items:start;margin-top:16px}
.sc-calendar .sc-dialog .sc-date-time-grid>div,.sc-calendar .sc-dialog .sc-time-row,.sc-calendar .sc-dialog .sc-date-control{min-width:0;max-width:100%}
.sc-calendar .sc-dialog .sc-date-time-grid input{width:100%;min-width:0;max-width:100%;box-sizing:border-box;min-height:44px}
.sc-calendar .sc-dialog .sc-time-row{display:grid;grid-template-columns:minmax(0,1fr) auto}
.studio-schedules{color:var(--studio-text,#172033);margin-bottom:24px}
.studio-schedules-heading,.studio-schedule-card>header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:16px}
.studio-schedules h2{font-size:20px;font-weight:700}.studio-schedules-heading p,.studio-schedule-help{font-size:13px;line-height:1.6;color:var(--studio-muted,#526078);margin:8px 0 0}
.studio-schedules .studio-schedule-card{border:1px solid var(--studio-border,#d1d5db);border-radius:12px;background:var(--studio-surface,#fff);padding:20px;margin:0 0 16px}
.studio-schedule-card h3{font-size:17px;font-weight:700}
.studio-schedules .studio-schedule-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 20px;align-items:start}
.studio-schedule-fields>div,.studio-schedule-fields fieldset{min-width:0;margin:0;padding:0;border:0}
.studio-schedule-fields .studio-schedule-repeat,.studio-schedule-fields fieldset{grid-column:1/-1}
.studio-schedule-fields label,.studio-schedule-fields legend{display:block;font-size:14px;font-weight:600;margin-bottom:8px}
.studio-schedules .studio-schedule-fields :is(input:not([type=checkbox]),select){display:block;box-sizing:border-box;width:100%;max-width:100%;min-width:0;min-height:44px;padding:10px 12px;border:1px solid var(--studio-border,#d1d5db);border-radius:8px;background:var(--studio-field,#f9fafb);color:var(--studio-text,#172033);font:inherit;font-size:16px}
.studio-schedules .studio-schedule-time{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:start}
.studio-schedules :is(.studio-schedule-time button,.studio-schedule-presets button){min-height:44px;padding:8px 12px;border:1px solid var(--studio-border,#d1d5db);border-radius:8px;background:var(--studio-surface,#fff);color:var(--studio-link,#2563eb);font-size:14px}
.studio-schedule-weekdays,.studio-schedule-presets{display:flex;flex-wrap:wrap;gap:8px}
.studio-schedule-presets{margin-top:10px}
.studio-schedule-weekdays label{display:inline-flex;align-items:center;gap:8px;min-height:44px;margin:0;padding:8px 12px;border:1px solid var(--studio-border,#d1d5db);border-radius:8px;font-weight:500;cursor:pointer}
.studio-schedule-weekdays label:has(input:checked){border-color:#3b82f6;background:var(--studio-selected,#eff6ff)}
.studio-schedule-weekdays input{width:18px;height:18px;accent-color:#2563eb}
.studio-schedule-fields [data-time-optional]{font-size:12px;font-weight:400;color:var(--studio-muted,#526078)}
.studio-schedules .studio-schedule-remove{min-height:44px;padding:8px 12px;color:#dc2626;border:1px solid var(--studio-border,#d1d5db);border-radius:8px;background:var(--studio-surface,#fff);white-space:nowrap}
.studio-schedules [hidden]{display:none!important}
.studio-schedule-error{color:#dc2626;font-size:14px;line-height:1.6;margin:8px 0}
.studio-shell a.studio-schedules-button{position:relative;overflow:visible}
.studio-schedules-count{position:absolute;top:-7px;right:-7px;display:flex;align-items:center;justify-content:center;min-width:17px;height:17px;padding:0 4px;border-radius:999px;background:#2563eb;color:#fff;font-size:10px;line-height:1;font-weight:700;box-shadow:0 0 0 2px var(--studio-surface,#fff);pointer-events:none}
.studio-schedule-modal-card{display:flex;flex-direction:column;max-height:calc(var(--studio-viewport-height,100dvh) - 24px);overflow:hidden;border-radius:12px;background:var(--studio-surface,#fff);color:var(--studio-text,#172033);box-shadow:0 20px 60px #0004}
.studio-schedule-modal-card>header,.studio-schedule-modal-card>footer{display:flex;flex-wrap:wrap;align-items:center;gap:12px;padding:16px 20px;flex:none}
.studio-schedule-modal-card>header{justify-content:space-between;border-bottom:1px solid var(--studio-border,#d1d5db)}
.studio-schedule-modal-card>header>div{flex:1;min-width:0}.studio-schedule-modal-card h3{font-size:20px;font-weight:700}.studio-schedule-modal-card header p{font-size:14px;color:var(--studio-muted,#526078);margin-top:6px;overflow-wrap:anywhere}
.studio-schedule-modal-card header button{width:44px;height:44px;flex:none}
.studio-schedule-modal-body{padding:0 20px 20px;overflow:auto;overscroll-behavior:contain;min-height:0}
.studio-schedule-summary-list{display:grid;gap:12px;list-style:none;padding:0;margin:16px 0 0}
.studio-schedule-summary-list>li{padding:14px;border:1px solid var(--studio-border,#d1d5db);border-radius:10px;background:var(--studio-field,#f9fafb);font-size:14px;line-height:1.6}
.studio-schedule-summary-list>li>div{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px}.studio-schedule-summary-list p{margin-top:8px}
.studio-schedule-summary-time{white-space:nowrap}.studio-schedule-summary-time i{margin-right:5px}
.studio-schedule-summary-list .studio-schedule-day-tags{justify-content:flex-start;margin-top:10px;gap:6px}
.studio-schedule-day-tags span{padding:3px 9px;border:1px solid var(--studio-border,#d1d5db);border-radius:6px;background:var(--studio-surface,#fff);font-size:12px}
.studio-schedule-modal-card>footer{border-top:1px solid var(--studio-border,#d1d5db)}
/* Override the older compact schedule rules used by entity editors. */
.studio-shell .studio-schedules .studio-schedule-card>.studio-schedule-fields{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:18px 20px}
.studio-shell .studio-schedules .studio-schedule-card>.studio-schedule-fields:not(:has([data-schedule-date]:not([hidden]))){grid-template-columns:minmax(0,1fr)}
.studio-shell .studio-schedules .studio-schedule-fields>div,.studio-shell .studio-schedules .studio-schedule-fields>fieldset{min-width:0;max-width:none;margin:0;flex:none}
.studio-shell .studio-schedules .studio-schedule-card .studio-schedule-fields :is(input:not([type=checkbox]),select){min-width:0;max-width:100%;min-height:44px;width:100%}
.studio-shell .studio-schedules .studio-schedule-card .studio-schedule-remove{min-height:44px;margin:0;padding:8px 12px}
.sc-calendar .sc-dialog .sc-date-time-grid:not(:has([data-date-field]:not([hidden]))){grid-template-columns:minmax(0,1fr)}
html[data-studio-theme=dark] .studio-schedule-weekdays label:has(input:checked){background:#1e3553}
html[data-studio-theme=dark] .studio-schedule-remove,html[data-studio-theme=dark] .studio-schedule-error{color:#fca5a5}
@media(max-width:600px){
 .sc-calendar .sc-dialog .sc-date-time-grid,.studio-schedules .studio-schedule-fields{grid-template-columns:minmax(0,1fr);gap:16px}
 .studio-shell .studio-schedules .studio-schedule-card>.studio-schedule-fields{grid-template-columns:minmax(0,1fr);gap:16px}
 .studio-schedules .studio-schedule-card{padding:14px}
 .studio-schedules-heading{align-items:flex-start;flex-wrap:wrap}
 .studio-schedule-modal-card>header,.studio-schedule-modal-card>footer{padding:14px}
 .studio-schedule-modal-body{padding-inline:14px}
 .studio-schedule-modal-card>footer>a,.studio-schedule-modal-card>footer>button{flex:1 1 130px;min-height:44px;text-align:center}
}
