/* Board-specific layouts, using the app's neutral palette and shared controls. */
.board-primary-btn.board-create-button {
    gap: 8px;
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
}
.board-create-icon {
    display: inline-flex;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.board-shell,
.board-post-dialog {
    --swap-offer: #a34d62;
    --swap-request: #906620;
    --swap-group: #80609c;
    --swap-free: #587754;
    --category-accent: var(--swap-offer);
}

.db-have {
    --category-accent: var(--swap-offer);
}

.db-want {
    --category-accent: var(--swap-request);
}

.db-moq {
    --category-accent: var(--swap-group);
}

.db-free {
    --category-accent: var(--swap-free);
}

.board-primary-btn {
    border: 0;
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    cursor: pointer;
}

.board-primary-btn {
    background: #404040;
    color: #fff;
}

.board-primary-btn:hover:not(:disabled) {
    background: #262626;
}

.board-primary-btn:active:not(:disabled) {
    background: #171717;
}

.board-primary-btn:focus-visible {
    outline: 2px solid #525252;
    outline-offset: 3px;
}

.board-primary-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.board-type-option .board-type-symbol {
    background: #f8e9ed;
    color: var(--swap-offer);
}

.board-type-option[hx-get$="kind=want"] .board-type-symbol {
    background: #fcf1db;
    color: var(--swap-request);
}

.board-type-option[hx-get$="kind=moq"] .board-type-symbol {
    background: #f0eaf7;
    color: var(--swap-group);
}

.board-shell {
    margin: 56px 0 0 60px;
    padding: 24px 24px 32px;
}

.board-mobile-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    color: #fff;
}

.board-mobile-toggle svg {
    width: 24px;
    height: 24px;
}

.board-mobile-toggle:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 2px;
}

.board-sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 35;
    background: #0006;
}

/* Continue the header behind the two outer rounded corners. */
body:has(.board-shell)::before,
body:has(.board-shell)::after {
    content: '';
    position: fixed;
    top: 56px;
    width: 12px;
    height: 12px;
    z-index: 21;
    pointer-events: none;
}
body:has(.board-shell)::before {
    left: 0;
    background: radial-gradient(circle at bottom right, transparent 12px, #171717 12.5px);
}
body:has(.board-shell)::after {
    right: 0;
    background: radial-gradient(circle at bottom left, transparent 12px, #171717 12.5px);
}

.board-shell:not(:has(.board-inbox)) {
    display: flex;
    flex-direction: column;
    min-height: calc(100dvh - 56px);
    box-sizing: border-box;
}

.board-shell:not(:has(.board-inbox))>.board-content {
    width: 100%;
    flex: 1;
}

.board-shell>.board-footer {
    width: 100%;
    max-width: none;
    flex-shrink: 0;
    text-align: center;
}

html[data-board-sidebar-expanded="true"] .board-shell {
    margin-left: 240px;
}

.board-sidebar {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 56px;
    bottom: 0;
    left: 0;
    z-index: 20;
    width: 60px;
    padding: 12px;
    background: #efe8e0;
    overflow-y: auto;
    overflow-x: hidden;
    border-top-left-radius: 12px;
}

html[data-board-sidebar-expanded="true"] .board-sidebar {
    width: 240px;
    padding-inline: 12px;
}

.board-nav-link {
    position: relative;
    width: 100%;
    white-space: nowrap;
    cursor: pointer;
}

.board-nav-link * {
    cursor: inherit;
}

.board-sidebar-toggle,
.board-sidebar-pin {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 36px;
    padding: 8px;
    border-radius: 8px;
    line-height: 20px;
    white-space: nowrap;
}

.board-sidebar-toggle,
.board-sidebar-pin {
    flex-shrink: 0;
    justify-content: center;
    width: 32px;
    min-height: 32px;
    padding: 8px;
    background: transparent;
    border: 0;
    cursor: pointer;
    color: #737373;
}

.board-sidebar-controls {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-top: auto;
    padding: 2px;
}

#board-sidebar-pin {
    margin-left: auto;
}

.board-sidebar-pin {
    display: none;
    color: #a3a3a3;
}

html[data-board-sidebar-expanded="true"] .board-sidebar-pin {
    display: flex;
}

.board-sidebar-pin[aria-pressed="true"] {
    color: #8a8a8a;
}

.board-sidebar-toggle:hover,
.board-sidebar-pin:hover {
    background: #00000006;
    color: #404040;
}

.board-sidebar-chevron,
.board-sidebar-pin svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

html[data-board-sidebar-expanded="true"] .board-sidebar-chevron {
    transform: rotate(180deg);
}

.board-nav-label {
    position: absolute;
    left: 36px;
    opacity: 0;
    transform: translateX(-4px);
    white-space: nowrap;
}

html[data-board-sidebar-expanded="true"] .board-nav-label {
    opacity: 1;
    transform: translateX(0);
}

html[data-board-sidebar-expanded="true"] .board-nav-tooltip {
    visibility: hidden !important;
    opacity: 0 !important;
}

.board-sidebar-tooltip {
    pointer-events: none;
}

/* Fixed endpoints animate in all supported browsers, without intrinsic-size APIs. */
@media (prefers-reduced-motion: no-preference) {
    html[data-board-sidebar-ready="true"] .board-sidebar {
        transition: width 180ms ease-out;
    }

    html[data-board-sidebar-ready="true"] .board-shell {
        transition: margin-left 180ms ease-out;
    }

    .board-nav-label {
        transition: opacity 120ms ease-out, transform 180ms ease-out;
    }

    .board-sidebar-chevron {
        transition: transform 180ms ease-out;
    }
}

.board-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 0;
    max-width: 1536px;
    margin: 0 auto;
}

.board-section-tabs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
    padding: 8px 0;
}

.board-section-tabs .tab {
    width: auto;
    gap: 6px;
}

.board-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
}

.board-toolbar>.board-section-tabs {
    padding: 0;
    min-height: 28px;
}

.board-sharing-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 28px;
    view-transition-name: board-sharing-actions;
}

@media (max-width: 600px) {
    .board-sharing-actions {
        flex-direction: column;
        align-items: flex-end;
        gap: 4px;
        min-height: 48px;
        min-width: 102px;
    }
}

.board-toolbar-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    gap: 6px;
    height: 28px;
    padding: 0 8px;
    white-space: nowrap;
}

.board-toolbar-action svg {
    display: block;
    width: 16px;
    height: 16px;
}

.board-sharing-controls {
    position: relative;
    display: flex;
}

.board-toolbar-copy {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.board-copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    padding: 0;
}

.board-copy-button svg {
    display: block;
    width: 16px;
    height: 16px;
}

.board-copy-check,
.board-copy-button[data-copied="true"] .board-copy-icon {
    display: none;
}

.board-copy-button[data-copied="true"] .board-copy-check {
    display: block;
}

.board-copy-button[data-copied="true"] {
    color: #166534;
    background: #dcfce7;
}

.board-toolbar-menu-button {
    anchor-name: --board-sharing-options;
    width: 24px;
    padding: 0;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

#board-sharing-options {
    position-anchor: --board-sharing-options;
}

.board-toolbar-copy-feedback {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    z-index: 20;
    width: min(280px, calc(100vw - 24px));
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
}

.board-toolbar-copy-feedback:has([data-board-copy-fallback]:not([hidden])) {
    display: block;
}

.board-toolbar-copy-feedback input {
    width: 100%;
    margin-top: 8px;
}

@media (max-width: 359px) {
    .board-toolbar {
        gap: 4px;
    }
}

#moderation-queues {
    gap: 6px;
}

.board-tab-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 16px;
    padding: 0 5px;
    border-radius: 999px;
    background: #d4d4d4;
    color: #525252;
    font-size: 11px;
    font-weight: 600;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.board-section-tabs a[aria-current="page"] .board-tab-count {
    background: #f0f0f0;
    color: #404040;
}

.board-footer {
    width: 100%;
    margin: 32px 0 0;
    padding-top: 12px;
    color: #737373;
    font-size: 11px;
    line-height: 18px;
}

.board-footer a:hover {
    color: #525252;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.board-footer-rules {
    anchor-name: --board-rules-info;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    padding: 0;
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
}

.board-footer-rules svg {
    width: 14px;
    height: 14px;
}

.board-footer-rules:hover {
    color: #404040;
}

.board-shell:has(.board-inbox)>.board-footer {
    display: none;
}

.board-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-bottom: 16px;
}

.board-nav-icon,
.board-nav-icon svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.board-nav-icon svg {
    fill: currentColor;
}

.board-nav-icon svg[fill="none"] {
    fill: none;
}

#board-unread-count {
    margin-left: auto;
}

/* Center the shared chevron in controls of any height. */
:is(.board-shell, .board-post-dialog) .select2-selection--single .select2-selection__arrow {
    top: 0;
    right: 8px !important;
    height: 100% !important;
    width: 20px;
}

