/* ══════════════════════════════════════════════════════════════
   BoneBuilders — Participant Registration Form
══════════════════════════════════════════════════════════════ */

.bb-pform-wrap {
    max-width: 740px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 15px;
    color: #1e293b;
}

/* ── Notice ── */
.bb-pform-notice {
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}
.bb-pform-notice--success { background:#ecfdf5; border-left:4px solid #10b981; color:#065f46; }
.bb-pform-notice--error   { background:#fef2f2; border-left:4px solid #ef4444; color:#991b1b; }
.bb-pform-error { color:#dc2626; font-size:14px; background:#fef2f2; border-left:4px solid #ef4444; padding:12px 16px; border-radius:4px; }

/* ── Sections ── */
.bb-pform-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 20px;
}
.bb-pform-section--compact { padding: 18px 24px; }
.bb-pform-section--waiver  { border-color: #1a4b7a; border-width: 2px; }

.bb-pform-section-title {
    font-size: 15px;
    font-weight: 700;
    color: #1a4b7a;
    margin: 0 0 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e8eef5;
}

/* ── Grid layout ── */
.bb-pform-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.bb-pform-field--full    { grid-column: span 4; }
.bb-pform-field--half    { grid-column: span 2; }
.bb-pform-field--third   { grid-column: span 1; }  /* approx */
.bb-pform-field--quarter { grid-column: span 1; }

/* ── Fields ── */
.bb-pform-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 5px;
}
.bb-pform-field input,
.bb-pform-field select,
.bb-pform-field textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
    box-sizing: border-box;
}
.bb-pform-field input:focus,
.bb-pform-field select:focus {
    outline: none;
    border-color: #1a4b7a;
    box-shadow: 0 0 0 3px rgba(26,75,122,.1);
}
.bb-pform-field input:disabled,
.bb-disabled-field {
    background: #f9fafb !important;
    color: #9ca3af !important;
    cursor: not-allowed;
}
.bb-req   { color: #dc2626; }
.bb-hint  { font-weight: 400; color: #9ca3af; font-size: 12px; }
.bb-pform-hint {
    font-size: 12px;
    color: #6b7280;
    margin: 3px 0 0;
    display: block;
}

/* ── Location checkboxes ── */
.bb-pform-checkgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 10px;
}
.bb-pform-check-label {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color .15s, background .15s;
    line-height: 1.4;
}
.bb-pform-check-label:hover { border-color: #1a4b7a; background: #f0f6ff; }
.bb-pform-check-label input[type=checkbox]:checked + span { font-weight: 600; color: #1a4b7a; }
.bb-pform-check-label--inline {
    border: none; padding: 0; background: transparent;
    font-size: 14px; align-items: flex-start;
}
.bb-pform-check-label--inline:hover { background: transparent; border: none; }

/* ── Radio group ── */
.bb-pform-radiogroup {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.bb-pform-radio-label {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    transition: border-color .15s, background .15s;
}
.bb-pform-radio-label:hover { border-color: #1a4b7a; background: #f0f6ff; }
.bb-pform-radio-label input[type=radio]:checked { accent-color: #1a4b7a; }

/* ── Waiver text ── */
.bb-waiver-text {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    padding: 18px 20px;
    margin-bottom: 20px;
    max-height: 220px;
    overflow-y: auto;
    font-size: 13px;
    line-height: 1.7;
    color: #374151;
}
.bb-waiver-text p { margin: 0 0 12px; }
.bb-waiver-text p:last-child { margin: 0; }

/* ── Signature pad ── */
.bb-sig-wrap {
    position: relative;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    cursor: crosshair;
    overflow: hidden;
    touch-action: none;
}
.bb-sig-wrap:focus-within { border-color: #1a4b7a; box-shadow: 0 0 0 3px rgba(26,75,122,.1); }
#bb-sig-canvas { display: block; width: 100%; height: 180px; }
.bb-sig-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    color: #d1d5db;
    pointer-events: none;
    user-select: none;
    font-style: italic;
}
.bb-sig-clear-btn {
    background: none;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 3px 10px;
    font-size: 12px;
    cursor: pointer;
    color: #6b7280;
    margin-left: 8px;
    vertical-align: middle;
}
.bb-sig-clear-btn:hover { background: #f9fafb; border-color: #9ca3af; }

/* ── Submit ── */
.bb-pform-submit-row { text-align: center; margin-top: 8px; }
.bb-pform-submit {
    background: #1a4b7a;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 14px 40px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .15s;
}
.bb-pform-submit:hover    { background: #163f68; }
.bb-pform-submit:disabled { background: #94a3b8; cursor: not-allowed; }

/* ── Success panel ── */
.bb-pform-success-panel {
    text-align: center;
    padding: 48px 32px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
}
.bb-pform-success-icon {
    width: 60px; height: 60px; line-height: 60px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-size: 28px;
    margin: 0 auto 18px;
}
.bb-pform-success-panel h2 { color: #1a4b7a; margin: 0 0 12px; font-size: 22px; }
.bb-pform-success-panel p  { color: #555; font-size: 15px; line-height: 1.6; max-width: 480px; margin: 0 auto; }

/* ── Edit page greeting ── */
.bb-pform-edit-greeting {
    background: #eff6ff;
    border-left: 4px solid #1a4b7a;
    padding: 12px 16px;
    border-radius: 0 6px 6px 0;
    font-size: 14px;
    color: #1e3a5f;
    margin-bottom: 20px;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .bb-pform-grid { grid-template-columns: 1fr 1fr; }
    .bb-pform-field--full  { grid-column: span 2; }
    .bb-pform-field--half  { grid-column: span 2; }
    .bb-pform-field--third { grid-column: span 1; }
    .bb-pform-field--quarter { grid-column: span 1; }
    .bb-pform-section { padding: 18px 16px; }
}
@media (max-width: 420px) {
    .bb-pform-grid { grid-template-columns: 1fr; }
    .bb-pform-field--full,
    .bb-pform-field--half,
    .bb-pform-field--third,
    .bb-pform-field--quarter { grid-column: span 1; }
}

/* ── Print (QR code page) ── */
@media print {
    .bb-filter-bar, .wp-header-end, #wpadminbar { display: none !important; }
}
