
/* Calendar controls are shared by every page, independently of the Events theme. */
body dialog.rainham-calendar-popup .rev-calendar-controls{display:flex;align-items:center;justify-content:space-between}
body dialog.rainham-calendar-popup .rev-calendar-controls h3{text-align:center;text-transform:uppercase}
body dialog.rainham-calendar-popup :is(.rev-calendar-controls,.rev-calendar-pagination) button{border:1px solid #b8c9d6;border-radius:10px;background:#edf2f6;color:#365c78;font-weight:750}
body dialog.rainham-calendar-popup :is(.rev-calendar-weekdays,.rev-calendar-grid){display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
body dialog.rainham-calendar-popup .rev-calendar-weekdays{font-size:10px;font-weight:750;text-align:center}
body dialog.rainham-calendar-popup .rev-calendar-day{position:relative;border:0;background:#edf2f6;color:#627587}
body dialog.rainham-calendar-popup .rev-calendar-day.has-event{background:#365c78;color:white;font-weight:750}
body dialog.rainham-calendar-popup .rev-calendar-day.has-event:after{content:'';position:absolute;bottom:4px;left:calc(50% - 2px);width:4px;height:4px;border-radius:100%;background:#e9a56e}
body dialog.rainham-calendar-popup .rev-calendar-day[aria-pressed=true]{box-shadow:inset 0 0 0 3px #c9814b}
body dialog.rainham-calendar-popup .rev-calendar-day.is-today{outline:1px solid #b87140;outline-offset:-2px}
body dialog.rainham-calendar-popup .rev-calendar-result{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;border:1px solid #cbd6e1;border-radius:13px;background:#edf2f6;color:#294d69;font-weight:750;text-transform:uppercase;text-align:left}
body dialog.rainham-calendar-popup .rev-calendar-result span:last-child{font-size:10px;flex-shrink:0}
body dialog.rainham-calendar-popup .rev-calendar-pagination{display:flex;align-items:center;justify-content:center}
body dialog.rainham-calendar-popup .rev-calendar-pagination span{font-size:11px;font-weight:750}
body dialog.rainham-calendar-popup button:disabled{opacity:.35;cursor:default}
/* Shared fitting rules for calendar popups. Future calendars use the same layout classes. */
body dialog.rainham-popup.rainham-calendar-popup{width:min(1040px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;height:min(690px,calc(var(--rainham-calendar-viewport,100dvh) - 24px))!important;max-height:calc(var(--rainham-calendar-viewport,100dvh) - 24px)!important;overflow:hidden!important;padding:0!important}
body dialog.rainham-calendar-popup[open]{display:flex;flex-direction:column}
body dialog.rainham-calendar-popup .rainham-popup-header{position:relative;flex:0 0 auto;min-height:0;padding:16px 22px!important}
body dialog.rainham-calendar-popup .rainham-popup-body{display:flex;flex-direction:column;flex:1;min-height:0;padding:18px 22px!important;overflow:hidden!important}
body dialog.rainham-calendar-popup .rainham-popup-body>p{flex:0 0 auto;margin:0 0 14px!important;font-size:14px!important;line-height:1.45!important}
body dialog.rainham-calendar-popup .rev-popup-back{margin:0 0 10px}
body dialog.rainham-calendar-popup .rainham-calendar-layout{display:grid;grid-template-columns:minmax(0,1.1fr) minmax(0,1fr);gap:24px;flex:1;min-height:0}
body dialog.rainham-calendar-popup .rainham-calendar-month{display:grid;grid-template-rows:auto auto minmax(0,1fr);min-height:0;gap:8px}
body dialog.rainham-calendar-popup .rev-calendar-controls{margin:0!important;gap:10px}
body dialog.rainham-calendar-popup .rev-calendar-controls h3{font-size:20px!important;line-height:1.2!important;margin:0!important}
body dialog.rainham-calendar-popup .rev-calendar-controls button{width:42px;height:42px}
body dialog.rainham-calendar-popup .rev-calendar-weekdays{margin:0!important}
body dialog.rainham-calendar-popup .rev-calendar-grid{grid-template-rows:repeat(6,minmax(0,1fr));min-height:0;gap:6px}
body dialog.rainham-calendar-popup .rev-calendar-day{aspect-ratio:auto;min-height:0;padding:5px;border-radius:9px;font-size:13px!important}
body dialog.rainham-calendar-popup .rainham-calendar-results{min-height:0;overflow:hidden;padding-top:2px}
body dialog.rainham-calendar-popup #rev-calendar-results{margin:0!important;gap:10px}
body dialog.rainham-calendar-popup .rev-calendar-result-list{display:grid;gap:8px}
body dialog.rainham-calendar-popup .rev-calendar-result{min-height:48px;padding:12px 14px;font-size:12px;line-height:1.3}
body dialog.rainham-calendar-popup .rev-calendar-result>span:first-child{min-width:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
body dialog.rainham-calendar-popup .rev-calendar-pagination{gap:20px;margin-top:10px}
body dialog.rainham-calendar-popup .rev-calendar-pagination button{width:40px;height:40px}
@media(max-width:759px){body dialog.rainham-calendar-popup .rainham-popup-body{padding:14px 16px!important}body dialog.rainham-calendar-popup .rainham-popup-header{padding:14px 16px!important}body dialog.rainham-calendar-popup .rainham-popup-body>p{font-size:12px!important;margin-bottom:10px!important}body dialog.rainham-calendar-popup .rainham-calendar-layout{grid-template-columns:minmax(0,1fr);grid-template-rows:minmax(175px,1fr) minmax(110px,.8fr);gap:16px}body dialog.rainham-calendar-popup .rev-calendar-controls h3{font-size:17px!important}body dialog.rainham-calendar-popup .rev-calendar-controls button{width:36px;height:36px}body dialog.rainham-calendar-popup .rev-calendar-day{font-size:11px!important}body dialog.rainham-calendar-popup .rev-calendar-result{font-size:11px!important;padding:10px 12px;min-height:44px}body dialog.rainham-calendar-popup .rev-calendar-pagination button{width:36px;height:36px}body dialog.rainham-calendar-popup .rev-calendar-grid{gap:4px}}
@media(max-height:520px){body dialog.rainham-calendar-popup .rainham-calendar-layout{grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:14px}body dialog.rainham-calendar-popup .rainham-popup-body>p{font-size:11px!important;line-height:1.3!important;margin-bottom:8px!important}body dialog.rainham-calendar-popup .rainham-popup-header{padding:8px 16px!important}body dialog.rainham-calendar-popup .rainham-popup-header h2{font-size:18px!important}body dialog.rainham-calendar-popup .rainham-popup-body{padding:10px 14px!important}body dialog.rainham-calendar-popup .rev-calendar-controls button{height:30px;width:30px}body dialog.rainham-calendar-popup .rev-calendar-controls h3{font-size:14px!important}body dialog.rainham-calendar-popup .rev-calendar-day:after{bottom:2px}}

body dialog.rainham-calendar-popup .rev-calendar-result{height:56px!important;min-height:56px!important;padding:10px 12px}@media(max-width:759px){body dialog.rainham-calendar-popup .rev-calendar-result{height:52px!important;min-height:52px!important;padding:8px 10px}}

/* Calendar state stays inside the cell so mobile clipping cannot cut it off. */
body dialog.rainham-calendar-popup .rev-calendar-day{box-sizing:border-box}
body dialog.rainham-calendar-popup .rev-calendar-day[aria-pressed=true]{outline:none!important;box-shadow:inset 0 0 0 2px #c9814b!important}
html[data-rainham-input=keyboard] body dialog.rainham-calendar-popup .rev-calendar-day:focus-visible{outline:2px solid #c9814b!important;outline-offset:-3px!important}
