/*
 * Calendar-only presentation: the exact layouts/controls used by its Lit templates,
 * not a shared utility framework. This also styles Calendar's delegated Start rows.
 * main.css loads afterward to retain existing Calendar colors and recurrence-list
 * overrides; global navigation and shared confirmation/wait styles stay unchanged.
 */
.cal-ui {
    box-sizing: border-box;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
    font-size: 16px;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    text-align: left;
}
.cal-ui *, .cal-ui *::before, .cal-ui *::after { box-sizing: border-box; }
.cal-ui [hidden], .cal-dialog-backdrop[hidden] { display: none !important; }
#calendarViewId { background: rgb(225,235,247); border-radius: .5rem; }
.cal-ui p { margin: 0 0 1rem; }
.cal-ui ul, .cal-ui ol { margin-top: 0; margin-bottom: 1rem; padding-left: 2rem; }
.cal-ui img { vertical-align: middle; }
.cal-ui label { display: inline-block; }
.cal-ui strong { font-weight: 700; }
.cal-ui fieldset { min-width: 0; padding: 0; margin: 0; border: 0; }
.cal-ui form { margin: 0; }
.cal-ui button, .cal-ui input, .cal-ui select, .cal-ui textarea { margin: 0; font: inherit; }
.cal-ui textarea { resize: vertical; }
.cal-ui button, .cal-ui select { text-transform: none; }
.cal-ui h4, .cal-ui .cal-size-heading { margin-top: 0; margin-bottom: .5rem; font-size: calc(1.275rem + .3vw); font-weight: 500; line-height: 1.2; }

