/* MeinWeg 18.1.17 — refinamento progressivo e acessível de campos nativos.
 * O elemento original conserva nome, valor, validacao e eventos do formulario.
 * Os popups sao renderizados fora dos cards para evitar cortes por overflow. */
.mw-ui-enhanced{position:relative;display:block;width:100%;min-width:0;box-sizing:border-box}
.mw-ui-native{position:absolute!important;width:1px!important;height:1px!important;max-width:1px!important;max-height:1px!important;padding:0!important;margin:0!important;border:0!important;opacity:0!important;clip-path:inset(50%)!important;overflow:hidden!important;pointer-events:none!important}
.mw-ui-trigger{box-sizing:border-box!important;display:flex!important;align-items:center!important;justify-content:space-between!important;gap:9px!important;width:100%!important;min-width:0!important;min-height:var(--mw-ui-height,48px)!important;margin:0!important;padding:10px 15px!important;border:1px solid #ddd6ec!important;border-radius:14px!important;background:#fff!important;color:#243752!important;font:inherit!important;font-size:inherit!important;line-height:1.4!important;text-align:left!important;cursor:pointer!important;box-shadow:none!important;transition:border-color .15s,box-shadow .15s!important}
.mw-ui-trigger:hover{border-color:#b99cfc!important;background:#fcfaff!important}
.mw-ui-trigger:focus-visible,.mw-ui-trigger[aria-expanded=true]{outline:none!important;border-color:#8b5cf6!important;box-shadow:0 0 0 3px rgba(124,58,237,.15)!important}
.mw-ui-trigger:disabled{background:#f4f1f8!important;color:#77718d!important;cursor:not-allowed!important}
.mw-ui-trigger-text{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1;min-width:0}
.mw-ui-trigger-placeholder{color:#858094}
.mw-ui-trigger-icon{flex:none;width:17px;height:17px;display:inline-flex;align-items:center;justify-content:center;color:#7541d7;font-size:15px;line-height:1}
.mw-ui-panel{position:fixed;box-sizing:border-box;min-width:175px;max-width:calc(100vw - 16px);max-height:calc(100vh - 16px);padding:7px;border:1px solid #e1d7f7;border-radius:17px;background:#fff;box-shadow:0 18px 46px rgba(46,26,99,.19);z-index:2147483000;overflow:auto;overscroll-behavior:contain;font-family:inherit;color:#233654}
.mw-ui-panel[hidden]{display:none!important}
.mw-ui-panel button{font:inherit;cursor:pointer}
.mw-ui-options{max-height:inherit;overflow-y:auto;overscroll-behavior:contain}
.mw-ui-choice{display:flex;align-items:center;justify-content:space-between;gap:9px;width:100%;min-height:38px;padding:9px 11px;border:0;border-radius:10px;background:transparent;color:#263955;text-align:left;font-size:13px;line-height:1.35}
.mw-ui-choice:hover,.mw-ui-choice:focus-visible,.mw-ui-choice[data-active=true]{outline:0;background:#f0e8ff;color:#6735d7}
.mw-ui-choice[aria-selected=true]{background:#eee6ff;color:#6e35db;font-weight:750}
.mw-ui-choice:disabled{opacity:.5;cursor:not-allowed}
.mw-ui-search{box-sizing:border-box!important;width:100%!important;min-height:39px!important;margin:0 0 7px!important;padding:9px 12px!important;border:1px solid #ded4f2!important;border-radius:11px!important;outline:none!important;background:#fbfaff!important;color:#243752!important;font:inherit!important;font-size:13px!important}
.mw-ui-search:focus{border-color:#8b5cf6!important;box-shadow:0 0 0 3px rgba(139,92,246,.13)!important}
.mw-ui-group{margin:8px 7px 3px;color:#7857b7;font-weight:800;font-size:11px;letter-spacing:.045em}
.mw-ui-empty{font-size:13px;color:#74718a;padding:14px;text-align:center}
.mw-ui-panel.mw-ui-calendar{width:min(344px,calc(100vw - 16px));padding:11px}
.mw-ui-calendar-head{display:flex;align-items:center;justify-content:space-between;gap:3px;margin-bottom:10px}
.mw-ui-calendar-nav{width:32px;height:34px;flex:none;border:0;border-radius:9px;background:#f6f1ff;color:#6941bf;font-weight:850;font-size:19px}
.mw-ui-calendar-nav:hover:not(:disabled),.mw-ui-calendar-nav:focus-visible{background:#e9dcff;outline:2px solid #a78bfa}
.mw-ui-calendar-nav:disabled{opacity:.32;cursor:not-allowed}
.mw-ui-calendar-month{flex:1;text-align:center;font-weight:800;font-size:13px;color:#293452}
.mw-ui-calendar-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:3px}
.mw-ui-calendar-weekday{text-align:center;font-weight:700;font-size:11px;color:#817494;padding:6px 0}
.mw-ui-calendar-empty{min-height:36px}
.mw-ui-day{min-width:0;height:36px;padding:0;border:0;border-radius:9px;background:#fff;color:#263754;font-weight:650;font-size:13px}
.mw-ui-day:hover:not(:disabled),.mw-ui-day:focus-visible{background:#f1eaff;outline:2px solid #bba6f7}
.mw-ui-day[data-today=true]{box-shadow:inset 0 0 0 1px #c3a8ff}
.mw-ui-day[data-selected=true]{background:#7837f0!important;color:#fff!important;outline:0!important}
.mw-ui-day:disabled{opacity:.25;cursor:not-allowed}
.mw-ui-calendar-footer{display:flex;justify-content:space-between;align-items:center;margin-top:10px;padding-top:9px;border-top:1px solid #eee7fa;gap:9px}
.mw-ui-utility{border:0;background:#f5efff;border-radius:9px;color:#6736c7;font-weight:700;font-size:12px;padding:9px 12px}
.mw-ui-utility:hover,.mw-ui-utility:focus-visible{background:#e9dfff;outline:2px solid #b59af1}
.mw-ui-panel.mw-ui-time{width:min(308px,calc(100vw - 16px));padding:14px}
.mw-ui-time-label{display:block;margin:1px 0 8px;font-weight:800;font-size:13px;color:#293754}
.mw-ui-time-preview{box-sizing:border-box;width:100%!important;min-height:42px!important;padding:10px 12px!important;border:1px solid #d7caec!important;border-radius:11px!important;background:#fbfaff!important;color:#243752!important;font:inherit!important;font-size:17px!important;font-weight:700!important;text-align:center!important;letter-spacing:.05em!important}
.mw-ui-time-preview:focus{outline:2px solid #b49afd!important;outline-offset:1px!important}
/* Versao 18.1.17: um unico painel de horario, sem listas duplas nem barras internas. */
.mw-ui-enhanced.mw-ui-time{width:100%;max-width:none;padding:0;min-width:0}
.mw-ui-panel.mw-ui-time{overflow:visible}
.mw-ui-time-controls{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px;margin:13px 0}
.mw-ui-time-field{min-width:0}
.mw-ui-time-caption{display:block;color:#7856bc;font-weight:800;font-size:11px;margin:0 0 6px;text-align:center}
.mw-ui-time-stepper{display:grid;grid-template-columns:34px minmax(0,1fr) 34px;align-items:center;gap:4px;min-height:45px;padding:4px;border:1px solid #e9def9;border-radius:13px;background:#faf8ff}
.mw-ui-time-stepper button{height:34px;border:0;border-radius:9px;background:#eee6ff;color:#6737ce;font-size:21px;font-weight:650;line-height:1}
.mw-ui-time-stepper button:hover,.mw-ui-time-stepper button:focus-visible{background:#e1d1ff;outline:2px solid #ab86f5;outline-offset:1px}
.mw-ui-time-number{text-align:center;color:#283750;font-size:19px;font-weight:800;font-variant-numeric:tabular-nums}
.mw-ui-time-shortcuts{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding-top:10px;border-top:1px solid #eee8f9}
.mw-ui-time-shortcut-caption{font-size:11px;font-weight:800;color:#7860a8;margin-right:auto}
.mw-ui-time-chip{padding:6px 8px;border:1px solid #eee2fd;border-radius:9px;background:#faf7ff;color:#653aca;font-size:12px;font-weight:750;font-variant-numeric:tabular-nums}
.mw-ui-time-chip:hover,.mw-ui-time-chip:focus-visible{background:#eee4ff;outline:2px solid #ae92f5}
.mw-ui-time-chip[aria-pressed=true]{background:#7838ef;color:#fff;border-color:#7838ef}
.mw-ui-time-footer{display:flex;justify-content:space-between;gap:8px;margin-top:12px}
.mw-ui-time-error{font-size:12px;color:#b4233c;margin-top:7px}
@media(max-width:520px){.mw-ui-panel{border-radius:15px}.mw-ui-trigger{padding:9px 12px!important}.mw-ui-calendar{padding:9px}}
@media(prefers-reduced-motion:reduce){.mw-ui-trigger{transition:none!important}}

.mw-ui-month-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;margin:8px 0}
.mw-ui-month-choice{min-height:45px;padding:6px;border:0;border-radius:10px;background:#faf7ff;color:#47306f;font-weight:700;font-size:13px}
.mw-ui-month-choice:hover:not(:disabled),.mw-ui-month-choice:focus-visible{background:#e8dcff;outline:2px solid #aa89f5}
.mw-ui-month-choice[data-selected=true]{background:#7b38ee;color:#fff}
.mw-ui-month-choice:disabled{opacity:.27;cursor:not-allowed}

/* Evita alturas e largura diferentes quando date/time estao lado a lado na Agenda. */
.agenda-form-card .form-grid{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
.agenda-form-card .form-grid > div{min-width:0}
.agenda-form-card .form-grid .mw-ui-enhanced{width:100%;padding:0;margin:7px 0 12px}
.agenda-form-card .form-grid .mw-ui-trigger{height:52px;min-height:52px!important}
@media(max-width:520px){.agenda-form-card .form-grid{gap:12px}.mw-ui-panel.mw-ui-time{padding:12px}.mw-ui-time-stepper{grid-template-columns:30px minmax(0,1fr) 30px}}
/* Mantem o empilhamento responsivo aprovado no CSS principal. */
@media(max-width:700px){.agenda-form-card .form-grid{grid-template-columns:minmax(0,1fr);gap:4px}}