:is(.board-shell, .board-post-dialog) .select2-selection--single .select2-selection__arrow b {
    top: 50%;
    left: 50%;
    margin: 0;
    transform: translate(-50%, -50%);
}

.board-shell a:focus-visible,
.board-shell button:focus-visible,
.board-shell summary:focus-visible {
    outline: 2px solid #525252;
    outline-offset: 3px;
}

.board-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
}

.board-content:has(.board-detail-heading) {
    max-width: 1152px;
}

.board-detail-heading {
    min-height: 32px;
    margin-top: 0;
    padding-top: 0;
}

.board-heading .page-title,
.board-detail-heading .page-title {
    margin: 0;
    padding: 0;
}

.board-heading .page-subtitle {
    margin-top: 4px;
}

.board-detail-heading {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: center;
    gap: 4px 16px;
}

.board-detail-heading .page-title,
.board-detail-heading .page-subtitle {
    overflow-wrap: anywhere;
}

.board-detail-heading .page-subtitle {
    grid-column: 1 / -1;
}

.board-detail-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    min-width: 0;
}

.board-detail-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.board-detail-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    margin-left: auto;
}

.board-detail-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.board-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    flex-shrink: 0;
    text-align: center;
}

.board-muted {
    font-size: 12px;
    line-height: 1.6;
    color: #737373;
    overflow-wrap: anywhere;
}

.board-text-link {
    font-size: 12px;
    color: #525252;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.board-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px;
}

.board-filters>div {
    flex: 1 1 120px;
    min-width: 0;
}

.board-filters>.board-search {
    flex: 1.5 1 180px;
}

.board-filters label,
.board-view-choice legend {
    display: block;
    font-size: 12px;
    color: #525252;
    margin-bottom: 2px;
}

.board-filters .input-field {
    height: 34px;
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    line-height: 20px;
}

/* Keep the native Country multiple-select from flashing before Select2 replaces it. */
.board-selects-pending :is(.board-shell, .board-public) .board-filters select[name="country"][multiple]:not(.select2-hidden-accessible) {
    height: 34px !important;
    visibility: hidden;
}

/* Match the marketplace sort density; shared Select2 sizing uses !important. */
.board-filters .select2-container .select2-selection--single {
    height: 34px !important;
    padding: 6px 28px 6px 10px !important;
}

.board-filters .select2-container .select2-selection--single .select2-selection__rendered {
    font-size: 13px !important;
    line-height: 20px !important;
    padding-right: 0;
}

.board-filters input::placeholder {
    color: #a3a3a3;
}

.board-view-choice {
    margin-left: auto;
    flex: 0 0 auto;
}

[data-board-clear][hidden] {
    display: none;
}

.board-view-choice>div {
    width: 68px;
}

.board-view-choice .view-toggle-form-options {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    height: 30px;
}

.board-view-choice label {
    position: relative;
    margin: 0;
    cursor: pointer;
    flex: 1;
}

.board-view-choice input {
    position: absolute;
    opacity: 0;
    width: 1px;
    height: 1px;
}

.board-view-choice span {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 30px;
    padding: 6px;
    border-radius: 6px;
    color: #737373;
}

.board-view-choice svg {
    width: 16px;
    height: 16px;
}

.board-view-choice input:checked+span {
    color: #262626;
}

.board-view-choice .view-toggle-pill-indicator {
    transition: transform 280ms cubic-bezier(0.4, 0, 0.2, 1);
}

.board-view-choice:has([value="cards"]:checked) .view-toggle-pill-indicator {
    transform: translateX(0);
}

.board-view-choice:has([value="list"]:checked) .view-toggle-pill-indicator {
    transform: translateX(100%);
}

@media (prefers-reduced-motion: reduce) {
    .board-view-choice .view-toggle-pill-indicator {
        transition: none;
    }
}

.board-view-choice input:focus-visible+span {
    outline: 2px solid #525252;
    outline-offset: 2px;
}

.board-search-input {
    position: relative;
}

.board-filters .board-search-input input {
    padding-right: 36px;
}

#board-loading {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    display: block;
    width: 14px;
    height: 14px;
    flex: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 120ms ease-out;
}

#board-loading::before {
    content: '';
    display: block;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    border: 2px solid #d4d4d4;
    border-top-color: #525252;
    border-radius: 50%;
}

#board-loading.htmx-request,
.htmx-request #board-loading {
    visibility: visible;
    opacity: 1;
}

@media (prefers-reduced-motion: no-preference) {

    #board-loading.htmx-request::before,
    .htmx-request #board-loading::before {
        animation: board-loading-spin 700ms linear infinite;
    }
}

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

/* Match Marketplace's 12-column grid, 20px gaps, 32px page gutters,
   and 240px Studio navigation above the lg breakpoint. */
.board-browser {
    display: grid;
    grid-template-columns: calc((100vw - 72px) / 3) minmax(0, 1fr);
    grid-template-rows: auto auto;
    gap: 20px;
    min-width: 0;
    position: relative;
    align-items: start;
}

.board-browser>.board-filters {
    display: contents;
}

.board-filter-panel {
    grid-column: 1;
    grid-row: 1 / 4;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    min-width: 0;
}

.board-filter-panel[hidden] {
    display: none;
}

.board-filter-panel {
    gap: 4px;
    position: sticky;
    top: 112px;
}

.board-filter-panel h2 {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 8px;
}

.board-filter-group {
    padding: 0 0 12px;
    border-bottom: 1px solid #e5e5e5;
}

/* Select2 appends its open dropdown after the final filter group. */
.board-filter-group:not(:has(~ .board-filter-group)) {
    padding-bottom: 0;
    border-bottom: 0;
}

.board-filter-group>div {
    margin-bottom: 0;
}

.board-filter-group>div>.relative {
    display: flex;
    flex-direction: column-reverse;
    gap: 4px;
}

.board-filter-group .relative>label {
    position: static;
    transform: none;
    padding: 8px 0;
    margin: 0;
    background: transparent;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #262626;
}

.board-filter-group .form-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    margin-bottom: 2px;
    border-radius: 4px;
    text-align: left;
}

.board-filter-group .form-check:hover {
    background: #fafafa;
}

.board-filter-group .form-check-label {
    margin: 0;
    font-size: 13px;
    line-height: 1.25;
    color: #262626;
    cursor: pointer;
    flex: 1;
}

.board-filter-group .form-check-input {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
    color: #262626;
    border-color: #a3a3a3;
}

.board-filter-group input[type="checkbox"] {
    border-radius: 4px;
}

.board-filter-group input[type="checkbox"],
.board-filter-group input[type="checkbox"]:focus {
    box-shadow: none;
    outline: none;
    border-width: 1px;
}

.board-filter-group input[type="checkbox"]:checked {
    background-color: #262626;
    border-color: #262626;
}

.board-filter-group input[type="checkbox"]:focus-visible {
    outline: 2px solid #525252;
    outline-offset: 3px;
}

.board-filter-group:has(#div_id_scope) {
    padding: 0 0 12px;
}

.board-filter-section-label {
    margin: 0 0 4px;
    padding: 8px 0;
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
    color: #262626;
}

.board-filter-group #div_id_scope {
    margin: 0 0 2px;
    padding: 4px 0;
}

.board-filter-group :is(#div_id_scope, #div_id_pending)>.relative {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    padding: 0;
    width: 100%;
}

.board-filter-group :is(#div_id_scope, #div_id_pending) label {
    font-size: 13px;
    line-height: 1.25;
    font-weight: 400;
    padding: 0;
}

@media (min-width: 1024px) {
    .board-browser {
        grid-template-columns: calc((100vw - 312px) / 3) minmax(0, 1fr);
    }
}

@media (min-width: 1280px) {
    .board-browser {
        grid-template-columns: min(305px, calc((100vw - 332px) / 4)) minmax(0, 1fr);
    }
}

.board-shell .select2-search--inline .select2-search__field,
.board-post-dialog .select2-search--inline .select2-search__field {
    min-height: 20px;
    height: 20px;
    max-height: 20px;
    padding: 0;
    margin-top: 0;
    font-size: 13px;
    line-height: 20px;
}

.board-filters>.board-browse-toolbar {
    grid-column: 2;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
}

.board-browse-toolbar .board-search {
    flex: 1 1 180px;
    min-width: 0;
    max-width: 400px;
}

.board-browse-toolbar .board-sort {
    flex: 0 1 160px;
    min-width: 0;
    margin-left: auto;
}

.board-browse-toolbar>.board-button {
    height: 34px;
    font-size: 12px;
}

.board-browse-toolbar>.board-filter-toggle {
    width: 34px;
    padding: 8px;
}

.board-browse-toolbar>.board-view-choice {
    margin-left: 0;
}

