/* Calendar grid */
.zwv-calendar{max-width:100%;width:100%;margin:1rem 0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif}
.zwv-calendar-controls{display:flex;align-items:center;gap:.5rem;justify-content:center;margin-bottom:.5rem}
.zwv-cal-nav{padding:.25rem .5rem;text-decoration:none;border:1px solid #ddd;border-radius:4px;color:#333}
/* Frontend: match term buttons with blue background */
.zwv-calendar[data-context="frontend"] .zwv-cal-nav{background:#9ACD32;color:#fff;border:none;border-radius:6px;padding:.25rem .5rem;display:inline-flex;align-items:center;justify-content:center}
.zwv-calendar[data-context="frontend"] .zwv-cal-nav:hover{background:#86B926;color:#fff}
.zwv-calendar[data-context="frontend"] .zwv-cal-nav:focus{outline:2px solid #4F8F00;outline-offset:1px}
/* Frontend: month picker styled like buttons but with gray background */
.zwv-calendar[data-context="frontend"] .zwv-month-picker{
  background:#F2F2F2;
  color:#111;
  border:none;
  border-radius:6px;
  padding:.25rem .5rem;
  height:32px;
  line-height:28px;
}
.zwv-calendar[data-context="frontend"] .zwv-month-picker:focus{outline:2px solid #9ACD32;outline-offset:1px}

/* Mobile day column navigation */
.zwv-calendar{position:relative}
.zwv-cal-viewport{width:100%;margin:0;box-sizing:border-box}
.zwv-calendar[data-context="frontend"] .zwv-cal-stage{overflow:visible}
.zwv-calendar[data-context="frontend"] .zwv-cal-grid{transition:transform .3s ease}
/* Help browsers prepare for transform; improves crispness */
.zwv-calendar[data-context="frontend"] .zwv-cal-grid{will-change:transform}
/* Large gray SVG arrows for swipe */
.zwv-calendar[data-context="frontend"] .zwv-day-nav{display:none}

@media (max-width: 768px){
  .zwv-cal-viewport{display:grid;grid-template-columns:56px minmax(0,1fr) 56px;align-items:stretch}
  .zwv-calendar[data-context="frontend"] .zwv-cal-stage{grid-column:2;overflow:hidden;padding:0 1px}
  .zwv-calendar[data-context="frontend"] .zwv-day-nav{background:transparent;border:none;padding:0;width:56px;height:72px;display:inline-flex;align-items:center;justify-content:center;cursor:pointer;align-self:center}
  .zwv-calendar[data-context="frontend"] .zwv-day-nav .zwv-chevron{width:40px;height:64px;stroke:#9e9e9e;fill:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round}
  .zwv-calendar[data-context="frontend"] .zwv-day-nav:hover .zwv-chevron{stroke:#6e6e6e}
  /* Move focus ring from button to SVG */
  .zwv-calendar[data-context="frontend"] .zwv-day-nav:focus{outline:none}
  .zwv-calendar[data-context="frontend"] .zwv-day-nav:focus .zwv-chevron,
  .zwv-calendar[data-context="frontend"] .zwv-day-nav:focus-visible .zwv-chevron{outline:2px solid #9e9e9e;outline-offset:4px;border-radius:6px}
  .zwv-calendar[data-context="frontend"] .zwv-day-prev{grid-column:1}
  .zwv-calendar[data-context="frontend"] .zwv-day-next{grid-column:3}
}
.zwv-cal-grid{width:100%;border-collapse:collapse;table-layout:fixed}
.zwv-cal-grid th,.zwv-cal-grid td{border:1px solid #e5e7eb;padding:6px;vertical-align:top}

/* Ensure theme table styles (e.g., .entry-content tr td) don't override calendar cell padding */
.entry-content .zwv-cal-grid th,
.entry-content .zwv-cal-grid td{padding:6px;border:1px solid #e5e7eb}
.zwv-empty{background:#fafafa}
.zwv-day{position:relative;cursor:default}
.zwv-day[data-clickable="1"]{cursor:pointer}
.zwv-day-num{font-weight:600;display:flex;align-items:center;gap:.25rem}
.zwv-day-bar{display:none}
.zwv-day.zwv-holiday,.zwv-day.zwv-sunday{background:#f6f7f9}
.zwv-day .zwv-info{display:inline-flex;align-items:center;justify-content:center;border:none;background:transparent;color:#6b7280;font-size:12px;line-height:1;cursor:pointer;padding:2px;border-radius:4px}
.zwv-day .zwv-info:hover{background:rgba(0,0,0,.06)}

/* Popover for holiday info */
.zwv-popover{position:absolute;z-index:30;max-width:240px;background:#fff;color:#111;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 10px 20px rgba(0,0,0,.15);padding:.5rem .6rem;font-size:12px}
.zwv-popover .zwv-popover-close{position:absolute;top:4px;right:6px;border:none;background:transparent;color:#6b7280;cursor:pointer}
/* no daily legend */

/* Dialog */
dialog.zwv-dialog{border:none;border-radius:8px;box-shadow:0 10px 30px rgba(0,0,0,.2);padding:0;max-width:570px;width:90%}
.zwv-dialog-header{display:flex;justify-content:space-between;align-items:flex-start;padding:1rem;border-bottom:1px solid #eee}
.zwv-dialog-header .zwv-head-left{display:flex;flex-direction:column;gap:.25rem}
.zwv-dialog-header .zwv-form-intro{margin:0;color:#374151}
.zwv-dialog-header .zwv-close{background:#F2F2F2;border:none;color:#111;border-radius:6px;cursor:pointer;width:32px;height:32px;line-height:28px;display:inline-flex;align-items:center;justify-content:center}
.zwv-dialog-header .zwv-close:hover{background:#e5e7eb}
.zwv-dialog-header .zwv-close:focus{outline:2px solid #9e9e9e;outline-offset:2px}
.zwv-booking-form{padding:1rem}
.zwv-form-intro{margin-bottom:.75rem;color:#374151}
.zwv-field{margin-bottom:.75rem}
.zwv-field label{display:block;margin-bottom:.25rem}
.zwv-field.zwv-row label{display:inline-block;margin-right:.5rem}
.zwv-field.zwv-row label input,.zwv-field.zwv-row label select{min-width:160px}
.zwv-field input,.zwv-field textarea{width:100%}
.zwv-actions{margin-top:1rem}
.zwv-feedback{margin-top:.5rem;color:#2563eb}
.zwv-feedback.is-error{color:#E53935}

/* Hide school checkbox by default; JS shows it when both types exist */
.zwv-form-school-wrap{display:none}

/* Spinner */
.zwv-spinner{display:inline-block;width:16px;height:16px;margin-left:8px;border:2px solid rgba(0,0,0,.2);border-top-color:#2563eb;border-radius:50%;vertical-align:middle;animation:zwv-spin .6s linear infinite;opacity:0}
.zwv-spinner.is-active{opacity:1}
@keyframes zwv-spin{to{transform:rotate(360deg)}}

/* Honeypot wrapper should be hidden from users and AT */
.zwv-hp{position:absolute !important;left:-9999px !important;width:1px;height:1px;overflow:hidden}

/* Hide Divi's default post title wrapper on single blog posts */
.single-post .et_post_meta_wrapper{display:none !important}

/* Events list inside cells */
.zwv-event-list{display:flex;flex-direction:column;gap:.25rem;margin-top:.25rem}
.zwv-event{cursor:pointer;display:block;border:none;outline:none;text-align:left;padding:.25rem .4rem;border-radius:6px}
/* Ensure any generic chip base has no border */
.zwv-chip{border:none;outline:none}
.zwv-event.zwv-school{background:#007CAF !important;color:#fff !important}
.zwv-event.zwv-group{background:#93C5FD !important;color:#111 !important}
.zwv-event.zwv-inactive{opacity:.6}
.zwv-event.zwv-free{background:#9ACD32 !important;color:#fff !important}
.zwv-event.zwv-partial{background:#FFC107 !important;color:#111 !important}
.zwv-event.zwv-full{background:#E53935 !important;color:#fff !important}

/* Legend under calendar */
.zwv-legend{display:flex;flex-wrap:wrap;gap:.75rem;margin-top:.5rem;align-items:center}
.zwv-leg-item{display:inline-flex;align-items:center;gap:.4rem;color:#374151;font-size:14px}
.zwv-leg-box{width:14px;height:14px;border-radius:3px;display:inline-block}
.zwv-leg-green{background:#9ACD32}
.zwv-leg-yellow{background:#FFC107}
.zwv-leg-red{background:#E53935}
.zwv-leg-blue{background:#007CAF}
.zwv-leg-lightblue{background:#93C5FD}

/* Exponate shortcode layout */
.zwv-exponate-full{width:100%}
/* Ensure full width overrides Divi's row width */
.et_pb_row.zwv-exponate-full:not([class*=et_flex_column]){width:100% !important;max-width:100% !important}
.zwv-exponate{display:grid;grid-template-columns:1fr;gap:1rem;align-items:center;margin:1rem 0}
@media (min-width: 768px){
  .zwv-exponate{grid-template-columns:1fr 1fr}
}
.zwv-exp-title{margin:0 0 .5rem}
.zwv-exp-excerpt{color:#374151}
.zwv-exp-actions{margin:.75rem 0 0}
.zwv-exp-btn{display:inline-block;background:#9ACD32;color:#111;text-decoration:none;padding:.5rem .9rem;border-radius:6px;font-weight:600}
.zwv-exp-btn:hover{background:#86B926;color:#111}
.zwv-exp-thumb{width:100%;height:auto;border-radius:8px}

/* Booking form: match calendar style */
.zwv-booking-form input[type="text"],
.zwv-booking-form input[type="email"],
.zwv-booking-form input[type="tel"],
.zwv-booking-form input[type="number"],
.zwv-booking-form input[type="date"],
.zwv-booking-form select,
.zwv-booking-form textarea{
  appearance:none;
  -webkit-appearance:none;
  -moz-appearance:none;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:6px;
  padding:.5rem .6rem;
  font:inherit;
  color:#111;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.zwv-booking-form select{display:block;width:100%;margin-top:.25rem}

/* Schulklasse checkbox larger and before label text */
.zwv-form-kind-wrap{display:inline-flex;align-items:center;gap:.5rem;white-space:nowrap}
/* Ensure school label overrides generic block label rule */
.zwv-field .zwv-form-school-wrap{display:inline-flex !important}
.zwv-form-school{cursor:pointer;width:16px;height:16px;transform:scale(1.3);transform-origin:center;vertical-align:middle;accent-color:#9ACD32}
.zwv-booking-form select:disabled{
  background:#F2F2F2;
  color:#555;
}
.zwv-booking-form input:focus,
.zwv-booking-form select:focus,
.zwv-booking-form textarea:focus{
  outline:none;
  border-color:#9ACD32;
  box-shadow:0 0 0 2px rgba(154,205,50,.25);
}
.zwv-booking-form button[type="submit"],
.zwv-booking-form .button.button-primary{
  background:#9ACD32;
  color:#fff;
  border:none;
  border-radius:6px;
  padding:.5rem .9rem;
  font-weight:600;
  cursor:pointer;
}
.zwv-booking-form button[type="submit"]:hover,
.zwv-booking-form .button.button-primary:hover{background:#86B926}
.zwv-booking-form button[type="submit"]:focus,
.zwv-booking-form .button.button-primary:focus{outline:2px solid #4F8F00;outline-offset:2px}
.zwv-booking-form .button{border-radius:6px}

/* Two-column field grid for names/contact */
.zwv-grid-2{display:grid;grid-template-columns:1fr;gap:.5rem}
@media (min-width: 600px){
  .zwv-grid-2{grid-template-columns:1fr 1fr}
}
