/* ===== BB Feed Page ===== */

.bb-feed-page {
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 16px;
    box-sizing: border-box;
    position: relative;
}

/* Full-bleed blue background behind the feed columns */
.bb-feed-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: #1d4ed8;
    z-index: -1;
}

/* 3-column grid: narrow sidebars + wide center */
.bb-feed-layout {
    display: grid;
    grid-template-columns: 1fr 2fr 1fr;
    gap: 24px;
    align-items: start;
}

/* ===== Sidebars ===== */
.bb-feed-sidebar {
    position: sticky;
    top: 105px; /* offset below Astra navbar — adjust if header height differs */
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    overflow-x: hidden;
    /* hide scrollbar but keep it functional */
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.bb-feed-sidebar::-webkit-scrollbar { display: none; }

.bb-sidebar-add-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 16px;
    margin-bottom: 12px;
    border: none;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s;
    letter-spacing: .01em;
}

.bb-sidebar-add-btn:hover {
    background: rgba(255, 255, 255, 0.28);
}

.bb-sidebar-widgets {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ===== Widget picker popup ===== */
.bb-widget-picker {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bb-widget-picker-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.45);
}

.bb-widget-picker-box {
    position: relative;
    background: #fff;
    border-radius: 14px;
    width: 90%;
    max-width: 480px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 12px 40px rgba(0,0,0,.18);
    padding: 24px;
}

.bb-widget-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.bb-widget-picker-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #111;
}

.bb-widget-picker-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.bb-widget-picker-close:hover {
    background: #f3f4f6;
    color: #111;
}

.bb-widget-picker-hint {
    margin: 0 0 20px;
    font-size: 13px;
    color: #6b7280;
}

.bb-widget-picker-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.bb-widget-picker-empty {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    border: 1.5px dashed #e5e7eb;
    border-radius: 10px;
    color: #9ca3af;
    text-align: center;
}

.bb-widget-picker-empty p {
    margin: 0;
    font-size: 14px;
}

/* Widget card (for future use) */
.bb-widget-picker-box .bb-widget-option,
.bb-widget-picker-box .bb-widget-option:hover,
.bb-widget-picker-box .bb-widget-option:focus {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 14px;
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    color: #111;
    cursor: pointer;
    transition: border-color .15s, background .15s;
    text-align: left;
    width: 100%;
    font-family: inherit;
    font-size: inherit;
    box-shadow: none;
    text-decoration: none;
}

.bb-widget-picker-box .bb-widget-option:hover {
    border-color: #111;
    background: #fafafa;
}

.bb-widget-picker-box .bb-widget-option-icon {
    color: #374151;
}

.bb-widget-picker-box .bb-widget-option-name {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    display: block;
}

.bb-widget-picker-box .bb-widget-option-desc {
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.4;
    display: block;
}

/* ===== Main column ===== */
.bb-feed-main {
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    overflow: visible !important;
}

/* ===== Compose box ===== */
.bb-compose-box {
    background: #fff;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 12px;
}

.bb-compose-top {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin-bottom: 14px;
}

.bb-compose-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bb-compose-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bb-avatar-initials {
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: .02em;
}

.bb-compose-textarea {
    flex: 1;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    line-height: 1.55;
    resize: vertical;
    min-height: 80px;
    outline: none;
    transition: border-color .15s;
    color: #111;
    background: #fff;
    box-sizing: border-box;
    width: 100%;
}

.bb-compose-textarea:focus {
    border-color: #111;
}

.bb-compose-textarea::placeholder {
    color: #9ca3af;
}

/* Media preview */
.bb-media-preview {
    margin: 0 0 14px 58px;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
}

.bb-media-preview-inner {
    position: relative;
}

.bb-media-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #111;
    color: #fff;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    padding: 0;
}

.bb-media-preview img {
    max-width: 100%;
    max-height: 300px;
    display: block;
    width: 100%;
    object-fit: contain;
    background: #000;
}