.board-filter-toggle[aria-expanded="true"] {
    background: #e5e5e5;
}

.board-filter-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.board-filter-clear {
    margin-left: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #737373;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.board-filter-clear:hover {
    text-decoration: underline;
}

.board-filter-panel-heading [data-board-filter-close],
.board-browse-toolbar>.board-filter-toggle {
    display: none;
}

.board-filter-backdrop {
    position: fixed;
    inset: 0;
    background: #0008;
    z-index: 49;
}

.board-filter-backdrop[hidden] {
    display: none;
}

.board-browse-posts {
    grid-column: 2;
    min-width: 0;
}

.board-browser>#board-filter-error {
    grid-column: 2;
}

.board-browser[data-filters-open="false"] {
    grid-template-columns: minmax(0, 1fr);
}

.board-browser[data-filters-open="false"] .board-browse-toolbar,
.board-browser[data-filters-open="false"] .board-browse-posts,
.board-browser[data-filters-open="false"]>#board-filter-error {
    grid-column: 1;
}

@media (max-width: 767px) {
    .board-browser:not([data-filters-open="true"]) .board-filter-panel {
        display: none;
    }

    .board-browser {
        grid-template-columns: minmax(0, 1fr);
    }

    .board-filters>.board-browse-toolbar,
    .board-browse-posts,
    .board-browser>#board-filter-error {
        grid-column: 1;
    }

    .board-filter-panel {
        position: fixed;
        inset: 0 auto 0 0;
        z-index: 50;
        width: min(320px, 85vw);
        height: 100dvh;
        overflow-y: auto;
        border-radius: 0;
        box-shadow: 0 25px 50px -12px #0004;
        padding: 0 16px 16px;
    }

    .board-filter-panel-heading {
        position: sticky;
        top: 0;
        z-index: 10;
        background: #fff;
        border-bottom: 1px solid #e5e5e5;
        margin: 0 -16px 12px;
        padding: 12px 16px;
    }

    .board-filter-panel-heading h2 {
        margin: 0;
    }

    .board-filter-panel-heading [data-board-filter-close] {
        padding: 6px;
        border-radius: 6px;
        color: #a3a3a3;
    }

    .board-filter-panel-heading [data-board-filter-close]:hover {
        color: #525252;
        background: #f5f5f5;
    }

    .board-filter-panel-heading [data-board-filter-close],
    .board-browse-toolbar>.board-filter-toggle {
        display: inline-flex;
    }
}

#board-filter-error[hidden] {
    display: none;
}

#board-results {
    view-transition-name: board-results;
}

html {
    view-transition-name: none;
}

::view-transition {
    pointer-events: none;
}

::view-transition-group(*) {
    animation-duration: 240ms;
    animation-timing-function: cubic-bezier(.2, .8, .2, 1);
}

/* Move and resize the containers while keeping snapshot text at its original scale. */
::view-transition-old(*),
::view-transition-new(*) {
    animation-duration: 180ms;
    height: 100%;
    object-fit: none;
    object-position: top left;
    overflow: visible;
}

/* Each post has its own snapshot, including the shadow outside its border. */
::view-transition-group(*),
::view-transition-image-pair(*) {
    overflow: visible;
}

::view-transition-new(board-results) {
    animation-name: board-results-enter;
}

::view-transition-old(board-results) {
    animation-name: board-results-exit;
}

@keyframes board-results-enter {
    from { opacity: 0; translate: 0 6px; }
    to { opacity: 1; translate: 0 0; }
}

@keyframes board-results-exit {
    from { opacity: 1; translate: 0 0; }
    to { opacity: 0; translate: 0 -4px; }
}

.board-post-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.board-post-list-item {
    display: flex;
    align-items: stretch;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    min-width: 0;
}

.board-post-list-item:hover {
    box-shadow: 0 1px 3px #0000000d;
}

.board-post-list-main {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    min-width: 0;
    flex: 1;
}

.board-post-list-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.board-post-list-badges {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
}

.board-post-list-facts {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
    padding: 16px;
    border-left: 1px solid #f0f0f0;
    flex: 0 1 340px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.board-post-list-facts .board-card-amount {
    gap: 20px;
}

.board-post-list-facts .board-card-amount strong {
    font-size: 15px;
}

.board-post-list-action {
    display: flex;
    align-items: center;
    padding: 16px;
    border-left: 1px solid #f0f0f0;
}

.board-review-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    flex-shrink: 0;
    border-radius: 50%;
    background: #737373;
}

.board-review-dot-approved {
    background: #15803d;
}

.board-review-dot-pending {
    background: #a16207;
}

.board-review-dot-rejected {
    background: #b91c1c;
}

.board-review-dot:focus-visible {
    outline: 2px solid #525252;
    outline-offset: 3px;
}

.board-review-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 24px;
    margin-left: -4px;
    padding: 0;
    flex-shrink: 0;
    border: 0;
    background: transparent;
    border-radius: 6px;
}

.board-review-trigger:focus-visible {
    outline: 2px solid #525252;
    outline-offset: 2px;
}

.board-review-tooltip {
    position-area: block-start;
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    width: max-content;
    max-width: calc(100vw - 2rem);
    margin: 6px;
    padding: 6px 10px;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    background: #fff;
    color: #262626;
    font-size: 12px;
    line-height: 16px;
    box-shadow: 0 2px 8px #00000014;
}

.board-card>.board-card-top {
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap;
}

.board-card-top>.board-social-button {
    margin-left: auto;
}

.board-social-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 24px;
    padding: 4px;
    border: 0;
    background: transparent;
    color: #525252;
    cursor: pointer;
}

@media (pointer: coarse) {
    .board-social-button::before {
        content: '';
        position: absolute;
        inset: -10px;
    }
}

.board-social-button:hover {
    color: #171717;
}

.board-social-menu {
    max-height: calc(100dvh - 24px);
    overflow-y: auto;
    overscroll-behavior: contain;
}

.board-copy-option {
    display: flex;
    align-items: center;
    border-radius: 8px;
}

.board-copy-option:hover {
    background: #f5f5f5;
}

.board-copy-option .actions-link {
    flex: 1;
    width: auto;
    min-width: 0;
}

.board-share-help {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    padding: 6px;
    margin-right: 2px;
    border: 0;
    border-radius: 6px;
    background: none;
    color: #737373;
    font-size: 12px;
    line-height: 16px;
    cursor: pointer;
}

.board-share-help svg {
    width: 14px;
    height: 14px;
}

.board-share-help:hover {
    color: #404040;
}

.board-share-tooltip {
    width: 240px;
}

.board-social-copy-feedback {
    padding: 8px 12px;
    overflow-wrap: anywhere;
}

.board-social-copy-feedback p {
    color: #737373;
    font-size: 12px;
    margin-top: 4px;
}

.board-social-copy-feedback:has(p:empty) {
    display: none;
}

.board-social-copy-feedback textarea {
    width: 100%;
    min-height: 120px;
    margin-top: 8px;
}

.board-social-copy-feedback input {
    margin-top: 8px;
}

.board-social-copy-feedback input[hidden] {
    display: none;
}

.board-post-expiry {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 12px;
    color: #737373;
    font-size: 12px;
}

.board-post-expiry p {
    margin: 0;
}

.board-post-expiry-urgent {
    padding: 8px 12px;
    background: #fff8e8;
    color: #8a5c16;
    border-radius: 8px;
}

.board-post-expiry .board-button {
    min-height: 44px;
    padding: 6px 10px;
}

.board-social-button:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 2px;
    border-radius: 6px;
}

#board-results>.board-notice {
    margin-bottom: 16px;
}

.board-results-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

#board-results {
    container: board-results / inline-size;
    min-width: 0;
}

.board-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.board-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    background: #fff;
    padding: 16px;
    min-width: 0;
}

.board-card-top,
.board-card-amount,
.board-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.board-kind-label {
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 500;
    line-height: 16px;
    white-space: nowrap;
}

