.bmpro-frontend-form-wrap {
    max-width: 600px;
    margin: 30px auto;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 28px rgba(0,0,0,0.10);
    padding: 30px 18px 24px 18px;
}

.bmpro-form-fields {
    margin-bottom: 16px;
}

.bmpro-row {
    display: flex;
    gap: 18px;
}

.bmpro-width-half {
    width: 50%;
    min-width: 170px;
}

.bmpro-width-full {
    width: 100%;
}

.bmpro-field {
    margin-bottom: 16px;
}

.bmpro-frontend-form-wrap label {
    display: block;
    margin-bottom: 5px;
    font-size: 1em;
    font-weight: 600;
}

.bmpro-frontend-form-wrap input,
.bmpro-frontend-form-wrap select,
.bmpro-frontend-form-wrap textarea {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 1.5px solid #d0d0d0;
    border-radius: 7px;
    transition: border-color 0.2s;
    background: #fafbfd;
    box-sizing: border-box;
}

.bmpro-frontend-form-wrap input:focus,
.bmpro-frontend-form-wrap select:focus,
.bmpro-frontend-form-wrap textarea:focus {
    border-color: #0073aa;
    outline: none;
}

.bmpro-frontend-form-wrap .bmpro-submit-btn {
    background: #0073aa;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 7px;
    padding: 12px 26px;
    font-size: 1.1em;
    transition: background 0.2s;
    cursor: pointer;
    margin-top: 12px;
    margin-bottom: 10px;
}

.bmpro-frontend-form-wrap .bmpro-submit-btn:hover,
.bmpro-frontend-form-wrap .bmpro-submit-btn:focus {
    background: #005177;
}

.bmpro-form-result {
    margin-top: 12px;
    font-size: 1.06em;
    min-height: 24px;
}

.bmpro-frontend-form-wrap .bmpro-captcha-wrap {
    margin: 18px 0 8px 0;
}

/* ----------- Custom Checkbox Styles (Cross-Platform, iOS fix) ----------- */
.bmpro-checkbox-group {
    margin-top: 2px;
    margin-bottom: 12px;
}

/* Inline (side by side) */
.bmpro-checkbox-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
}
.bmpro-checkbox-inline label,
.bmpro-checkbox-stacked label {
    display: inline-flex;
    align-items: center;
    font-weight: 500;
    font-size: 1em;
    margin: 0;
    gap: 8px;
    cursor: pointer;
    position: relative;
    line-height: 1.2;
}
.bmpro-checkbox-inline input[type="checkbox"],
.bmpro-checkbox-stacked input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid #0073aa;
    border-radius: 5px;
    background: #fff;
    margin: 0 7px 0 0;
    cursor: pointer;
    display: inline-block;
    vertical-align: middle;
    transition: border-color 0.18s, background 0.18s;
    position: relative;
    box-sizing: border-box;
}
.bmpro-checkbox-inline input[type="checkbox"]:focus,
.bmpro-checkbox-stacked input[type="checkbox"]:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}
.bmpro-checkbox-inline input[type="checkbox"]:checked,
.bmpro-checkbox-stacked input[type="checkbox"]:checked {
    background: #0073aa;
    border-color: #0073aa;
}
.bmpro-checkbox-inline input[type="checkbox"]:checked:after,
.bmpro-checkbox-stacked input[type="checkbox"]:checked:after {
    content: '';
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid #fff;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
    pointer-events: none;
    display: block;
}
.bmpro-checkbox-inline span,
.bmpro-checkbox-stacked span {
    margin-left: 2px;
    font-weight: 500;
    font-size: 1.07em;
    user-select: none;
}
.bmpro-checkbox-inline span {
    min-width: 50px;
}
/* Stacked (vertical) */
.bmpro-checkbox-stacked {
    display: flex;
    flex-direction: column;
    gap: 7px;
}
.bmpro-checkbox-group label {
    cursor: pointer;
}
.bmpro-checkbox-inline input[type="checkbox"],
.bmpro-checkbox-stacked input[type="checkbox"] {
    -webkit-tap-highlight-color: transparent;
}

/* --- Checkbox Responsiveness --- */
@media (max-width: 700px) {
    .bmpro-checkbox-inline, .bmpro-checkbox-stacked {
        gap: 18px;
    }
    .bmpro-checkbox-inline label,
    .bmpro-checkbox-stacked label {
        font-size: 1em;
        gap: 7px;
    }
}
/* ----------- End Custom Checkbox Styles ----------- */

/* ----------- Flatpickr Styles ----------- */
.flatpickr-calendar {
    border-radius: 9px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.14);
    font-size: 1em;
    border: 1.5px solid #bfc7d0;
    z-index: 99999 !important;
    min-height: 400px; /* Ensure room for time and OK btn */
    overflow: visible !important;
}

.flatpickr-months,
.flatpickr-weekdays {
    background: #f2f7fb;
    border-bottom: 1px solid #e5ecf4;
    border-radius: 9px 9px 0 0;
}

.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange,
.flatpickr-day.selected:focus,
.flatpickr-day.today {
    background: #0073aa !important;
    color: #fff !important;
}

.flatpickr-time {
    background: #fafbfd;
    border-radius: 0 0 9px 9px;
    border-top: 1px solid #e5ecf4;
    padding: 8px 6px 34px 12px; /* More bottom padding for OK btn */
    display: flex;
    align-items: center;
    gap: 0 8px;
    min-height: 68px;
    box-sizing: content-box;
    position: relative;
    overflow: visible;
}

.flatpickr-time input,
.flatpickr-time .flatpickr-am-pm {
    font-size: 1em;
    border-radius: 5px;
    padding: 6px 8px;
    border: 1.3px solid #d0d0d0;
    background: #fff;
    width: 52px;
}

