:root { --bs-primary: #007da5; }
body { background: #f8f7f2; color: #123b4a; }
.navbar .logo { max-height: 58px; width: auto; }
.fc .fc-button-primary { background: #123b4a; border-color: #123b4a; }
.fc .fc-button-primary:not(:disabled).fc-button-active { background: #007da5; border-color: #007da5; }
.fc .fc-multimonth { background: white; }
.fc .fc-multimonth-title { font-family: Georgia, serif; }
.fc .fc-daygrid-day-number { min-width: 30px; min-height: 30px; }
.fc .fc-daygrid-day:hover { background: #e0edf0; cursor: pointer; }
@media(max-width: 700px) {
  .fc .fc-toolbar { flex-wrap: wrap; gap: 12px; }
  .fc .fc-toolbar-title { font-size: 1.4rem; }
  .fc .fc-button { font-size: .78rem; padding: .4em .55em; }
  .fc .fc-multimonth { height: auto !important; max-height: none; }
}
.fc .unreservable{background:#a44735!important;border-color:#a44735!important;color:#fff!important;cursor:not-allowed}.fc .unreservable .fc-event-title{color:#fff!important}.fc-multimonth .fc-event{font-size:.72rem}.fc-multimonth .fc-event-time{display:none}
.fc td.rederij-blocked,.fc td.rederij-blocked:hover{background:#f7d5cc!important}.rederij-blocked .fc-daygrid-day-number{color:#7c281c;font-weight:800}.rederij-block-key{display:inline-block;width:15px;height:15px;background:#f7d5cc;border:1px solid #a44735;vertical-align:middle;margin-right:6px}

/* Readable controls for all members, including touch and keyboard users. */
body{font-size:18px;line-height:1.6}
.btn,.btn-sm,.form-control,.form-control-sm,.form-select,.form-select-sm{font-size:1rem;min-height:48px}
.navbar a{min-height:48px;display:inline-flex;align-items:center}
.small,small{font-size:.9rem}
a:focus-visible,button:focus-visible,input:focus-visible,select:focus-visible,summary:focus-visible{outline:3px solid #007da5;outline-offset:3px}
.text-danger{color:#982c20!important}
.rederij-period{border:1px solid #849da5;background:#fff}
.rederij-period-fields{display:flex;align-items:end;gap:16px;flex-wrap:wrap}
.rederij-period-fields label,.rederij-sailing-dates label{display:flex;flex-direction:column;gap:7px;font-weight:650}
.rederij-period-fields input{max-width:240px}
.rederij-sailing-dates{display:flex;flex-wrap:wrap;gap:20px;width:100%}
.rederij-sailing-dates p{flex-basis:100%}
#period-status{font-weight:650}
.fc .fc-daygrid-day-number{font-size:1rem;min-width:36px;min-height:36px}
.fc .fc-button,.fc-multimonth .fc-event{font-size:1rem;min-height:44px}
.fc .fc-daygrid-day-frame{min-height:70px}
.fc .fc-highlight{background:#a5d7e7;opacity:.7}
#boekingsregels summary{font-size:1.1rem;min-height:44px}
@media(max-width:700px){.rederij-period-fields>*,.rederij-sailing-dates>label{width:100%}.rederij-period-fields input{max-width:none}.fc .fc-toolbar{gap:14px}.fc .fc-button{font-size:15px;min-height:44px}.fc .fc-daygrid-day-number{font-size:16px}.fc .fc-toolbar-title{font-size:1.5rem}.buttonsEdit{display:flex;flex-wrap:wrap;gap:8px}}

/* Keep the sign-in fields visible without a large decorative logo. */
#page-login .login-icon img{max-width:112px;height:auto}
#page-login .form-control,#page-login .btn{font-size:18px}

.rederij-points-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.rederij-points-summary>div{background:#e1eef0;border-radius:6px;padding:18px}
.rederij-points-summary span,.rederij-points-summary strong{display:block}
.rederij-points-summary strong{font-size:28px;overflow-wrap:anywhere}
.rederij-crew-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px 20px}
.rederij-crew-options label{display:flex;align-items:center;gap:12px;min-height:48px;padding:8px;cursor:pointer}
.rederij-crew-options input{width:24px;height:24px;flex-shrink:0;accent-color:#123b4a}
.reservationDescription summary{min-height:48px;padding:10px 0;cursor:pointer}
#rederij-pool-confirm input{width:24px;height:24px;vertical-align:middle}
@media(max-width:650px){.rederij-points-summary{grid-template-columns:1fr}.rederij-crew-options{grid-template-columns:1fr}}

.rederij-booking-header{gap:12px;flex-wrap:wrap}
@media(max-width:650px){.rederij-booking-header .reservationHeader{flex-basis:100%}.rederij-points-summary>div{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:12px 16px}}

/* The management entry stays clear on every member page. */
a.rederij-admin-link,a.rederij-admin-link:visited{background:#a52a2a;color:#fff;border:2px solid #a52a2a;border-radius:5px;font-weight:800;padding:8px 16px;text-decoration:none}
a.rederij-admin-link:hover,a.rederij-admin-link:active{background:#7d1f1f;border-color:#7d1f1f;color:#fff}
a.rederij-admin-link:focus-visible{outline:3px solid #007da5;outline-offset:3px}
header nav a.rederij-admin-link[aria-current=page]{border-bottom:3px solid #5c1717;color:#fff}

#rederij-owner-payment label{display:flex;align-items:flex-start;gap:12px;min-height:48px;cursor:pointer}
#rederij-owner-pays-all{width:24px;height:24px;flex-shrink:0;margin-top:2px;accent-color:#123b4a}

/* Plain-language booking guide within the calendar disclosure. */
.booking-rules{max-width:900px;padding-top:24px}
.booking-rules h3{font-size:1.3rem;margin:30px 0 12px}
.booking-rules h4{font-size:1.1rem;font-weight:700;margin:0 0 10px}
.booking-rules li{margin-bottom:10px}
.booking-rules .rules-note,.booking-rules .rules-example{background:#e1eef0;padding:18px;border-radius:6px}
.booking-rules .rules-example p:last-child,.booking-rules .rules-example ul:last-child{margin-bottom:0}
.booking-rules .table th,.booking-rules .table td{padding:12px}
.booking-rules .rules-extra{border-top:1px solid #b8cbd0;padding:16px 0}
.booking-rules .rules-extra[open] summary{margin-bottom:14px}
.booking-rules dt{font-weight:700}
.booking-rules dd{margin-bottom:14px}

/* Show the main booker and accompanying members directly in calendar entries. */
.fc .rederij-booking .fc-event-title,
.fc .rederij-booking .fc-list-event-title {
  white-space: pre-line;
  overflow-wrap: anywhere;
}
.fc .rederij-booking .fc-event-title-container { min-width: 0; }

/* Calendar weather: keep a separate target beside the date number. */
#calendar .fc-daygrid-day-top { position: relative; min-height: 38px; }
#calendar .calendar-weather-button {
  position: absolute; left: 1px; top: 2px; z-index: 4;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 26px; height: 34px; min-width: 0; min-height: 0;
  padding: 0; border: 1px solid #667c89; border-radius: 5px;
  background: #fff; color: #243d4b; font-size: 16px; line-height: 1;
  cursor: pointer; touch-action: manipulation;
}
#calendar .calendar-wind-value { font-weight: 700; font-variant-numeric: tabular-nums; }
#calendar .calendar-wind-unit { font-size: 10px; line-height: 1.1; }
#calendar .calendar-weather-button.calendar-weather-forecast,
.calendar-weather-key .calendar-weather-forecast { background: #e1f1ff; border: 2px dashed #29608c; }
/* Red highlights use the same 7 Bft boundary for measurements and forecasts. */
#calendar .calendar-weather-button.calendar-weather-strong,
.calendar-weather-key .calendar-weather-strong {
  background: #fce4e4; color: #9b1717; border: 2px solid #b42323; border-radius: 5px;
}
#calendar .calendar-weather-button.calendar-weather-strong.calendar-weather-forecast { border-style: dashed; }
#calendar .calendar-weather-button:focus-visible { outline: 3px solid #b54a00; outline-offset: 2px; }
.calendar-weather-key { margin: 10px 0 4px; font-size: .95rem; }
.calendar-weather-key span { display: inline-block; padding: 1px 4px; }
#calendar-weather-details { max-width: 520px; width: calc(100% - 32px); max-height: 85vh; overflow: auto; padding: 24px; border: 1px solid #667c89; border-radius: 12px; color: #243d4b; }
#calendar-weather-details::backdrop { background: rgb(0 0 0 / 45%); }
#calendar-weather-details dt { font-weight: 700; }
#calendar-weather-details dd { margin: 0 0 10px; }
@media print { .calendar-weather-key, #calendar-weather-status, #calendar-weather-details, .calendar-weather-button { display: none !important; } }

#calendar .fc-daygrid-day-top:has(.calendar-weather-button) .fc-daygrid-day-number { min-width: 0; padding-right: 1px; padding-left: 0; }

.calendar-weather-heading { display: flex; gap: 12px; align-items: start; justify-content: space-between; margin-bottom: 16px; }
.calendar-weather-heading h2 { font-size: 1.4rem; margin: 0; }
.calendar-weather-heading button { flex-shrink: 0; }

/* Match the booker's event colour; labels remain readable without colour perception. */
.calendar-member-legend { padding: 12px 16px; background: #fff; border: 1px solid #b6c8cf; border-radius: 6px; }
.calendar-member-legend ul { display: flex; flex-wrap: wrap; gap: 12px 24px; list-style: none; padding: 0; margin: 8px 0 0; }
.calendar-member-legend li { display: inline-flex; align-items: center; gap: 8px; }
.calendar-member-swatch, .calendar-member-legend .rederij-block-key { display: inline-block; width: 20px; height: 20px; flex: 0 0 20px; margin: 0; border: 1px solid rgb(0 0 0 / 25%); border-radius: 4px; }

/* Keep the member colour visible even when the year view collapses event labels. */
#calendar td.rederij-member-day { box-shadow: inset 0 -6px 0 var(--member-booking-colour); }

@media (max-width: 700px) {
  .navbar-toggler { min-width: 48px; min-height: 48px; }
  .navbar .nav-link, .navbar .dropdown-item { min-height: 48px; font-size: 16px; white-space: normal; }
  .fc .fc-header-toolbar { display: grid; grid-template-columns: minmax(0, 1fr); }
  .fc .fc-toolbar-chunk { min-width: 0; text-align: center; }
  .fc .fc-toolbar-chunk .fc-button-group { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px; margin: 0; }
  .fc .fc-button-group > .fc-button { flex: 1 1 auto; margin: 0; border-radius: 5px; min-height: 48px; font-size: 16px; }
  .fc .fc-daygrid-event .fc-event-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .fc .fc-popover { max-width: calc(100vw - 24px); }
  .fc .fc-popover .fc-event-title, .fc .fc-list-event-title { white-space: pre-line; overflow-wrap: anywhere; }
  .fc .fc-daygrid-day-frame { min-height: 92px; }
  #calendar .fc-daygrid-day-top:has(.calendar-weather-button) { min-height: 70px; }
  #calendar .calendar-weather-button { top: 34px; left: 50%; transform: translateX(-50%); width: 32px; height: 34px; }
  #calendar .fc-daygrid-day-top:has(.calendar-weather-button) .fc-daygrid-day-number { padding: 4px; min-width: 32px; }
  .rederij-sailing-dates input, .rederij-period-fields input { min-width: 0; width: 100%; max-width: 100%; font-size: 16px; }
  .buttonsEdit { width: 100%; float: none !important; }
  .buttonsEdit > .btn { flex: 1 1 140px; white-space: normal; }
  .rederij-points-summary > div { display: block; }
  .rederij-crew-options label { align-items: flex-start; overflow-wrap: anywhere; }
  .calendar-member-legend ul { flex-direction: column; gap: 12px; }
  #calendar-weather-details { padding: 16px; }
  .calendar-weather-heading { flex-wrap: wrap; }
  .calendar-weather-heading button { min-height: 48px; }
}

/* Activity details are available by mouse, keyboard and touch. */
#calendar-activity-details { width: calc(100% - 32px); max-width: 580px; max-height: 85vh; overflow: auto; padding: 24px; border: 1px solid #667c89; border-radius: 12px; color: #243d4b; }
#calendar-activity-details::backdrop { background: rgb(0 0 0 / 45%); }
#calendar-activity-description { white-space: pre-wrap; overflow-wrap: anywhere; }
.fc .club-activity { cursor: pointer; }
.fc .club-activity:focus-visible { outline: 3px solid #007da5; outline-offset: 2px; }
@media (max-width: 700px) { #calendar-activity-details { padding: 16px; } #calendar-activity-edit, #period-activity { white-space: normal; min-height: 48px; } }

/* A compact guide: key steps first, one topic at a time. */
.booking-rules { max-width: 980px; margin-inline: auto; }
.booking-rules h2 { font: 700 1.5rem/1.3 system-ui, sans-serif; }
.rules-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; padding: 0; list-style: none; }
.rules-steps li { margin: 0; padding: 18px; border: 1px solid #b8cbd0; border-radius: 10px; background: #f4f8f9; }
.rules-steps strong, .rules-steps span { display: block; }
.rules-steps span { margin-top: 8px; }
.booking-rules .rules-note { font-size: 1rem; background: #f4f8f9; }
.booking-rules .rules-topic { border-top: 1px solid #b8cbd0; }
#boekingsregels .rules-topic > summary, #boekingsregels .rules-extra > summary { padding: 16px 4px; font-weight: 650; cursor: pointer; }
.booking-rules .rules-topic-content { padding: 4px 4px 20px; }
.booking-rules .rules-extra { padding: 0; }
.booking-rules .rules-topic[open] > summary { color: #006180; }
.booking-rules .rules-example { border-left: 4px solid #007da5; margin-block: 18px; }
.booking-rules .rules-example h4 { font-size: 1.1rem; }
.booking-rules .table { margin-bottom: 0; }
.booking-rules caption { caption-side: top; color: #365765; }
@media (max-width: 700px) { .rules-steps { grid-template-columns: minmax(0, 1fr); gap: 10px; } .rules-steps li { padding: 14px; } }