.board-kind-moq { background: #f3e8ff; color: #6b21a8; }
.board-open-pill { background: #dcfce7; color: #166534; }
.board-pending-pill { background: #fef3c7; color: #92400e; }
.board-kind-have { background: #ffe4e6; color: #9f1239; }
.board-kind-want { background: #fef3c7; color: #92400e; }

.board-status-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    line-height: 16px;
    color: #525252;
    white-space: nowrap;
}

.board-status-label::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #737373;
}

.board-status-label.board-status-open::before { background: #16a34a; }
.board-status-label.board-status-expired::before { background: #ca8a04; }
.board-status-label.board-status-withdrawn::before { background: #dc2626; }

.board-public-status-visible {
    display: inline-block;
    vertical-align: middle;
    padding: 2px 8px;
    border-radius: 8px;
    background: #dbeafe;
    color: #1e40af;
    font-size: 12px;
    font-weight: 500;
    line-height: 16px;
    white-space: nowrap;
}

.board-public-status-compact {
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 11px;
}

.board-public-status-bordered { border: 1px solid #93c5fd; }

.board-card-title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.board-card-title a:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.board-ingredient-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.board-new-tab-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-left: 4px;
    vertical-align: -1px;
}

.board-card-name-trigger {
    display: block;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    overflow-wrap: anywhere;
    cursor: pointer;
}

.board-card-name-trigger:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.board-inci {
    font-size: 12px;
    color: #737373;
    margin-top: 3px;
    overflow-wrap: anywhere;
}

.board-card-amount {
    flex-wrap: wrap;
}

.board-card-amount {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.board-card-amount strong {
    font-size: 18px;
    font-weight: 600;
}

.board-card-amount strong span {
    font-size: 14px;
    font-weight: 400;
}

.board-card-note {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    color: #525252;
    font-size: 12px;
    line-height: 1.7;
}

.board-card-footer {
    margin-top: 0;
    justify-content: flex-start;
    gap: 8px;
    margin-right: -16px;
    margin-bottom: -16px;
    margin-left: -16px;
    padding: 12px;
    border-top: 1px solid #f0f0f0;
}

.board-card-footer>a {
    flex: 0 1 auto;
    min-width: 0;
    overflow-wrap: anywhere;
}

.board-more-button {
    flex: 0 0 32px;
    width: 32px;
    min-height: 32px;
    align-self: stretch;
    padding: 8px;
}

[popovertarget="board-owner-actions"] {
    anchor-name: --board-owner-actions;
}

#board-owner-actions {
    position-anchor: --board-owner-actions;
}

.board-action-menu {
    position: fixed;
    inset: auto;
    top: calc(anchor(bottom) + 6px);
    right: anchor(right);
    position-try-fallbacks: flip-block, flip-inline, flip-block flip-inline;
    margin: 0;
    width: max-content;
    min-width: 0;
    max-width: min(280px, calc(100vw - 32px));
    padding: 6px;
    border: 1px solid #e5e5e5;
    background: white;
}

.board-action-menu :is(a, button):focus-visible {
    outline: 2px solid #a3a3a3;
    outline-offset: -2px;
}

.board-action-menu .actions-link {
    white-space: normal;
    overflow-wrap: anywhere;
}

.board-withdraw-button {
    font-size: 13px;
    font-weight: 400;
}

.board-share-fields {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 12px;
}

.board-share-status {
    margin-top: 12px;
    color: #15803d;
    font-size: 13px;
}

.board-message-form textarea,
#board-report-form textarea {
    field-sizing: content;
    height: auto;
    resize: vertical;
}

.board-contact-composer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.board-contact-field {
    flex: 1;
    min-width: 0;
}

.board-contact-composer .board-composer-send {
    margin-top: 4px;
}

.board-contact-field .form-group {
    margin-bottom: 0;
}

.board-participant {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    margin-top: 8px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
}

.board-participant:first-of-type {
    margin-top: 12px;
}

.board-participant-details {
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
}

.board-participant-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.board-participant-quantities {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin-top: 8px;
}

.board-participant-quantities dt {
    font-size: 11px;
    color: #737373;
}

.board-participant-quantities dd {
    margin: 2px 0 0;
    font-size: 13px;
    font-weight: 600;
}

.board-participant-heading .board-participant-status {
    font-size: 11px;
    line-height: 1.4;
    flex-shrink: 0;
}

.board-participant-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.board-organizer-share-form {
    align-items: center;
}

.board-organizer-share-form .input-field {
    width: 96px;
    height: 28px;
    min-height: 28px;
    padding: 4px 8px;
    font-size: 12px;
    line-height: 18px;
}

.board-organizer-share-form .board-error {
    flex-basis: 100%;
    max-width: 240px;
}

.board-organizer-share-unit {
    margin-inline-end: 8px;
}

.board-organizer-share-status {
    grid-column: 1 / -1;
    margin-top: 0;
    text-align: right;
    font-size: 12px;
}

.board-participant-actions .board-button {
    min-height: 28px;
    padding: 4px 10px;
    font-size: 12px;
}

#board-moq-participation .board-participant {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px 20px;
    padding: 10px 0;
    margin-top: 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid #e5e5e5;
    border-radius: 0;
}

#board-moq-participation .board-organizer-row {
    row-gap: 4px;
}

#board-moq-participation .board-participant-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    justify-content: space-between;
    gap: 8px 20px;
}

#board-moq-participation .board-participant-heading {
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
}

#board-moq-participation .board-participant-quantities {
    display: grid;
    grid-template-columns: repeat(2, minmax(80px, auto));
    gap: 16px;
    margin-top: 0;
}

#board-moq-participation .board-participant-quantities> :last-child {
    grid-column: 2;
}

@media (max-width: 600px) {
    #board-moq-participation .board-participant {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    #board-moq-participation .board-participant-details {
        grid-template-columns: minmax(0, 1fr);
        gap: 8px;
    }

    #board-moq-participation .board-participant-actions {
        justify-content: flex-end;
    }

    #board-moq-participation .board-participant-actions .board-button {
        min-height: 44px;
    }

    .board-organizer-share-form .input-field {
        height: 44px;
        min-height: 44px;
        font-size: 16px;
    }

    #board-moq-participation .board-participant-quantities {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #board-moq-participation .board-participant-quantities> :only-child {
        grid-column: 1;
    }
}

/* Keep the request queue compact and separate from the wider board. */
.board-content:has(.board-request-tabs) {
    max-width: 1024px;
}

.board-request-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 16px;
    container-type: inline-size;
}

.board-request-group {
    min-width: 0;
    display: flex;
    scroll-margin-top: 24px;
}

.board-request-group > .board-card {
    width: 100%;
}

.board-request-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 16px;
}

.board-request-details .board-participant-quantities {
    margin: 0;
    gap: 12px 24px;
}

.board-request-heading h3 {
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.board-request-heading .board-muted {
    margin-top: 2px;
}

.board-request-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid #eee;
}

.board-share-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 12px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 8px;
}

.board-share-summary dt {
    color: #737373;
    font-size: 12px;
}

.board-share-summary dd {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 600;
}

.board-share-material h3 {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
}

.board-share-material p.board-share-inci {
    font-size: 12px;
    line-height: 1.5;
    margin-top: 2px;
    overflow-wrap: anywhere;
}

.board-dialog-footer.board-share-footer {
    flex-wrap: wrap;
    gap: 8px;
}

.board-share-footer .board-withdraw-button {
    margin-right: auto;
}

.board-post-dialog:has(#board-contact-form) {
    width: min(480px, calc(100% - 32px));
}

.board-post-list-action {
    flex: 0 0 auto;
    width: max-content;
    min-width: 208px;
    box-sizing: border-box;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 12px;
}

.board-post-list-action>.board-social-button {
    align-self: flex-end;
}

.board-post-list-action>[data-board-actions] {
    display: flex;
    align-items: center;
    gap: 8px;
}

.board-post-list-action>[data-board-actions]>a {
    flex: 1 0 auto;
    white-space: nowrap;
}

.board-post-list-action .board-more-button {
    height: 32px;
    align-self: center;
}

.board-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.board-post-dialog:has(#board-share-form) {
    width: min(480px, calc(100% - 32px));
}

#board-share-form {
    margin-top: 20px;
}

.board-review-status {
    font-size: 12px;
    color: #92400e;
}

.db-group {
    --moq-color: #dc5050;
}

.board-moq {
    --moq-color: #dc5050;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.board-moq[data-progress-stage="partial"],
.db-group:has([data-progress-stage="partial"]) {
    --moq-color: #e5a52b;
}

.board-moq-summary {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
}

.board-poster {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: auto;
}

.board-poster-name {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #404040;
}

.board-poster-icon {
    display: flex;
    flex: 0 0 14px;
}

.board-poster-icon svg {
    width: 14px;
    height: 14px;
}

.board-poster-location {
    display: flex;
    align-items: center;
    gap: 4px;
}

.board-poster-location>span {
    display: flex;
    flex: 0 0 14px;
}

.board-poster-location svg {
    width: 14px;
    height: 14px;
}

.board-moq[data-progress-stage="complete"],
.db-group:has([data-progress-stage="complete"]) {
    --moq-color: #36a568;
}

.board-card>.board-card-amount+.board-moq {
    margin-top: -8px;
}

.board-moq-meter {
    display: block;
    width: 100%;
    padding: 8px 0;
    border-radius: 4px;
    cursor: pointer;
}

.board-moq-meter:focus-visible {
    outline: 2px solid #525252;
    outline-offset: 3px;
}

.board-moq-track {
    display: block;
    position: relative;
    height: 8px;
    border-radius: 6px;
    overflow: hidden;
    background: #e5e5e5;
}

.board-moq-approved,
.board-moq-pending {
    position: absolute;
    top: 0;
    bottom: 0;
}

.board-moq-approved {
    left: 0;
    background: var(--moq-color);
}

.board-moq-pending {
    background: repeating-linear-gradient(135deg, #a3a3a3 0 4px, #e5e5e5 4px 8px);
}

.board-moq-tooltip {
    border-color: #e5e5e5;
    background: white;
    color: #525252;
}

.board-moq-tooltip>p {
    color: #262626;
}

.board-moq-tooltip dl {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.board-moq-tooltip dl>div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.board-moq-tooltip dd {
    font-weight: 600;
    text-align: right;
}

@media (prefers-reduced-motion: no-preference) {

    .board-moq-approved,
    .board-moq-pending {
        transition: width 450ms cubic-bezier(.2, .8, .2, 1), left 450ms cubic-bezier(.2, .8, .2, 1);
    }
}

.board-panel {
    min-width: 0;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    padding: 16px;
}

.board-review-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

#board-content {
    transition: opacity 180ms ease-out, translate 180ms ease-out;
}

#board-content.board-removing {
    opacity: 0;
    translate: 0 6px;
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    #board-content {
        transition: none;
    }

    #board-content.board-removing {
        translate: none;
    }
}