.bb-preview-video {
    padding: 14px;
    font-size: 13px;
    color: #6b7280;
    word-break: break-all;
}

/* Compose footer */
.bb-compose-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-left: 58px;
    flex-wrap: wrap;
    gap: 10px;
}

.bb-compose-actions {
    display: flex;
    gap: 4px;
}

.bb-compose-action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 7px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    font-size: 13px;
    font-family: inherit;
    color: #374151;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.bb-compose-action-btn:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.bb-compose-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.bb-char-count {
    font-size: 12px;
    color: #9ca3af;
    min-width: 30px;
    text-align: right;
}

.bb-char-count.warning { color: #f59e0b; }
.bb-char-count.danger  { color: #ef4444; }

.bb-publish-btn {
    padding: 8px 22px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}

.bb-publish-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.bb-publish-btn:not(:disabled):hover {
    background: #222;
}

.bb-compose-notice {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
}

.bb-compose-notice.success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.bb-compose-notice.error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

/* Login prompt */
.bb-login-prompt {
    padding: 24px 20px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.bb-login-prompt p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

.bb-login-link {
    display: inline-block;
    padding: 8px 20px;
    background: #111;
    color: #fff;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
    white-space: nowrap;
}

.bb-login-link:hover { background: #222; color: #fff; }

/* ===== Feed posts list ===== */
.bb-feed-posts {
    min-height: 200px;
}

.bb-feed-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 20px;
    color: #9ca3af;
    font-size: 14px;
}

.bb-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #111;
    border-radius: 50%;
    animation: bb-spin .6s linear infinite;
    flex-shrink: 0;
}

@keyframes bb-spin { to { transform: rotate(360deg); } }

/* Individual post card */
.bb-post-card {
    padding: 20px;
    border: 1px solid #f3f4f6;
    border-radius: 12px;
    margin-bottom: 12px;
    background: #fff;
    transition: background .1s;
}

.bb-post-card:last-child { margin-bottom: 0; }
.bb-post-card:hover { background: #fafafa; }

.bb-post-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.bb-post-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: #111;
    display: flex;
    align-items: center;
    justify-content: center;
}

.bb-post-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.bb-post-avatar-initials {
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}

.bb-post-meta { flex: 1; }

.bb-post-author {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin: 0 0 2px;
}

.bb-post-time {
    font-size: 12px;
    color: #9ca3af;
}

.bb-post-body {
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0 0 12px;
}

.bb-post-body:last-child { margin-bottom: 0; }

.bb-post-image {
    width: 100%;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    display: block;
    object-fit: cover;
    max-height: 400px;
    background: #f3f4f6;
    margin-top: 10px;
}

.bb-post-video-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 8px 14px;
    background: #f3f4f6;
    border-radius: 6px;
    font-size: 13px;
    color: #374151;
    text-decoration: none;
    border: 1px solid #e5e7eb;
}

.bb-post-video-link:hover { background: #e5e7eb; color: #111; }

/* Empty state */
.bb-feed-empty {
    text-align: center;
    padding: 48px 20px;
    color: #9ca3af;
}

.bb-feed-empty p { margin: 0; font-size: 15px; }

/* ===== Video modal ===== */
.bb-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.bb-modal-box {
    position: relative;
    background: #fff;
    border-radius: 12px;
    padding: 28px;
    width: 90%;
    max-width: 440px;
    box-shadow: 0 8px 32px rgba(0,0,0,.15);
}

.bb-modal-box h3 {
    margin: 0 0 6px;
    font-size: 17px;
    font-weight: 600;
    color: #111;
}

.bb-modal-hint {
    margin: 0 0 16px;
    font-size: 13px;
    color: #6b7280;
}

.bb-modal-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    outline: none;
    box-sizing: border-box;
    color: #111;
}

.bb-modal-input:focus { border-color: #111; }

.bb-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 16px;
}

.bb-modal-cancel {
    padding: 8px 18px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    color: #374151;
}

.bb-modal-cancel:hover { background: #f3f4f6; }

.bb-modal-confirm {
    padding: 8px 18px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
}

.bb-modal-confirm:hover { background: #222; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .bb-feed-layout {
        grid-template-columns: 1fr;
    }

    .bb-feed-sidebar { display: none; }
    .bb-feed-page { padding: 12px 0; }
    .bb-feed-main { border-radius: 0; border-left: none; border-right: none; }
    .bb-compose-footer { padding-left: 0; }
    .bb-media-preview { margin-left: 0; }
}

/* ===== Courts widget box (sidebar) ===== */
.bb-widget-courts {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
}

.bb-widget-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid #f3f4f6;
}

