/* Scoped to the public agenda and its existing DPCalendar controls. */
/* Choices can open upwards or downwards. Neither the native filter form nor
   its collapse wrapper may clip the open topic menu. Keep normal collapse
   behaviour while the menu is closed and stay below site navigation/modals. */
:is(.com-dpcalendar-list,.com-dpcalendar-calendar) .dp-filter:has(.dp-field-filtertags .choices.is-open) { position:relative; z-index:20; overflow:visible!important; }
:is(.com-dpcalendar-list,.com-dpcalendar-calendar) .dp-filter__calendars:has(.dp-field-filtertags .choices.is-open) { overflow:visible!important; }
:is(.com-dpcalendar-list,.com-dpcalendar-calendar) .dp-field-filtertags .choices.is-open { z-index:2; }
.agenda60-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; margin:0 0 20px; }
:is(.com-dpcalendar-list,.com-dpcalendar-calendar) a[data-agenda60-link][hidden] { display:none!important; }
.agenda60-toolbar a.uk-button { margin:0!important; min-height:48px; display:inline-flex; align-items:center; justify-content:center; padding:10px 22px; border:1px solid #c7d6cb; border-radius:10px; color:#123f32; background:#fff; font-weight:700; line-height:1.4; text-decoration:none; }
.agenda60-toolbar a[aria-current="page"] { background:#e3ecdf; border-color:#b5cbb9; }
.agenda60-toolbar a.uk-button:hover { background:#eef3e9; border-color:#2b6653; }
.agenda60-toolbar a:focus-visible,.agenda60-active-filters a:focus-visible { outline:3px solid #2b6653; outline-offset:3px; }
.agenda60-active-filters { flex:1 1 100%; display:flex; flex-wrap:wrap; gap:10px; align-items:center; color:#123f32; font-size:.95rem; line-height:1.5; }
.agenda60-filter-chip { display:inline-flex; align-items:center; gap:10px; background:#eef3e9; border:1px solid #cfdbcd; border-radius:24px; padding:7px 14px; color:#123f32; text-decoration:none; }
.agenda60-filter-chip:hover { background:#e3ecdf; }
.agenda60-filter-reset { font-weight:700; text-underline-offset:3px; }
.agenda60-period-label { display:block; margin-bottom:5px; color:#52665b; font-size:.85rem; font-weight:400; line-height:1.4; }
.agenda60-help { display:block; margin:7px 0 0; color:#57666d; font-size:.875rem; line-height:1.5; font-weight:400; }
.agenda60-edit-row > .controls { display:block!important; min-width:0; }
#jform_com_fields_agenda_kosten[hidden] { display:none!important; }
.agenda60-edit-row .agenda60-help { display:block; clear:both; margin:10px 0 0!important; max-width:75ch; }
.agenda60-edit-row .agenda60-contact-preview { margin:10px 0 0; line-height:1.5; }
.agenda60-edit-row .agenda60-contact-preview:empty { display:none; }
.agenda60-edit-row .form-control-feedback,
.com-dpcalendar-eventform .form-control-feedback { display:block; margin-top:8px; line-height:1.4; }
.agenda60-cost-controls { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; }
.agenda60-cost-controls:has(.agenda60-cost-amount:not([hidden])) { grid-template-columns:minmax(180px,1fr) minmax(160px,1fr); align-items:end; }
.agenda60-cost-mode,.agenda60-cost-amount input { box-sizing:border-box; width:100%; min-height:48px; margin:0; }
.agenda60-cost-amount > label { display:block; margin:0 0 8px; font-weight:600; }
.agenda60-cost-existing { margin:10px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.agenda60-cost-controls [hidden],.agenda60-cost-existing[hidden] { display:none!important; }
@media (max-width:640px) { .agenda60-cost-controls:has(.agenda60-cost-amount:not([hidden])) { grid-template-columns:minmax(0,1fr); } }
.agenda60-warning { padding:12px 16px; border-left:4px solid #a36d16; background:#fff7e4; color:#67470d; border-radius:6px; }
.was-event-time { overflow-wrap:normal; }
@media (max-width:640px) { .agenda60-toolbar { gap:10px; } .agenda60-toolbar a.uk-button { padding:10px 16px; min-height:44px; } .agenda60-active-filters { font-size:.9rem; } }
@media print { .agenda60-toolbar { display:none!important; } }

.agenda60-periods { display:flex; flex-wrap:wrap; gap:12px; margin-left:auto; }
.agenda60-toolbar a[aria-pressed="true"] { background:#e3ecdf; border-color:#b5cbb9; }
.com-dpcalendar-list .dp-button-bar__navigation[hidden] { display:none!important; }
@media(max-width:640px) { .agenda60-periods { flex:1 1 100%; margin-left:0; gap:10px; } .agenda60-periods a.uk-button { flex:1 1 auto; } }

/* Smartphone: one clear list; keep filter status and date controls available. */
@media screen and (max-width:767px) {
  .agenda60-toolbar > a[data-agenda60-link],
  .agenda60-toolbar .agenda60-periods { display:none!important; }
}