.board-review-heading {
    justify-content: space-between;
}

.board-text-action {
    padding: 6px 0;
    border: 0;
    background: none;
    color: #525252;
    font-size: 12px;
    line-height: 20px;
    cursor: pointer;
}

.board-text-action:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.board-text-action-danger {
    color: #8e0b21;
}

.board-shell textarea,
.board-post-dialog textarea {
    box-sizing: border-box;
    max-height: 320px;
    resize: none;
    overflow-y: auto;
}

.board-shell textarea:not(.board-composer textarea, .board-message-form textarea, .board-report-decision-form textarea, #board-report-form textarea, [name="notes"], [name="price_terms"]),
.board-post-dialog textarea:not(#board-report-form textarea, [name="notes"], [name="price_terms"]) {
    min-height: 72px;
}

.board-review-form textarea {
    min-height: 72px;
    font-size: 12px;
}

.board-content:has(#moderation-queues, .board-report-case) {
    max-width: 1152px;
}

.board-report-reason {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    font-size: 13px;
    line-height: 1.6;
}

.board-report-details {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 16px;
}

.board-report-copy {
    flex: 1;
    min-width: 0;
}

.board-report-details > .board-card-top {
    justify-content: flex-start;
}

.board-report-details .board-status-label::before {
    display: none;
}

.board-report-copy > p {
    margin: 4px 0 0;
}

.board-report-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
}

.board-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 12px;
}

.board-report-details .board-report-complaint {
    padding: 0;
    border: 0;
}

.board-report-details .board-report-complaint p:first-child {
    font-weight: 600;
}

.board-request-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
    padding: 16px;
}

.board-request-details {
    margin: 0;
    padding: 12px 0 0;
    border-top: 1px solid #eee;
}

.board-request-details .board-request-actions {
    margin-top: 0;
    padding-top: 4px;
    border-top: 0;
}
.board-report-heading { display: flex; flex-direction: column; gap: 2px; }
.board-report-heading .board-muted { font-size: 11px; }
.board-report-complaint { font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; padding: 0 0 16px; border-bottom: 1px solid #eee; }
.board-report-complaint p { margin: 0; }
.board-report-complaint p + p { margin-top: 6px; color: #525252; }
.board-report-decision-form > .board-muted { font-size: 11px; }

.board-report-decision h3 {
    font-size: 14px;
    font-weight: 600;
}

.board-report-owner {
    margin-top: auto;
    font-size: 13px;
}

.board-report-owner>a {
    display: inline-block;
    margin-top: 8px;
}

.board-report-decision-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 4px;
}

.board-report-decision-form>label {
    font-size: 12px;
    font-weight: 500;
}

.board-shell .board-report-decision-form textarea {
    field-sizing: content;
    min-height: 0;
    height: auto;
    width: 100%;
}

.board-report-action {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    margin-top: 8px;
}
.board-report-action .board-button { font-size: 12px; padding: 7px 10px; }


.board-panel[hidden] {
    display: none;
}

.board-section-heading {
    margin-bottom: 16px;
}

.board-section-heading h2,
.board-panel>h2 {
    font-size: 14px;
    font-weight: 600;
}

.board-section-heading p {
    font-size: 12px;
    color: #737373;
    margin-top: 4px;
}

.board-post-form {
    width: 100%;
    max-width: 880px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.board-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
    row-gap: 12px;
}

.board-form-section {
    min-width: 0;
    padding-top: 12px;
}

.board-form-section legend {
    font-size: 13px;
    font-weight: 600;
    color: #525252;
}

.board-post-form [id^="div_id_"] {
    margin-bottom: 0;
}

.board-post-form #board-ingredient-status:empty {
    display: none;
}

.board-quantity-row,
.board-condition-row,
.board-location-row {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.board-quantity-row {
    grid-template-columns: minmax(0, 1fr) 90px;
    width: calc((100% - 12px) / 2);
}

.board-condition-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
}

.board-quantity-row > div,
.board-condition-row > div {
    min-width: 0;
}

.board-location-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.board-location-hint {
    margin-bottom: 12px;
}

.board-post-options {
    border-top: 1px solid #e5e5e5;
    padding-top: 16px;
}

.board-post-options textarea,
.board-shell textarea[name="price_terms"],
.board-post-dialog textarea[name="price_terms"] {
    field-sizing: content;
    min-height: 0;
    height: auto;
}

.board-post-options #div_id_disclaimer>.relative {
    align-items: flex-start;
    gap: 8px;
}

.board-post-options #id_disclaimer {
    flex-shrink: 0;
    margin-top: 3px;
}

.board-public-listing {
    padding: 14px 16px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #eff6ff;
}

.board-public-listing #div_id_public_listing>.relative {
    gap: 8px;
}

.board-public-listing .form-check-label {
    font-weight: 500;
}

.board-public-listing #hint_id_public_listing {
    margin-left: 24px;
    margin-top: 6px;
    font-size: 12px;
    line-height: 20px;
    color: #525252;
}

.board-field-help {
    position: relative;
}

.board-field-help [id^="hint_id_"] {
    padding-right: 28px;
}

.board-field-info {
    position: absolute;
    right: 0;
    bottom: -4px;
    justify-content: center;
    width: 24px;
    height: 24px;
    padding: 0;
    margin: 0;
}

.board-field-info svg {
    display: block;
    width: 18px;
    height: 18px;
}

.board-public-listing>.board-field-info {
    right: 12px;
    bottom: 12px;
}

.board-form-tooltip {
    max-height: min(440px, calc(100dvh - 32px));
    overflow-y: auto;
}

@media (min-width: 701px) {
    .board-post-dialog:has(#board-sharing-form) {
        width: min(560px, calc(100% - 32px));
    }
}