.bb-widget-head-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #374151;
}

.bb-widget-head-text { flex: 1; }

.bb-widget-head-name {
    font-size: 13px;
    font-weight: 600;
    color: #111;
    display: block;
}

.bb-widget-head-meta {
    font-size: 11px;
    color: #9ca3af;
}

.bb-widget-open-btn {
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    cursor: pointer;
    white-space: nowrap;
    transition: background .15s, border-color .15s;
    font-family: inherit;
}

.bb-widget-open-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    color: #111;
}

/* Mini court preview rows */
.bb-widget-preview {
    padding: 8px 0;
}

.bb-widget-court-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-bottom: 1px solid #f9fafb;
    cursor: pointer;
    transition: background .1s;
}

.bb-widget-court-row:last-child { border-bottom: none; }

.bb-widget-court-row:hover { background: #f9fafb; }

.bb-widget-court-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #111;
    flex-shrink: 0;
}

.bb-widget-court-name {
    font-size: 12px;
    color: #374151;
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.bb-widget-court-count {
    font-size: 11px;
    color: #9ca3af;
    white-space: nowrap;
}

/* ===== Courts full popup ===== */
.bb-courts-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: stretch;
    justify-content: center;
}

.bb-courts-popup-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.55);
}

.bb-courts-popup-inner {
    position: relative;
    display: flex;
    width: 92vw;
    max-width: 1100px;
    height: 85vh;
    margin: auto;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}

/* Left column — court cards */
.bb-courts-list {
    width: 360px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #e5e7eb;
    background: #fff;
    overflow: hidden;
}

.bb-courts-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.bb-courts-list-header h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: #111;
}

.bb-courts-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    transition: background .15s, color .15s;
    flex-shrink: 0;
}

.bb-courts-close:hover { background: #f3f4f6; color: #111; }

.bb-courts-list-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bb-courts-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 40px 0;
    color: #9ca3af;
    font-size: 14px;
}

/* Court card */
.bb-court-card {
    border: 1.5px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    cursor: pointer;
    transition: border-color .15s, background .15s, box-shadow .15s;
    background: #fff;
}

.bb-court-card:hover {
    border-color: #111;
    box-shadow: 0 2px 8px rgba(0,0,0,.07);
}

.bb-court-card.active {
    border-color: #111;
    background: #f9fafb;
}

.bb-court-card-name {
    font-size: 14px;
    font-weight: 600;
    color: #111;
    margin: 0 0 4px;
}

.bb-court-card-address {
    display: flex;
    align-items: flex-start;
    gap: 5px;
    font-size: 12px;
    color: #6b7280;
    margin: 0 0 10px;
    line-height: 1.4;
}

.bb-court-card-address svg { flex-shrink: 0; margin-top: 1px; }

.bb-court-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.bb-court-tag {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    color: #374151;
    font-weight: 500;
}

.bb-court-tag.indoor  { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.bb-court-tag.outdoor { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }

.bb-court-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px;
}

.bb-court-card-detail {
    font-size: 12px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 4px;
}

.bb-court-directions {
    font-size: 12px;
    padding: 5px 10px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #374151;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: background .15s;
    font-family: inherit;
    cursor: pointer;
}

