.cbm-wrap .cbm-toolbar,
.cbm-filter-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin: 14px 0 18px;
}

.cbm-wrap,
.cbm-manager-page {
  max-width: 100%;
}

.cbm-frontend,
.cbm-manager-page,
.cbm-login-required {
  font-size: 16px;
}

.cbm-board-caption,
.cbm-shortcode-help {
  margin: 0 0 14px;
}

.cbm-board {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  overflow: hidden;
}

.cbm-grid-8 {
  display: grid;
  grid-template-columns: 220px repeat(7, minmax(90px, 1fr));
}

.cbm-board-header {
  background: #f6f7f7;
  border-bottom: 1px solid #dcdcde;
}

.cbm-head-cell,
.cbm-day-cell,
.cbm-cottage-name {
  padding: 12px;
  border-right: 1px solid #eee;
  min-height: 64px;
  box-sizing: border-box;
}

.cbm-head-cell:last-child,
.cbm-day-cell:last-child {
  border-right: 0;
}

.cbm-cottage-col {
  background: #fbfbfc;
  font-weight: 600;
  border-right: 1px solid #dcdcde;
}

.cbm-board-row {
  position: relative;
  border-bottom: 1px solid #eee;
  min-height: 64px;
}

.cbm-board-row:last-child {
  border-bottom: 0;
}

.cbm-day-cell {
  background-image: linear-gradient(to right, rgba(0,0,0,0.025), rgba(0,0,0,0.025));
}

.cbm-booking-layer {
  position: absolute;
  left: 220px;
  right: 0;
  top: 0;
  bottom: 0;
}

.cbm-booking-bar {
  position: absolute;
  top: 8px;
  height: 32px;
  border-radius: 8px;
  background: #2271b1;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  padding: 0 10px;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.cbm-booking-bar:hover,
.cbm-booking-bar:focus {
  color: #fff;
  background: #135e96;
}

.cbm-booking-bar-static {
  cursor: default;
}

.cbm-booking-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cbm-two-col {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

.cbm-form-card {
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  padding: 18px;
}

.cbm-form-wrap .cbm-form-card,
.cbm-manager-layout .cbm-form-card {
  max-width: 860px;
}

.cbm-notice,
.cbm-login-required {
  margin: 12px 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #dcdcde;
}

.cbm-login-required {
  background: #f6f7f7;
}

.cbm-list-table {
  margin-top: 8px;
}

.cbm-manager-layout {
  margin-top: 22px;
}

.cbm-manager-page .button,
.cbm-manager-page input,
.cbm-manager-page select {
  font-size: 15px;
}

@media (max-width: 1100px) {
  .cbm-grid-8 {
    grid-template-columns: 160px repeat(7, minmax(70px, 1fr));
  }

  .cbm-booking-layer {
    left: 160px;
  }

  .cbm-two-col {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 800px) {
  .cbm-board {
    overflow-x: auto;
  }

  .cbm-grid-8 {
    min-width: 780px;
  }
}


/* Front-end booking manager styling */
.cbm-manager-page {
  background: transparent;
  color: inherit;
}

.cbm-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid #d0d7de;
  background: #fff;
  color: inherit;
  text-decoration: none;
  line-height: 1.2;
  cursor: pointer;
  box-sizing: border-box;
}

.cbm-btn:hover,
.cbm-btn:focus {
  text-decoration: none;
  opacity: .95;
}

.cbm-btn-primary {
  background: #2271b1;
  border-color: #2271b1;
  color: #fff;
}

.cbm-btn-danger {
  background: #b32d2e;
  border-color: #b32d2e;
  color: #fff;
}

.cbm-notice-error,
.cbm-notice-conflict {
  border-color: #d63638;
  background: #fff5f5;
}

.cbm-notice-updated,
.cbm-notice-saved,
.cbm-notice-deleted {
  border-color: #00a32a;
  background: #f0fff4;
}

.cbm-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  overflow: hidden;
}

.cbm-table th,
.cbm-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  text-align: left;
  vertical-align: top;
}

.cbm-table thead th {
  background: #f6f7f7;
  font-weight: 600;
}

.cbm-table tbody tr:last-child td {
  border-bottom: 0;
}

.cbm-link-action {
  font-weight: 600;
  text-decoration: none;
}

.cbm-booking-form-frontend input[type="text"],
.cbm-booking-form-frontend input[type="date"],
.cbm-booking-form-frontend select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #c3c4c7;
  border-radius: 8px;
  padding: 10px 12px;
  box-sizing: border-box;
  background: #fff;
}

.cbm-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.cbm-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
}

.cbm-form-actions,
.cbm-delete-form {
  margin-top: 16px;
}

@media (max-width: 800px) {
  .cbm-form-grid {
    grid-template-columns: 1fr;
  }
}

.cbm-jump-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.cbm-jump-form input[type="date"] {
  min-height: 38px;
}

.cbm-manager-layout-single {
  margin-top: 22px;
}

.cbm-table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid #dcdcde;
  border-radius: 8px;
  overflow: hidden;
}

.cbm-table th,
.cbm-table td {
  padding: 12px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.cbm-table tbody tr:last-child td {
  border-bottom: 0;
}

.cbm-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 2147483000;
}

.cbm-modal.is-open {
  display: flex;
  align-items: center;
  justify-content: center;
}

.cbm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.45);
}

.cbm-modal-dialog {
  position: relative;
  z-index: 2;
  width: min(720px, calc(100vw - 30px));
  margin: 0 auto;
  background: #fff;
  border-radius: 12px;
  padding: 22px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  max-height: min(92vh, 900px);
  overflow: auto;
}

.cbm-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: transparent;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.cbm-modal .cbm-booking-form,
.cbm-modal .cbm-delete-form {
  margin-top: 16px;
}

.cbm-modal .cbm-form-card {
  border: 0;
  padding: 0;
  box-shadow: none;
}

@media (max-width: 800px) {
  .cbm-jump-form {
    width: 100%;
  }

  .cbm-jump-form input[type="date"],
  .cbm-jump-form button {
    width: 100%;
  }
}

.cbm-jump-form {
  position: relative;
}

.cbm-jump-date-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.cbm-admin-form-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 16px;
}

.cbm-admin-form-actions .button {
  height: auto;
  line-height: 1.4;
  padding: 6px 16px;
}

body.cbm-modal-open {
  overflow: hidden;
}