.board-sharing-settings {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.board-sharing-heading {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.board-sharing-settings [id^="div_id_"],
.board-sharing-settings [data-board-copy-status]:empty {
    margin: 0;
}

.board-sharing-settings [data-board-copy-status]:empty {
    display: none;
}

.board-sharing-choice {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 12px;
    line-height: 20px;
}

.board-sharing-choice input {
    flex-shrink: 0;
    margin-top: 2px;
}

.board-sharing-choice strong,
.board-sharing-choice .board-muted {
    display: block;
}

.board-sharing-hint {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-top: 4px;
}

.board-sharing-hint .board-share-help {
    margin-top: -3px;
}

.board-sharing-link {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fafafa;
}

.board-sharing-link>div {
    flex: 1 1 200px;
    min-width: 0;
}

.board-sharing-link>.board-sharing-link-actions {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}

.board-sharing-link output {
    display: block;
    margin-top: 3px;
    overflow-wrap: anywhere;
    font-size: 12px;
    line-height: 18px;
}

.board-sharing-consent {
    padding: 12px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 12px;
    line-height: 20px;
}

.board-sharing-consent legend {
    padding: 0 4px;
    font-weight: 600;
}

.board-sharing-consent ul {
    padding-left: 16px;
    margin-bottom: 12px;
    list-style: disc;
}

.board-sharing-turn-off {
    margin-right: auto;
}

@media (max-width: 500px) {
    .board-quantity-row {
        grid-template-columns: 1fr 90px;
    }

    .board-condition-row {
        grid-template-columns: 1fr 1fr;
    }

    .board-location-row {
        grid-template-columns: 1fr 1fr;
    }

    .board-location-row> :first-child {
        grid-column: 1 / -1;
    }
}

.board-form-wide {
    grid-column: 1 / -1;
}

.board-suggestions:empty {
    display: none;
}

.board-suggestions:not(:empty) {
    padding: 12px;
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    margin: 0 0 16px;
}

.board-notice {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    background: #fafafa;
}

.board-error {
    border-color: #fecaca;
    color: #991b1b;
    background: #fef2f2;
}

.board-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
    gap: 20px;
    align-items: start;
}

.board-stack {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

.board-facts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
    gap: 16px 24px;
    margin-top: 20px;
    font-size: 13px;
}

.board-facts dt {
    color: #737373;
}

.board-facts dd {
    margin: 4px 0 0;
    color: #262626;
    overflow-wrap: anywhere;
}

.board-details-notes {
    border-top: 1px solid #e5e5e5;
    padding-top: 16px;
    margin-top: 20px;
    white-space: pre-wrap;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.board-moderation-guidance { margin-top: 8px; font-size: 12px; line-height: 1.5; color: #737373; }

.board-results-empty {
    grid-column: 1 / -1;
    padding: 16px;
    text-align: center;
}

.board-results-empty h2 {
    font-size: 18px;
    font-weight: 600;
    color: #262626;
}

.board-results-empty p {
    margin-top: 4px;
    font-size: 14px;
    font-weight: 300;
    color: #737373;
}

.board-material-option {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}

.board-material-option strong {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-material-inci {
    font-size: 12px;
    opacity: .7;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#select2-board-material-picker-results {
    max-height: 180px;
}

.board-list {
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    overflow: hidden;
    background: white;
}

.board-list-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e5e5;
}

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

a.board-list-row:hover {
    background: #fafafa;
}

.board-list-row>div {
    min-width: 0;
}

.board-list-row h2,
.board-list-row h3 {
    font-size: 14px;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.board-list-row p {
    margin-top: 4px;
}

.board-list-meta {
    text-align: right;
    flex-shrink: 0;
}

.board-shell:has(.board-inbox) {
    height: calc(100dvh - 56px);
    box-sizing: border-box;
    padding-bottom: 16px;
}

.board-content:has(.board-inbox) {
    height: 100%;
    min-height: 0;
    max-width: none;
}

.board-content:has(.board-inbox)>.board-heading {
    flex-shrink: 0;
}

.board-inbox {
    position: relative;
    display: grid;
    grid-template-columns: 300px minmax(0, 1fr);
    min-height: 0;
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 12px;
    background: white;
    overflow: hidden;
}

.board-threads-toggle,
.board-threads-close,
.board-threads-backdrop {
    display: none;
}

.board-inbox-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.board-threads {
    background: #fafafa;
    min-height: 0;
    overflow-y: auto;
    border-right: 1px solid #e5e5e5;
    padding: 10px;
    min-width: 0;
}

.board-threads-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    font-size: 12px;
}

.board-thread {
    display: block;
    padding: 8px 10px;
    margin: 2px 0;
    border-radius: 7px;
    overflow-wrap: anywhere;
}

.board-thread-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    line-height: 18px;
}

.board-thread-heading strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-thread p,
.board-thread small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.board-thread:hover {
    background: #f5f5f5;
}

.board-thread[aria-current="page"] {
    background: #eee;
}

.board-thread strong {
    font-size: 12px;
    font-weight: 500;
}

.board-thread p {
    font-size: 11px;
    color: #737373;
    margin: 2px 0;
}

.board-thread small {
    display: block;
    font-size: 10px;
    line-height: 1.5;
    color: #737373;
}

.board-thread-empty {
    padding: 16px;
}

.board-unread-dot {
    height: 6px;
    width: 6px;
    border-radius: 50%;
    background: #404040;
    flex-shrink: 0;
}

.board-unread-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #404040;
    color: #fff;
    font-size: 9px;
    font-weight: 600;
    line-height: 16px;
    padding: 0 5px;
}

.board-unread-count {
    position: absolute;
    top: 0;
    right: 0;
    min-width: 16px;
}

html[data-board-sidebar-expanded="true"] .board-unread-count {
    position: static;
}

.board-conversation {
    position: relative;
    border-radius: 12px;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.board-conversation-post-dock {
    position: absolute;
    inset: 0 0 auto;
    z-index: 1;
    padding-bottom: 24px;
    background: linear-gradient(to bottom, #fff, transparent 24px);
    pointer-events: none;
}

.board-conversation-post {
    width: fit-content;
    max-width: min(600px, calc(100% - 32px));
    margin: 12px auto 0;
    padding: 0 16px;
    border: 1px solid #e5e5e5;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 2px 6px rgb(0 0 0 / 6%);
    pointer-events: auto;
    interpolate-size: allow-keywords;
    transition:
        width 360ms cubic-bezier(.22, 1, .36, 1),
        border-radius 360ms cubic-bezier(.22, 1, .36, 1),
        box-shadow 280ms ease;
}

.board-conversation-post[data-expanded="true"] {
    width: min(600px, calc(100% - 32px));
    border-radius: 24px;
    box-shadow: 0 6px 20px rgb(0 0 0 / 9%);
}

.board-conversation-post-toggle {
    display: block;
    width: 100%;
    min-height: 44px;
    padding: 10px 0;
    font: inherit;
    color: inherit;
    text-align: left;
    cursor: pointer;
}

.board-conversation-post-toggle:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 2px;
    border-radius: 12px;
}

.board-conversation-post-details {
    display: grid;
    grid-template-rows: 1fr;
    transition: grid-template-rows 360ms cubic-bezier(.22, 1, .36, 1);
}

.board-conversation-post-details-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    min-width: 0;
    min-height: 0;
    overflow: hidden;
    opacity: 1;
    transform: translateY(0);
    clip-path: inset(0 0 0 0 round 8px);
    transition:
        clip-path 360ms cubic-bezier(.22, 1, .36, 1),
        opacity 200ms ease,
        transform 280ms cubic-bezier(.22, 1, .36, 1);
    transition-delay: 80ms;
}

.board-conversation-post-details-inner::after {
    content: '';
    width: 100%;
    height: 4px;
}

html[data-board-js] .board-conversation-post[data-expanded="false"] .board-conversation-post-details {
    grid-template-rows: 0fr;
    contain: inline-size;
}

html[data-board-js] .board-conversation-post[data-expanded="false"] .board-conversation-post-details-inner {
    opacity: 0;
    transform: translateY(-6px);
    clip-path: inset(0 0 100% 0 round 8px);
    transition-duration: 240ms, 120ms, 200ms;
    transition-delay: 0ms;
}

@media (prefers-reduced-motion: reduce) {
    .board-conversation-post,
    .board-conversation-post-details,
    .board-conversation-post-details-inner {
        transition: none !important;
    }
}

.board-conversation-post .board-card-title {
    font-size: 13px;
    line-height: 20px;
    margin: 0;
}

.board-conversation-post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 8px;
    font-size: 12px;
}

.board-conversation-post-link {
    font-size: 12px;
    white-space: nowrap;
}

.board-message-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-height: 0;
    overflow-y: auto;
    padding: calc(var(--board-post-header-height, 104px) + 8px) max(16px, calc((100% - 800px) / 2)) 16px;
    padding-bottom: calc(var(--board-composer-height, 150px) + 16px);
    flex: 1;
}

.board-message-list > * {
    transition: filter 160ms ease-out, opacity 160ms ease-out;
}

html[data-board-js] .board-message-list[data-scroll-on-open] > * {
    filter: blur(4px);
    opacity: 0;
}

@media (prefers-reduced-motion: reduce) {
    .board-message-list > * {
        transition: none;
    }
}

.board-message {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    flex-shrink: 0;
    align-self: flex-start;
    width: fit-content;
    max-width: 85%;
}

.board-message-continuation {
    margin-top: -10px;
}

.board-message-sender {
    font-size: 11px;
    font-weight: 400;
    color: #525252;
    margin-bottom: 4px;
}

.board-message-time {
    font-size: 10px;
    color: #a3a3a3;
    margin-top: 4px;
}

@media (prefers-reduced-motion: no-preference) {
    .board-message-sent {
        transition: opacity 220ms ease-out, translate 220ms ease-out;
    }

    @starting-style {
        .board-message-sent {
            opacity: 0;
            translate: 0 8px;
        }
    }
}

.board-send-error {
    flex-basis: 100%;
}

.board-composer.htmx-request .board-composer-send {
    opacity: .5;
    cursor: wait;
}

.board-message-own {
    align-self: flex-end;
    align-items: flex-end;
}

.board-message-system {
    display: block;
    align-self: center;
    width: min(100%, 560px);
    padding: 12px;
    border-radius: 8px;
    background: #fafafa;
    text-align: left;
    color: #737373;
    font-size: 12px;
}

.board-quantity-heading {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 4px 12px;
    font-size: 11px;
}

.board-quantity-heading strong {
    color: #525252;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.board-quantity-heading time {
    font-size: 10px;
}

.board-quantity-summary {
    margin-top: 4px;
    font-size: 11px;
    overflow-wrap: anywhere;
}