.flatpickr-ok-button {
    background: #0073aa;
    color: #fff;
    border: none;
    border-radius: 5px;
    padding: 5px 18px;
    font-size: 1em;
    cursor: pointer;
    margin-left: 10px;
    margin-top: 0;
    transition: background 0.2s;
    position: relative;
    z-index: 2;
}
.flatpickr-ok-button:hover {
    background: #005177;
}

/* Prevent calendar from hiding content below the time bar */
.flatpickr-calendar .flatpickr-innerContainer {
    overflow: visible !important;
}

@media (max-width: 700px) {
    .bmpro-frontend-form-wrap {
        padding: 13px 5vw 16px 5vw;
    }
    .bmpro-row {
        flex-direction: column;
        gap: 0;
    }
    .bmpro-width-half, .bmpro-width-full {
        width: 100%;
        min-width: 0;
    }
    /* Flatpickr: stack calendar and time controls on mobile */
    .flatpickr-calendar .flatpickr-innerContainer {
        flex-direction: column !important;
    }
}
/* Card/stacked mobile layout for frontend entries table */
@media (max-width: 700px) {
  .bmpro-frontend-entries #bmpro-entries-table-wrap {
    background: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    overflow: visible;
  }
  .bmpro-frontend-entries .bmpro-entries-table,
  .bmpro-frontend-entries .bmpro-entries-table thead,
  .bmpro-frontend-entries .bmpro-entries-table tbody,
  .bmpro-frontend-entries .bmpro-entries-table th,
  .bmpro-frontend-entries .bmpro-entries-table td,
  .bmpro-frontend-entries .bmpro-entries-table tr {
    display: block !important;
    width: 100%;
    box-sizing: border-box;
  }
  .bmpro-frontend-entries .bmpro-entries-table thead {
    display: none !important;
  }
  .bmpro-frontend-entries .bmpro-entries-table tr {
    background: #fff;
    border: 1px solid #e2e4e6;
    border-radius: 14px;
    box-shadow: 0 1px 10px rgba(0,0,0,0.04);
    margin-bottom: 16px;
    padding: 14px 9px 14px 9px;
    position: relative;
  }
  .bmpro-frontend-entries .bmpro-entries-table td {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding: 10px 8px 10px 40%;
    font-size: 1em;
    background: none;
    width: 100%;
    min-height: 36px;
    text-align: left;
    line-height: 1.45;
    word-break: break-word;
    margin-bottom: 0;
    box-shadow: none;
  }
  .bmpro-frontend-entries .bmpro-entries-table td:last-child {
    border-bottom: none;
  }
  .bmpro-frontend-entries .bmpro-entries-table td:before {
    position: absolute;
    top: 10px;
    left: 16px;
    width: 38%;
    padding-right: 10px;
    white-space: normal;
    font-weight: 600;
    color: #1563ad;
    content: attr(data-label);
    font-size: 1em;
    text-align: left;
    line-height: 1.4;
    letter-spacing: 0.01em;
    opacity: 0.97;
  }
  .bmpro-frontend-entries .bmpro-entries-table td small {
    display: block;
    margin-top: 4px;
    color: #384555;
    font-size: 0.98em;
    font-weight: 500;
    line-height: 1.25;
  }
  /* Space between cards */
  .bmpro-frontend-entries .bmpro-entries-table tr + tr {
    margin-top: 10px;
  }
  /* Fix buttons stacking */
  .bmpro-frontend-entries .bmpro-entries-table td[data-label="Actions"] {
    padding-bottom: 0;
  }
  .bmpro-frontend-entries .bmpro-action-btn {
    margin: 7px 5px 2px 0 !important;
    display: inline-block;
    min-width: 110px;
  }
}
.bmpro-terms-label {
  display: flex;
  align-items: center;
  font-size: 1em;
  font-weight: 500;
  gap: 8px;
}
.bmpro-terms-label input[type="checkbox"] {
  margin: 0 7px 0 0;
  width: 18px;
  height: 18px;
  accent-color: #0073aa; /* Modern browsers */
}
.bmpro-terms-label span {
  display: inline;
  font-weight: 500;
}
#bmpro-terms-modal {
  display: none;
  position: fixed !important;
  left: 0; top: 0;
  width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.42);
  z-index: 2147483647 !important;
  align-items: center;
  justify-content: center;
  overflow: auto;
}
#bmpro-terms-modal.bmpro-active {
  display: flex !important;
}
.bmpro-terms-modal-inner {
  background: #fff;
  max-width: 780px; width: 90vw;
  padding: 32px 18px 20px 22px;
  border-radius: 12px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.14);
  position: relative;
  max-height: 65vh;
  overflow-y: auto;
  z-index: 2147483648;
}

/* Field note styling */
.bmpro-field-note{font-size:0.95em; line-height:1.35; color:#555; margin-top:6px;}

/* ----------- Terms & Conditions modal content ----------- */
/* Ensure paragraphs are spaced out properly */
#bmpro-terms-content p {
    margin: 0 0 1em 0;
    line-height: 1.65;
}
/* Make <strong> section headings display as block-level with breathing room */
#bmpro-terms-content p > strong:only-child,
#bmpro-terms-content > strong {
    display: block;
    margin-top: 1.4em;
    margin-bottom: 0.3em;
    font-size: 1.04em;
    letter-spacing: 0.01em;
}
/* First strong heading – no extra top margin */
#bmpro-terms-content p:first-child > strong:only-child {
    margin-top: 0;
}
#bmpro-terms-content a {
    color: #0073aa;
    word-break: break-all;
}