/* Finite column variants preserve the existing Calendar geometry and breakpoints. */
.cal-row { display: flex; flex-wrap: wrap; margin-right: -12px; margin-left: -12px; }
.cal-row > * { flex-shrink: 0; width: 100%; max-width: 100%; padding-right: 12px; padding-left: 12px; }
.cal-col { flex: 1 0 0%; }
.cal-col-one { flex: 0 0 auto; width: 8.33333333%; }
.cal-col-two { flex: 0 0 auto; width: 16.66666667%; }
.cal-col-four { flex: 0 0 auto; width: 33.33333333%; }
.cal-col-eight { flex: 0 0 auto; width: 66.66666667%; }
.cal-col-nine { flex: 0 0 auto; width: 75%; }
.cal-col-ten { flex: 0 0 auto; width: 83.33333333%; }
.cal-menu-column, .cal-panel-column, .cal-drop-column { flex: 0 0 auto; width: 100%; }
.cal-no-gutters { margin-left: 0; margin-right: 0; }
.cal-no-gutters > * { padding-left: 0; padding-right: 0; }
.cal-justify-center { justify-content: center !important; }
.cal-align-center { align-items: center !important; }
.cal-self-center { align-self: center !important; }
.cal-inline { display: inline !important; }
.cal-width-full { width: 100% !important; }
.cal-float-start { float: left !important; }
.cal-float-end { float: right !important; }
.cal-align-top { vertical-align: top !important; }
.cal-align-middle { vertical-align: middle !important; }
.cal-align-bottom { vertical-align: bottom !important; }
.cal-pad-small { padding: .5rem !important; }
.cal-pad-wide { padding: 3rem !important; }
.cal-margin-none { margin: 0 !important; }
.cal-margin-tiny { margin: .25rem !important; }
.cal-margin-small { margin: .5rem !important; }
.cal-margin-wide { margin: 3rem !important; }
.cal-mb-none { margin-bottom: 0 !important; }
.cal-mb { margin-bottom: 1rem !important; }
.cal-ms { margin-left: .5rem !important; }
.cal-ms-wide { margin-left: 1rem !important; }
.cal-me-tiny { margin-right: .25rem !important; }
.cal-me-wide { margin-right: 1rem !important; }
.cal-me-large { margin-right: 3rem !important; }
.cal-me-auto { margin-right: auto !important; }
.cal-border { border: 1px solid #dee2e6 !important; }
.cal-border-thick { border-width: 3px !important; }
.cal-border-thin { border-width: 1px !important; }
.cal-rounded { border-radius: .5rem !important; }
.cal-rounded-small { border-radius: .25rem !important; }
.cal-light { font-weight: 300 !important; }
.cal-bold { font-weight: 700 !important; }
.cal-size-body { font-size: 1rem !important; }
.cal-lead { font-size: 1.25rem; font-weight: 300; }
.cal-text-center { text-align: center !important; }
.cal-text-break { overflow-wrap: break-word !important; word-break: break-word !important; }
.cal-strike { text-decoration: line-through !important; }
.cal-error { color: #dc3545 !important; }

/* Configuration is a local dropdown; Week and Configure remain visible at all widths. */
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; padding: .5rem 0; }
.cal-ui .cal-nav-links { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.cal-ui .cal-nav-link { display: block; padding: .5rem 0; border: 0; background: transparent; font: inherit; color: rgba(0,0,0,.65); text-decoration: none; cursor: pointer; }
.cal-ui .cal-nav-link:hover, .cal-ui .cal-nav-link:focus { color: rgba(0,0,0,.8); }
.cal-ui .cal-nav-link.cal-active { color: #000; }
.cal-nav-link:focus-visible { outline: 2px solid #86b7fe; outline-offset: 2px; }
.cal-date-link { display: block; padding: 0; text-decoration: none; }
.cal-date-link:focus-visible { outline: 0; box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); }
.cal-configuration-menu { position: relative; }
.cal-dropdown-toggle::after { display: inline-block; margin-left: .255em; vertical-align: .255em; content: ""; border-top: .3em solid; border-right: .3em solid transparent; border-left: .3em solid transparent; }
.cal-ui .cal-dropdown-menu { position: static; z-index: 1000; min-width: 160px; margin: 0; padding: .5rem 0; list-style: none; color: #212529; background: #fff; border: 1px solid rgba(0,0,0,.175); border-radius: .375rem; }
.cal-ui .cal-dropdown-item { display: block; width: 100%; padding: .25rem 1rem; clear: both; font-weight: 400; color: #212529; text-align: inherit; text-decoration: none; white-space: nowrap; }
.cal-ui .cal-dropdown-item:hover, .cal-ui .cal-dropdown-item:focus { color: #212529; background: #f8f9fa; }

/* Existing inline/day/Label/recurrence controls, including floating select labels. */
.cal-ui .cal-label { margin-bottom: .5rem; }
.cal-ui .cal-control, .cal-ui .cal-select {
    display: block;
    width: 100%;
    padding: .375rem .75rem;
    font: inherit;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    appearance: none;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #dee2e6;
    border-radius: .375rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}
.cal-ui .cal-control:focus, .cal-ui .cal-select:focus { border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); }
.cal-control::-webkit-date-and-time-value { min-width: 85px; height: 1.5em; margin: 0; }
.cal-control::-webkit-datetime-edit { display: block; padding: 0; }
.cal-ui .cal-control::placeholder { color: rgba(33,37,41,.75); opacity: 1; }
.cal-ui .cal-select { padding-right: 2.25rem; appearance: none; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e"); background-repeat: no-repeat; background-position: right .75rem center; background-size: 16px 12px; }
.cal-floating { position: relative; }
.cal-ui .cal-floating > .cal-select { height: calc(3.5rem + 2px); min-height: calc(3.5rem + 2px); padding-top: 1.625rem; padding-bottom: .625rem; line-height: 1.25; }
.cal-floating > label { position: absolute; top: 0; left: 0; z-index: 2; height: 100%; padding: 1rem .75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; pointer-events: none; border: 1px solid transparent; transform-origin: 0 0; transform: scale(.85) translateY(-.5rem) translateX(.15rem); color: rgba(33,37,41,.65); }
.cal-ui .cal-check { width: 1em; height: 1em; padding: 0; margin-top: .25em; vertical-align: top; appearance: none; background: #fff center/contain no-repeat; border: 1px solid #dee2e6; border-radius: .25em; }
.cal-check:checked { background-color: #0d6efd; border-color: #0d6efd; background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='none' stroke='%23fff' stroke-linecap='round' stroke-linejoin='round' stroke-width='3' d='m6 10 3 3 6-6'/%3e%3c/svg%3e"); }
.cal-check:focus { border-color: #86b7fe; outline: 0; box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); }
.cal-check-label { margin: 0; }
.cal-input-group { position: relative; display: flex; flex-wrap: wrap; align-items: stretch; width: 100%; }
.cal-ui .cal-input-group > .cal-control { position: relative; flex: 1 1 auto; width: 1%; min-width: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cal-input-addon { display: flex; align-items: center; padding: .375rem .75rem; font-weight: 400; line-height: 1.5; text-align: center; white-space: nowrap; background: #f8f9fa; border: 1px solid #dee2e6; border-radius: .375rem; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.cal-ui .cal-input-group-small > .cal-control, .cal-input-group-small > .cal-input-addon { padding: .25rem .5rem; font-size: .875rem; border-radius: .25rem; }
.cal-ui .cal-input-group-small > .cal-control { border-top-left-radius: 0; border-bottom-left-radius: 0; }
.cal-input-group-small > .cal-input-addon { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.recurring-admin-filters .cal-label { font-size: .875rem; margin-bottom: .35rem; }

.cal-ui .cal-button { display: inline-block; padding: .375rem .75rem; font: inherit; font-weight: 400; line-height: 1.5; text-align: center; vertical-align: middle; cursor: pointer; user-select: none; color: #fff; background: transparent; border: 1px solid transparent; border-radius: .375rem; transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out; }
.cal-ui .cal-button-small { padding: .25rem .5rem; font-size: .875rem; border-radius: .25rem; }
.cal-ui .cal-primary { background-color: #0d6efd; border-color: #0d6efd; }
.cal-ui .cal-primary:hover, .cal-ui .cal-primary:focus-visible { background-color: #0b5ed7; border-color: #0a58ca; }
.cal-ui .cal-secondary { background-color: #6c757d; border-color: #6c757d; }
.cal-ui .cal-secondary:hover, .cal-ui .cal-secondary:focus-visible { background-color: #5c636a; border-color: #565e64; }
.cal-ui .cal-success { background-color: #198754; border-color: #198754; }
.cal-ui .cal-success:hover, .cal-ui .cal-success:focus-visible { background-color: #157347; border-color: #146c43; }
.cal-ui .cal-danger { background-color: #dc3545; border-color: #dc3545; }
.cal-ui .cal-danger:hover, .cal-ui .cal-danger:focus-visible { background-color: #bb2d3b; border-color: #b02a37; }
.cal-ui .cal-outline-secondary { color: #6c757d; background: transparent; border-color: #6c757d; }
.cal-ui .cal-outline-secondary:hover, .cal-ui .cal-outline-secondary:focus-visible { color: #fff; background-color: #6c757d; }
.cal-button:focus-visible { outline: 0; }
.cal-primary:focus-visible { box-shadow: 0 0 0 .25rem rgba(49,132,253,.5); }
.cal-secondary:focus-visible { box-shadow: 0 0 0 .25rem rgba(130,138,145,.5); }
.cal-success:focus-visible { box-shadow: 0 0 0 .25rem rgba(60,153,110,.5); }
.cal-danger:focus-visible { box-shadow: 0 0 0 .25rem rgba(225,83,97,.5); }
.cal-outline-secondary:focus-visible { box-shadow: 0 0 0 .25rem rgba(108,117,125,.5); }
.cal-ui .cal-primary:active { background-color: #0a58ca; border-color: #0a53be; }
.cal-ui .cal-secondary:active { background-color: #565e64; border-color: #51585e; }
.cal-ui .cal-success:active { background-color: #146c43; border-color: #13653f; }
.cal-ui .cal-danger:active { background-color: #b02a37; border-color: #a52834; }
.cal-ui .cal-outline-secondary:active { color: #fff; background-color: #6c757d; }

/* Search results retain their selected/hover states without a framework list component. */
.cal-ui .cal-results { display: flex; flex-direction: column; margin-bottom: 0; padding-left: 0; border-radius: .375rem; }
.cal-ui .cal-result { position: relative; display: block; padding: .5rem 1rem; color: #212529; text-decoration: none; background: #fff; border: 1px solid #dee2e6; }
.cal-result + .cal-result { border-top-width: 0; }
.cal-result:first-child { border-top-left-radius: .375rem; border-top-right-radius: .375rem; }
.cal-result:last-child { border-bottom-left-radius: .375rem; border-bottom-right-radius: .375rem; }
.cal-ui .cal-result-action:hover, .cal-ui .cal-result-action:focus { z-index: 1; color: #000; background: #f8f9fa; }
.cal-ui .cal-result-action:active { color: #212529; background: #e9ecef; }
.cal-ui .cal-result.cal-active { z-index: 2; color: #fff; background: #0d6efd; border-color: #0d6efd; }

/* Static Calendar dialogs stay below the independently owned shared overlays. */
.cal-dialog-backdrop { position: fixed; inset: 0; z-index: 1039; background: rgba(0,0,0,.5); }
dialog.cal-dialog { position: fixed; z-index: 1040; top: .5rem; left: 50%; transform: translateX(-50%); width: calc(100% - 1rem); max-width: 500px; max-height: calc(100vh - 1rem); margin: 0; padding: 0; color: #212529; background: #fff; border: 1px solid rgba(0,0,0,.175); border-radius: .5rem; outline: 0; overflow: hidden; }
dialog.cal-dialog:not([open]) { display: none; }
dialog.cal-dialog[open], .cal-dialog-content { display: flex; flex-direction: column; }
.cal-dialog-content { min-height: 0; max-height: inherit; width: 100%; }
.cal-dialog-header { display: flex; flex-shrink: 0; align-items: center; justify-content: space-between; padding: 1rem; border-bottom: 1px solid #dee2e6; }
.cal-ui .cal-dialog-title { margin: 0; font: inherit; font-size: 1.25rem; font-weight: 500; line-height: 1.5; }
.cal-ui .cal-close { box-sizing: content-box; flex: 0 0 auto; width: 1em; height: 1em; padding: .5rem; margin: -.5rem -.5rem -.5rem auto; font: inherit; line-height: 1; color: #000; background: transparent url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e") center/1em auto no-repeat; border: 0; border-radius: .375rem; opacity: .5; cursor: pointer; }
.cal-close:hover { opacity: .75; }
.cal-close:focus-visible { outline: 0; box-shadow: 0 0 0 .25rem rgba(13,110,253,.25); opacity: 1; }
.cal-dialog-body { position: relative; flex: 1 1 auto; min-height: 0; padding: 1rem; overflow-y: auto; }
.cal-dialog-footer { display: flex; flex-wrap: wrap; flex-shrink: 0; align-items: center; justify-content: flex-end; padding: .75rem; border-top: 1px solid #dee2e6; }
.cal-dialog-footer > * { margin: .25rem; }
.cal-dialog-footer img { vertical-align: middle; }

@media (min-width: 576px) {
    dialog.cal-dialog { top: 1.75rem; width: calc(100% - 3.5rem); max-height: calc(100vh - 3.5rem); }
}
@media (min-width: 768px) {
    .cal-menu-column { width: 91.66666667%; }
    .cal-panel-column { width: 41.66666667%; }
    .cal-drop-column { width: 16.66666667%; }
}
@media (min-width: 992px) {
    .cal-ui .cal-nav-links { flex-direction: row; }
    .cal-ui .cal-nav-link { padding-right: .5rem; padding-left: .5rem; }
    .cal-ui .cal-dropdown-menu { position: absolute; top: 100%; left: 0; }
}
@media (min-width: 1200px) {
    .cal-ui h4, .cal-ui .cal-size-heading { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .cal-ui .cal-control, .cal-ui .cal-select, .cal-ui .cal-button { transition: none; }
}