.board-quantity-history {
    margin-top: 6px;
}

.board-quantity-history summary {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
    font-size: 11px;
    list-style: none;
    color: #525252;
    padding: 4px 0;
}

.board-quantity-history summary::-webkit-details-marker {
    display: none;
}

.board-quantity-history summary:hover {
    color: #262626;
}

.board-history-chevron {
    width: 14px;
    height: 14px;
}

.board-quantity-history[open] .board-history-chevron {
    transform: rotate(180deg);
}

.board-history-hide,
.board-quantity-history[open] .board-history-show {
    display: none;
}

.board-quantity-history[open] .board-history-hide {
    display: inline;
}

.board-history-count {
    font-size: 10px;
    color: #737373;
}

.board-quantity-history ol {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    display: grid;
    gap: 8px;
}

.board-quantity-history li {
    display: grid;
    grid-template-columns: 85px minmax(0, 1fr);
    gap: 8px;
    font-size: 10px;
    overflow-wrap: anywhere;
}

.board-message-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    padding: 12px 15px;
    border-radius: 12px;
    max-width: 100%;
    background: #f3f3f3;
    font-size: 15px;
    line-height: 1.5;
    color: #262626;
}

.board-message-own .board-message-text {
    background: #404040;
    color: #fff;
}

.board-message-system .board-message-text {
    padding: 5px;
    background: transparent;
    font-size: 10px;
}

.board-activity-items {
    list-style: none;
    margin: 0;
    padding: 0 0 0 7px;
}

.board-activity-item {
    position: relative;
    padding: 0 0 20px 20px;
    border-left: 1px solid #e5e5e5;
}

.board-activity-item::before {
    content: '';
    position: absolute;
    left: -4px;
    top: 5px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #a3a3a3;
}

.board-activity-title {
    font-size: 12px;
    font-weight: 600;
    color: #404040;
}

.board-activity-reason {
    margin-top: 6px;
    font-size: 12px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.board-activity-more {
    padding-left: 27px;
}

.board-supplier-link-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.board-supplier-link-row>div {
    flex: 1;
    min-width: 0;
}

[data-link-rows] {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 8px;
}

.board-link-remove {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    padding: 6px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #a3a3a3;
    cursor: pointer;
}

.board-link-remove svg {
    width: 16px;
    height: 16px;
}

.board-link-remove:hover {
    color: #525252;
    background: #f5f5f5;
}

[data-add-link][hidden] {
    display: none;
}

[data-priced-fields][hidden] {
    display: none;
}

.board-pricing-fields {
    display: grid;
    gap: 16px;
}

.board-pricing-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.board-pricing-row>div {
    min-width: 0;
}

.board-commitment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: auto;
    border-radius: 0 0 12px 12px;
}

.board-composer {
    flex-shrink: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 0 0 12px;
}

.board-composer-dock {
    position: absolute;
    inset: auto 0 0;
    padding: 24px 16px 0;
    background: linear-gradient(to bottom, transparent, #fff 24px);
    pointer-events: none;
}

.board-composer-dock>* {
    pointer-events: auto;
}

.board-composer-field {
    flex: 1;
    min-width: 0;
}

.board-composer textarea {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 36px;
    max-height: 192px;
    padding: 8px 4px;
    border: 0;
    outline: none;
    box-shadow: none;
    background: transparent;
    resize: none;
    overflow-y: auto;
    font-family: inherit;
    font-size: 14px;
    line-height: 20px;
}

.board-composer-input {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 6px;
    border: 1px solid #e5e5e5;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 4px 20px rgb(0 0 0 / 6%);
    transition: border-color 160ms ease, box-shadow 160ms ease;
}

.board-composer-input:focus-within {
    border-color: #a3a3a3;
    box-shadow: 0 0 0 2px #f5f5f5;
}

.board-composer-send {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    margin: 2px;
    border: 0;
    border-radius: 10px;
    background: #171717;
    color: #fff;
    cursor: pointer;
}

.board-composer-send:hover {
    background: #404040;
}

.board-composer-send:disabled {
    opacity: .4;
    cursor: default;
}

.board-composer-send:focus-visible {
    outline: 2px solid #737373;
    outline-offset: 3px;
}

.board-composer-send span {
    width: 16px;
    height: 16px;
    transform: rotate(90deg);
}

@media (prefers-reduced-motion: reduce) {
    .board-composer-input {
        transition: none;
    }
}

.board-composer-note {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: #737373;
    padding: 0 16px 14px;
}

.board-composer-shortcuts {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.board-composer-shortcuts kbd {
    display: flex;
    justify-content: center;
    padding: 4px 6px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #e5e5e5;
    color: #262626;
    font-size: 10px;
    font-weight: 600;
}

.board-composer-info {
    anchor-name: --board-messaging-info;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.board-composer-info svg {
    width: 16px;
    height: 16px;
}

.board-composer-info:hover {
    color: #404040;
}

.board-inbox-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex: 1;
    text-align: center;
    padding: 40px 24px;
}

.board-inbox-empty h2 {
    font-size: 15px;
    font-weight: 500;
}

.board-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    font-size: 12px;
    color: #737373;
}

body:has(.board-post-dialog) {
    overflow: hidden;
}

.board-post-dialog {
    --board-dialog-offset: 24px;
    --board-dialog-spring: cubic-bezier(.2, .85, .25, 1);
    box-sizing: border-box;
    flex-direction: column;
    width: min(660px, calc(100% - 32px));
    max-width: none;
    max-height: 91dvh;
    margin: auto;
    padding: 0;
    color: inherit;
    background: white;
    border: 1px solid #e1e1e1;
    border-radius: 15px;
    box-shadow: 0 25px 90px #00000035;
    overflow: visible;
}

.board-post-dialog[open] {
    display: flex;
}

.board-post-dialog:has(#board-report-form) {
    max-width: 480px;
}

.board-post-dialog:has(#board-report-form) .board-dialog-body {
    overflow: visible;
}

.board-post-dialog .board-dialog-head {
    border-radius: 15px 15px 0 0;
}

.board-post-dialog .board-dialog-footer {
    border-radius: 0 0 15px 15px;
}

.board-post-dialog:has(#board-share-requests) {
    max-width: 640px;
}

.board-post-dialog::backdrop {
    background: #0008;
}

.board-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f3f3f3;
    border-bottom: 1px solid #e1e1e1;
    flex-shrink: 0;
}

.board-dialog-close {
    font-size: 24px;
    line-height: 1;
    padding: 0 3px;
    color: #737373;
}

.board-dialog-close svg {
    width: 24px;
    height: 24px;
}

.board-dialog-body {
    overflow-y: auto;
    padding: 16px;
}

.board-dialog-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 12px 16px;
    border-top: 1px solid #e5e5e5;
    background: #fafafa;
    flex-shrink: 0;
}

.board-dialog-footer .board-muted {
    margin-right: auto;
    font-size: 10px;
}

.board-type-options {
    display: grid;
    gap: 4px;
}

.board-type-option {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 0;
    border-radius: 8px;
    padding: 10px 12px;
    text-align: left;
}

.board-type-option:hover {
    background: #f7f7f7;
}

.board-type-option>span:nth-child(2) {
    flex: 1;
}

