/* Shared calendar popup, independent of the surrounding date fields. */
.calendar-panel,.calendar-panel *{box-sizing:border-box}
.calendar-panel{position:fixed;z-index:640;width:308px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);overflow:auto;padding:14px;border:1px solid var(--line,#e7eaee);border-radius:14px;background:var(--card,#fff);color:var(--ink,#20262c);box-shadow:0 12px 36px rgba(23,43,77,.15);font-size:13px;line-height:1.4;overscroll-behavior:contain}
.calendar-panel button{font:inherit;cursor:pointer;transition:background .12s,color .12s,border-color .12s}
.calendar-panel button:focus-visible{outline:2px solid var(--teal,#009e95);outline-offset:1px}
.calendar-panel button:disabled{cursor:not-allowed;color:var(--tx3,#98a2ab);opacity:.4}
.calendar-caption{margin:0 0 9px 3px;font-size:12px;color:var(--tx3,#98a2ab)}
.calendar-header{display:flex;align-items:center;justify-content:space-between;gap:6px;margin-bottom:12px}
.calendar-title{border:0;border-radius:7px;background:transparent;color:var(--ink,#20262c);font-weight:600!important;padding:6px 9px}
.calendar-title:hover{background:var(--teal-025,#f2faf9);color:var(--teal-600,#00877f)}
.calendar-nav{display:flex;align-items:center;justify-content:center;width:30px;height:30px;flex:none;padding:6px;border:1px solid var(--line,#e7eaee);border-radius:8px;background:transparent;color:var(--tx2,#5d6873)}
.calendar-nav svg{width:15px;height:15px}
.calendar-nav:hover:not(:disabled){background:var(--teal-025,#f2faf9);color:var(--teal-600,#00877f);border-color:var(--teal,#009e95)}
.calendar-weekdays,.calendar-days{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));text-align:center}
.calendar-weekdays{margin-bottom:6px;color:var(--tx3,#98a2ab);font-size:11px}
.calendar-weekdays span{padding:5px 0}
.calendar-days{gap:4px 0}
.calendar-day{position:relative;display:flex;align-items:center;justify-content:center;width:100%;height:35px;padding:0;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--ink,#20262c);font-variant-numeric:tabular-nums}
.calendar-day.is-outside{color:var(--tx3,#98a2ab)}
.calendar-day.is-range{background:var(--teal-025,#f2faf9);border-radius:0}
.calendar-day.is-endpoint{border-color:var(--teal,#009e95);border-radius:8px;color:var(--teal-600,#00877f)}
.calendar-day:hover:not(:disabled){background:var(--teal-050,#e6f6f4);border-radius:8px;color:var(--teal-600,#00877f)}
.calendar-day.is-today::after{content:'';position:absolute;bottom:4px;left:calc(50% - 2px);width:4px;height:4px;border-radius:50%;background:var(--teal,#009e95)}
.calendar-day[aria-selected="true"]{border-radius:8px;background:var(--teal,#009e95)!important;color:#fff!important;font-weight:600}
.calendar-day[aria-selected="true"]::after{background:#fff}
.calendar-periods{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;padding:4px 0 8px}
.calendar-period{min-height:42px;padding:6px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--tx2,#5d6873)}
.calendar-period:hover:not(:disabled),.calendar-period[aria-selected="true"]{background:var(--teal-050,#e6f6f4);color:var(--teal-600,#00877f)}
.calendar-footer{display:flex;align-items:center;justify-content:space-between;margin-top:12px;padding-top:10px;border-top:1px solid var(--line2,#eef1f4)}
.calendar-footer button{padding:6px 11px;border:0;border-radius:7px;background:transparent;color:var(--teal-600,#00877f)}
.calendar-footer button:hover:not(:disabled){background:var(--teal-025,#f2faf9)}
body.theme-dark .calendar-panel{box-shadow:0 12px 36px rgba(0,0,0,.4)}
body.theme-dark .calendar-day.is-endpoint,body.theme-dark .calendar-footer button,body.theme-dark .calendar-period[aria-selected="true"],body.theme-dark .calendar-period:hover:not(:disabled),body.theme-dark .calendar-day:hover:not(:disabled),body.theme-dark .calendar-title:hover,body.theme-dark .calendar-nav:hover:not(:disabled){color:#64d8cb}