.bb-court-directions:hover { background: #f3f4f6; color: #111; }

.bb-courts-empty {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}

.bb-courts-empty p { margin: 0 0 10px; font-size: 14px; }

/* Right column — map */
.bb-courts-map-wrap {
    flex: 1;
    position: relative;
    background: #f3f4f6;
}

#bb-courts-map {
    width: 100%;
    height: 100%;
}

/* Leaflet override — keep map below our popup header */
.bb-courts-popup .leaflet-control-zoom { margin-top: 12px; margin-right: 12px; }

/* Add court button (admin) */
.bb-courts-add-btn {
    display: block;
    width: calc(100% - 24px);
    margin: 0 12px 12px;
    padding: 9px;
    border: 1.5px dashed #d1d5db;
    border-radius: 8px;
    background: transparent;
    font-size: 13px;
    color: #6b7280;
    cursor: pointer;
    font-family: inherit;
    transition: border-color .15s, color .15s;
    text-align: center;
}

.bb-courts-add-btn:hover { border-color: #111; color: #111; }

/* Mobile */
@media (max-width: 768px) {
    .bb-courts-popup-inner { flex-direction: column; height: 92vh; }
    .bb-courts-list { width: 100%; height: 50%; border-right: none; border-bottom: 1px solid #e5e7eb; }
    .bb-courts-map-wrap { height: 50%; }
}

/* ===== Court add/edit form panel ===== */
.bb-court-form-panel {
    flex: 1;
    min-width: 0;
    background: #fff;
    border-radius: 0 16px 16px 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.bb-court-form-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-bottom: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.bb-court-form-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111;
}

.bb-court-form-back {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 7px;
    background: #fff;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    font-family: inherit;
    transition: background .15s;
}
.bb-court-form-back:hover { background: #f3f4f6; }

.bb-court-form-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.bb-court-form-notice {
    margin-bottom: 16px;
    padding: 10px 14px;
    border-radius: 7px;
    font-size: 13px;
}
.bb-court-form-notice.error   { background:#fef2f2; color:#991b1b; border:1px solid #fecaca; }
.bb-court-form-notice.success { background:#f0fdf4; color:#166534; border:1px solid #bbf7d0; }

/* Form sections */
.bb-form-section {
    padding-bottom: 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid #f3f4f6;
}
.bb-form-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.bb-form-section-title {
    margin: 0 0 14px;
    font-size: 12px;
    font-weight: 600;
    color: #9ca3af;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.bb-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 14px;
}
.bb-form-row:last-child { margin-bottom: 0; }

.bb-field-full { grid-column: 1 / -1; }

.bb-form-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.bb-form-field label {
    font-size: 13px;
    font-weight: 500;
    color: #374151;
}

.bb-form-field .req { color: #ef4444; }

.bb-form-field input[type="text"],
.bb-form-field input[type="url"],
.bb-form-field input[type="email"],
.bb-form-field input[type="tel"],
.bb-form-field input[type="number"] {
    padding: 9px 12px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    font-size: 14px;
    font-family: inherit;
    color: #111;
    background: #fff;
    outline: none;
    transition: border-color .15s;
    width: 100%;
    box-sizing: border-box;
}

.bb-form-field input:focus { border-color: #111; }

/* Radio group */
.bb-radio-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.bb-radio-label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: border-color .15s, background .15s;
    user-select: none;
    background: #fff;
}

.bb-radio-label:has(input:checked) {
    border-color: #111;
    background: #f9fafb;
    color: #111;
    font-weight: 500;
}

.bb-radio-label input[type="radio"] {
    display: none;
}

/* Checkbox group */
.bb-checkbox-group {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.bb-checkbox-label {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 7px 12px;
    border: 1.5px solid #e5e7eb;
    border-radius: 7px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    transition: border-color .15s, background .15s;
    user-select: none;
    background: #fff;
}

.bb-checkbox-label:has(input:checked) {
    border-color: #111;
    background: #f9fafb;
    color: #111;
    font-weight: 500;
}

.bb-checkbox-label input[type="checkbox"] {
    display: none;
}

/* Form footer */
.bb-court-form-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px 24px;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
    background: #fff;
}

.bb-court-form-cancel {
    padding: 9px 20px;
    border: 1px solid #d1d5db;
    border-radius: 7px;
    background: #fff;
    font-size: 14px;
    font-family: inherit;
    color: #374151;
    cursor: pointer;
    transition: background .15s;
}
.bb-court-form-cancel:hover { background: #f3f4f6; }

.bb-court-form-submit {
    padding: 9px 24px;
    background: #111;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s, opacity .15s;
    min-width: 110px;
}
.bb-court-form-submit:hover    { background: #222; }
.bb-court-form-submit:disabled { opacity: .5; cursor: not-allowed; }

/* Court card edit/delete button group */
.bb-court-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 4px;
}

.bb-court-card-top .bb-court-card-name { margin: 0; flex: 1; }

.bb-court-card-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    align-items: center;
}

.bb-court-edit-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    background: #fff;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background .15s, color .15s, border-color .15s;
}

.bb-court-edit-btn:hover {
    background: #f3f4f6;
    color: #111;
    border-color: #d1d5db;
}

.bb-court-delete-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    background: #fff;
    color: #ef4444;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background .15s, border-color .15s;
}

.bb-court-delete-btn:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

.bb-court-delete-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.bb-form-section-hint {
    margin: 0 0 10px;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
}

/* ===== Widget picker — wider grid for 5 options ===== */
.bb-widget-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
}

/* ===== Placeholder widgets (coming soon) ===== */
.bb-widget-placeholder .bb-widget-placeholder-body {
    padding: 10px 14px 14px;
}

.bb-widget-placeholder .bb-widget-placeholder-body p {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;
    line-height: 1.5;
}

/* Widget remove button */
.bb-widget-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    transition: background .15s, color .15s;
    margin-left: 4px;
}

.bb-widget-remove-btn:hover {
    background: #fee2e2;
    color: #ef4444;
}

/* ===== Box score feed card ===== */
.bb-post-boxscore {
    padding: 0;
    overflow: hidden;
}

.bb-bs-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 8px;
    border-bottom: 1px solid #f3f4f6;
}

.bb-bs-final-badge {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    background: #111827;
    color: #fff;
    border-radius: 4px;
    padding: 2px 7px;
}

.bb-bs-date {
    font-size: 12px;
    color: #9ca3af;
}

.bb-bs-scoreline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}