.board-type-option strong {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.board-type-option small {
    display: block;
    font-size: 11px;
    color: #737373;
}

.board-type-symbol {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    color: #737373;
    flex-shrink: 0;
    border-radius: 8px;
}

.board-type-symbol svg {
    width: 24px;
    height: 24px;
}

.board-type-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.board-type-arrow svg {
    width: 100%;
    height: 100%;
}

.board-post-dialog [hidden] {
    display: none;
}

.board-post-dialog :is(button, a):focus-visible {
    outline: 2px solid #737373;
    outline-offset: 2px;
}

/* Fields use a single focus border; keep keyboard outlines on action buttons. */
.board-post-dialog :is(.input-field, .select2-selection, .select2-search__field) {
    outline: none !important;
    box-shadow: none !important;
}

.board-post-dialog :is(.input-field:focus, .select2-selection:focus, .select2-selection[aria-expanded="true"], .select2-search__field:focus) {
    border-color: #737373 !important;
}

/* Retain the native top layer until the exit finishes where discrete transitions are supported. */
.board-post-dialog:not([data-motion-fallback]) {
    opacity: 0;
    transform: translateY(var(--board-dialog-offset)) scale(.97);
    transition: opacity 240ms ease, transform 240ms ease-in, display 240ms, overlay 240ms;
    transition-behavior: allow-discrete;
}

.board-post-dialog:not([data-motion-fallback])[open] {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition-duration: 320ms;
    transition-timing-function: var(--board-dialog-spring);
}

.board-post-dialog:not([data-motion-fallback])::backdrop {
    background-color: #0000;
    transition: background-color 240ms ease, display 240ms, overlay 240ms;
    transition-behavior: allow-discrete;
}

.board-post-dialog:not([data-motion-fallback])[open]::backdrop {
    background-color: #0008;
}

@starting-style {
    .board-post-dialog:not([data-motion-fallback])[open] {
        opacity: 0;
        transform: translateY(var(--board-dialog-offset)) scale(.97);
    }

    .board-post-dialog:not([data-motion-fallback])[open]::backdrop {
        background-color: #0000;
    }
}

/* Safari/Firefox fallback keeps the native dialog open while its exit keyframes play. */
.board-post-dialog[data-motion-fallback][open] {
    animation: board-dialog-enter 320ms var(--board-dialog-spring) both;
}

.board-post-dialog[data-motion-fallback][open]::backdrop {
    animation: board-backdrop-enter 240ms ease both;
}

.board-post-dialog[data-motion-fallback].is-closing {
    animation: board-dialog-exit 240ms ease-in both;
    pointer-events: none;
}

.board-post-dialog[data-motion-fallback].is-closing::backdrop {
    animation: board-backdrop-exit 240ms ease both;
}

@keyframes board-dialog-enter {
    from {
        opacity: 0;
        transform: translateY(var(--board-dialog-offset)) scale(.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes board-dialog-exit {
    from {
        opacity: var(--board-exit-opacity, 1);
        transform: var(--board-exit-transform, translateY(0) scale(1));
    }

    to {
        opacity: 0;
        transform: translateY(var(--board-dialog-offset)) scale(.97);
    }
}

@keyframes board-backdrop-enter {
    from {
        background-color: #0000;
    }

    to {
        background-color: #0008;
    }
}

@keyframes board-backdrop-exit {
    from {
        background-color: #0008;
    }

    to {
        background-color: #0000;
    }
}

@media (prefers-reduced-motion: reduce) {

    ::view-transition-group(*),
    ::view-transition-old(*),
    ::view-transition-new(*) {
        animation: none !important;
    }

    .board-post-dialog,
    .board-post-dialog::backdrop {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

@container board-results (max-width: 1039px) {
    .board-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@container board-results (max-width: 679px) {
    .board-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@container board-results (max-width: 799px) {
    .board-post-list-item {
        flex-direction: column;
    }

    .board-post-list-facts {
        flex-basis: auto;
        border-left: 0;
        border-top: 1px solid #f0f0f0;
    }

    .board-post-list-action {
        align-self: flex-end;
        border-left: 0;
        padding: 12px 16px;
    }
}

@media (max-width: 700px) {
    .board-quantity-row {
        width: 100%;
    }

    .board-browse-toolbar > .board-view-choice {
        display: none;
    }

    .board-detail-heading {
        grid-template-columns: minmax(0, 1fr);
        gap: 4px;
    }

    .board-detail-title-row {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 4px 8px;
    }

    .board-detail-title-row > .page-title {
        grid-column: 1;
        grid-row: 1;
    }

    .board-detail-title-row > .board-detail-actions {
        grid-column: 2;
        grid-row: 1;
        align-self: start;
        gap: 4px;
    }

    .board-detail-title-row > .board-detail-status {
        grid-column: 1 / -1;
        grid-row: 2;
    }

    .board-detail-heading > .page-subtitle {
        margin: 0;
    }

    .board-shell {
        padding: 20px 12px 24px;
        padding-bottom: max(24px, env(safe-area-inset-bottom));
        margin-left: 0;
    }

    html[data-board-sidebar-expanded="true"] .board-shell {
        margin-left: 0;
    }

    .board-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .board-heading>div {
        width: 100%;
    }

    .board-sidebar,
    html[data-board-sidebar-expanded="true"] .board-sidebar {
        width: min(240px, 85vw);
        z-index: 40;
        overscroll-behavior: contain;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }

    .board-sidebar-toggle,
    .board-detail-actions .board-button,
    .board-detail-actions .board-social-button {
        min-height: 44px;
    }

    .board-sidebar-toggle {
        width: 44px;
    }

    .board-detail-actions .board-social-button {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .board-detail-actions .board-social-button::before {
        content: none;
    }

    .board-dialog-close {
        min-width: 44px;
        min-height: 44px;
    }

    html:not([data-board-sidebar-expanded="true"]) .board-sidebar {
        transform: translateX(-100%);
        visibility: hidden;
        pointer-events: none;
    }

    html[data-board-sidebar-expanded="true"] .board-sidebar {
        transform: translateX(0);
        visibility: visible;
    }

    @media (prefers-reduced-motion: no-preference) {
        html[data-board-sidebar-ready="true"] .board-sidebar {
            transition: transform 180ms ease-out, visibility 0s linear 180ms;
        }

        html[data-board-sidebar-ready="true"][data-board-sidebar-expanded="true"] .board-sidebar {
            transition-delay: 0s;
        }

        .board-sidebar-backdrop {
            transition: opacity 180ms ease-out, visibility 0s linear 180ms;
        }

        .board-sidebar-backdrop:not([hidden]) {
            transition-delay: 0s;
        }
    }

    .board-sidebar .board-nav-label {
        opacity: 1;
        transform: none;
    }

    .board-sidebar-pin,
    html[data-board-sidebar-expanded="true"] .board-sidebar-pin,
    .board-sidebar-tooltip,
    .board-mobile-brand>a,
    .board-mobile-brand>span[aria-hidden] {
        display: none;
    }

    .board-mobile-toggle {
        display: flex;
    }

    .board-sidebar-backdrop {
        display: block;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }

    .board-sidebar-backdrop:not([hidden]) {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }

    html[data-board-sidebar-expanded="true"]:has(.board-shell) {
        overflow: hidden;
    }

    .board-detail-grid,
    .board-form-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .board-filters>.board-search {
        flex-basis: 100%;
    }

    .board-list-row {
        padding: 16px;
        flex-wrap: wrap;
    }

    .board-list-meta {
        text-align: left;
    }

    .board-message {
        max-width: 95%;
    }

    .board-inbox {
        grid-template-columns: minmax(0, 1fr);
        grid-template-rows: minmax(0, 1fr);
    }

    .board-inbox > .board-threads {
        position: absolute;
        inset: 0 auto 0 0;
        width: min(300px, 85%);
        z-index: 4;
        max-height: none;
        border-bottom: 0;
        transform: translateX(-100%);
        visibility: hidden;
        transition: transform 180ms ease, visibility 0s linear 180ms;
    }

    .board-inbox[data-threads-open="true"] > .board-threads {
        transform: translateX(0);
        visibility: visible;
        transition-delay: 0s;
    }

    .board-threads-toggle,
    .board-threads-close {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 34px;
        height: 34px;
    }

    .board-threads-toggle::after,
    .board-threads-close::after {
        content: '';
        position: absolute;
        inset: -5px;
    }

    .board-threads-toggle {
        position: absolute;
        top: 12px;
        left: 12px;
        z-index: 2;
        width: 34px;
        padding: 0;
        border-radius: 8px;
        background: #404040;
        border-color: #404040;
        color: #fff;
        box-shadow: 0 2px 6px rgb(0 0 0 / 6%);
    }

    .board-threads-toggle:hover {
        background: #262626;
        border-color: #262626;
        color: #fff;
    }

    .board-threads-toggle svg {
        width: 18px;
        height: 18px;
        transform: rotate(180deg);
    }

    .board-conversation-post-dock {
        padding-left: 48px;
    }

    .board-threads-close {
        min-width: 34px;
        padding: 0;
        margin-left: 8px;
        font-size: 20px;
        border: 1px solid #e5e5e5;
        border-radius: 8px;
        background: #fff;
        color: #525252;
    }

    .board-threads-close:hover {
        background: #f5f5f5;
        color: #262626;
    }

    .board-threads-heading {
        padding-right: 0;
    }

    .board-threads-heading > .board-tab-count {
        margin-left: auto;
    }

    .board-threads-backdrop {
        display: block;
        position: absolute;
        inset: 0;
        z-index: 3;
        background: rgb(0 0 0 / 25%);
        opacity: 0;
        visibility: hidden;
        transition: opacity 180ms ease, visibility 0s linear 180ms;
    }

    .board-inbox[data-threads-open="true"] > .board-threads-backdrop {
        opacity: 1;
        visibility: visible;
        transition-delay: 0s;
    }

    @media (prefers-reduced-motion: reduce) {
        .board-inbox > .board-threads,
        .board-threads-backdrop {
            transition: none;
        }
    }

    .board-message-list {
        padding-left: 16px;
        padding-right: 16px;
    }

    .board-post-dialog {
        --board-dialog-offset: 48px;
        width: 100%;
        max-height: 95dvh;
        margin: auto 0 0;
        border-radius: 15px 15px 0 0;
    }

    .board-post-dialog .board-dialog-footer {
        border-radius: 0;
    }
}