.bb-bs-side {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 90px;
}

.bb-bs-side.winner .bb-bs-score { color: #111827; }
.bb-bs-side:not(.winner) .bb-bs-score { color: #9ca3af; }

.bb-bs-team-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    text-align: center;
}

.bb-bs-score {
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.bb-bs-vs { font-size: 20px; color: #d1d5db; margin-top: 12px; }

.bb-bs-team-section { padding: 12px 16px 0; }
.bb-bs-team-section:last-child { padding-bottom: 16px; }

.bb-bs-team-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #374151;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bb-bs-win-badge {
    font-size: 10px;
    background: #16a34a;
    color: #fff;
    border-radius: 3px;
    padding: 1px 5px;
}

.bb-bs-table-wrap {
    overflow-x: auto;
}

.bb-bs-table tbody tr:last-child td {
    border-bottom: 1px solid #e5e7eb;
}

.bb-bs-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.bb-bs-table th {
    text-align: center;
    font-weight: 600;
    color: #6b7280;
    padding: 4px 6px;
    border-bottom: 1px solid #e5e7eb;
    white-space: nowrap;
}

.bb-bs-table td {
    text-align: center;
    padding: 5px 6px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
}

.bb-bs-table .bb-bs-jersey { color: #9ca3af; }
.bb-bs-table .bb-bs-name   { text-align: left; font-weight: 500; white-space: nowrap; }
.bb-bs-table th:nth-child(2),
.bb-bs-table td:nth-child(2) { text-align: left; }
.bb-bs-table tbody tr:last-child td { border-bottom: none; }

.bb-bs-avatar {
    font-size: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}