/**
 * FCA Boards Styles
 *
 * Uses Fluent Community CSS variables for seamless integration
 * and automatic dark mode support.
 */

/* ==========================================================================
   Layout & Container
   ========================================================================== */

.fca-boards {
    width: 100%;
    min-height: 100%;
    padding: 0;
    background: var(--fcom-secondary-bg, #F0F2F5);
    overflow-x: hidden;
    /* Prevent horizontal scrolling */
    max-width: 100%;
    box-sizing: border-box;
}

.fca-boards-container {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    /* Prevent horizontal page scroll */
    padding-bottom: 24px;
    box-sizing: border-box;
}

.fca-boards-columns {
    display: flex;
    gap: 16px;
    min-width: min-content;
}

/* ==========================================================================
   Header
   ========================================================================== */

/* Header now uses native Fluent Community classes (fhr_content_layout_header, fhr_page_title, fhr_page_actions) */
/* Only component-specific styles remain below */

/* Remove padding from header to make it flush with top */
.fca-boards .fhr_content_layout_header {
    padding: 0;
    margin: 0;
}

/* Add padding to content areas */
.fca-boards-description-wrapper {
    margin-bottom: 24px;
    padding: 16px 24px 0;
}

/* Add padding to main content sections */
.fca-boards-container,
.fca-boards-list-view,
.fca-boards-directory>*:not(.fhr_content_layout_header) {
    padding-left: 24px;
    padding-right: 24px;
}

.fca-boards-container {
    padding-top: 24px;
    padding-bottom: 24px;
}

.fca-boards-list-view {
    margin-top: 24px;
}

/* Board directory content padding */
.fca-boards-directory {
    width: 100%;
    min-height: 100%;
    padding: 0;
    background: var(--fcom-secondary-bg, #F0F2F5);
}

.fca-boards-directory>*:not(.fhr_content_layout_header) {
    padding-left: 24px;
    padding-right: 24px;
}

.fca-boards-grid {
    padding: 24px;
}

.fca-boards-description {
    font-size: 14px;
    color: var(--fcom-secondary-text, #65676B);
    margin: 0;
}

/* ==========================================================================
   Columns
   ========================================================================== */

.fca-boards-column {
    width: 320px;
    min-width: 320px;
    background: var(--fcom-primary-bg, #FFFFFF);
    border-radius: 12px;
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
}

.fca-boards-column-header {
    padding: 16px;
    border-bottom: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-left: 4px solid transparent;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.fca-boards-column-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fcom-primary-text, #1C1E21);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fca-boards-column-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fca-boards-column-count {
    font-size: 12px;
    font-weight: 600;
    color: var(--fcom-secondary-text, #65676B);
    background: var(--fcom-secondary-bg, #F0F2F5);
    padding: 2px 8px;
    border-radius: 10px;
}

.fca-boards-column-items {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 100px;
}

.fca-boards-column-empty {
    padding: 24px;
    text-align: center;
    color: var(--fcom-secondary-text, #65676B);
    font-size: 14px;
}

/* ==========================================================================
   Cards
   ========================================================================== */

.fca-boards-card {
    background: var(--fcom-primary-bg, #FFFFFF);
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.fca-boards-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.fca-boards-card-ghost {
    opacity: 0.5;
    background: var(--fcom-highlight-bg, #E7F3FF);
}

.fca-boards-card-drag {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    transform: rotate(2deg);
}

.fca-boards-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fcom-primary-text, #1C1E21);
    margin: 0 0 8px 0;
    line-height: 1.4;
}

.fca-boards-card-excerpt {
    font-size: 13px;
    color: var(--fcom-secondary-text, #65676B);
    margin: 0 0 12px 0;
    line-height: 1.5;
}

.fca-boards-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.fca-boards-card-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex-wrap: wrap;
}

.fca-boards-card-avatar {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fca-boards-card-author {
    font-size: 12px;
    color: var(--fcom-secondary-text, #65676B);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fca-boards-card-meta-tag {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    color: var(--fcom-secondary-text, #65676B);
    background: var(--fcom-secondary-bg, #F0F2F5);
    padding: 3px 8px;
    border-radius: 12px;
    border-left: 3px solid transparent;
    white-space: nowrap;
}

.fca-boards-card-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.fca-boards-card-vote {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border: none;
    background: var(--fcom-secondary-bg, #F0F2F5);
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    color: var(--fcom-secondary-text, #65676B);
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fca-boards-card-vote:hover {
    background: var(--fcom-highlight-bg, #E7F3FF);
    color: var(--fcom-text-link, #216FDB);
}

.fca-boards-card-vote.is-voted {
    background: var(--fcom-highlight-bg, #E7F3FF);
    color: var(--fcom-text-link, #216FDB);
}

.fca-boards-card-vote.is-voted svg {
    fill: currentColor;
}

.fca-boards-card-comments {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--fcom-secondary-text, #65676B);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.fca-boards-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 16px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, opacity 0.2s ease;
}

.fca-boards-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fca-boards-btn-primary {
    background: var(--fcom-primary-button, #1877F2);
    color: var(--fcom-primary-button-text, #FFFFFF);
}

.fca-boards-btn-primary:hover:not(:disabled) {
    background: var(--fcom-primary-button-hover, #166FE5);
}

.fca-boards-btn-secondary {
    background: var(--fcom-secondary-bg, #F0F2F5);
    color: var(--fcom-primary-text, #1C1E21);
}

.fca-boards-btn-secondary:hover:not(:disabled) {
    background: var(--fcom-secondary-bg-hover, #E4E6EB);
}

.fca-boards-btn-danger {
    background: #DC3545;
    color: #FFFFFF;
}

.fca-boards-btn-danger:hover:not(:disabled) {
    background: #C82333;
}

.fca-boards-btn-vote {
    background: var(--fcom-secondary-bg, #F0F2F5);
    color: var(--fcom-secondary-text, #65676B);
}

.fca-boards-btn-vote:hover:not(:disabled) {
    background: var(--fcom-highlight-bg, #E7F3FF);
    color: var(--fcom-text-link, #216FDB);
}

.fca-boards-btn-vote.is-voted {
    background: var(--fcom-highlight-bg, #E7F3FF);
    color: var(--fcom-text-link, #216FDB);
}

/* ==========================================================================
   Modal
   ========================================================================== */

.fca-boards-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
}

.fca-boards-modal {
    background: var(--fcom-primary-bg, #FFFFFF);
    border-radius: 12px;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 48px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.fca-boards-modal-small {
    max-width: 480px;
}

.fca-boards-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid var(--fcom-primary-border, #E4E6EB);
}

.fca-boards-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--fcom-primary-text, #1C1E21);
    margin: 0;
    flex: 1;
}

.fca-boards-modal-title-input {
    font-size: 18px;
    font-weight: 600;
    color: var(--fcom-primary-text, #1C1E21);
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 6px;
    padding: 8px 12px;
    width: 100%;
    margin-right: 16px;
    background: var(--fcom-primary-bg, #FFFFFF);
}

.fca-boards-modal-close {
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--fcom-secondary-text, #65676B);
    cursor: pointer;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

.fca-boards-modal-close:hover {
    background: var(--fcom-secondary-bg, #F0F2F5);
}

.fca-boards-modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

.fca-boards-modal-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.fca-boards-modal-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.fca-boards-modal-author img {
    width: 24px;
    height: 24px;
    border-radius: 50%;
}

.fca-boards-modal-author span {
    font-size: 14px;
    font-weight: 500;
    color: var(--fcom-primary-text, #1C1E21);
}

.fca-boards-modal-date {
    font-size: 13px;
    color: var(--fcom-secondary-text, #65676B);
}

.fca-boards-modal-description {
    margin-bottom: 24px;
}

.fca-boards-modal-description p {
    font-size: 14px;
    line-height: 1.6;
    color: var(--fcom-primary-text, #1C1E21);
    white-space: pre-wrap;
    margin: 0;
}

.fca-boards-modal-no-description {
    color: var(--fcom-secondary-text, #65676B);
    font-style: italic;
}

.fca-boards-modal-description-input {
    width: 100%;
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.6;
    color: var(--fcom-primary-text, #1C1E21);
    background: var(--fcom-primary-bg, #FFFFFF);
    resize: vertical;
    margin-bottom: 16px;
}

.fca-boards-modal-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--fcom-primary-border, #E4E6EB);
    margin-bottom: 24px;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.fca-boards-modal-comments h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--fcom-primary-text, #1C1E21);
    margin: 0 0 16px 0;
}

.fca-boards-comment-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.fca-boards-comment-form textarea {
    width: 100%;
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 6px;
    padding: 12px;
    font-size: 14px;
    line-height: 1.5;
    color: var(--fcom-primary-text, #1C1E21);
    background: var(--fcom-primary-bg, #FFFFFF);
    resize: vertical;
}

.fca-boards-comment-form button {
    align-self: flex-end;
}

.fca-boards-comments-loading,
.fca-boards-comments-empty {
    font-size: 14px;
    color: var(--fcom-secondary-text, #65676B);
    text-align: center;
    padding: 24px;
}

.fca-boards-comments-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.fca-boards-comment {
    display: flex;
    gap: 12px;
}

.fca-boards-comment-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    flex-shrink: 0;
}

.fca-boards-comment-content {
    flex: 1;
    min-width: 0;
}

.fca-boards-comment-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.fca-boards-comment-author {
    font-size: 14px;
    font-weight: 500;
    color: var(--fcom-primary-text, #1C1E21);
}

.fca-boards-comment-date {
    font-size: 12px;
    color: var(--fcom-secondary-text, #65676B);
}

.fca-boards-comment-content p {
    font-size: 14px;
    line-height: 1.5;
    color: var(--fcom-primary-text, #1C1E21);
    margin: 0 0 4px 0;
    white-space: pre-wrap;
}

.fca-boards-comment-delete {
    padding: 0;
    border: none;
    background: transparent;
    font-size: 12px;
    color: var(--fcom-secondary-text, #65676B);
    cursor: pointer;
    transition: color 0.2s ease;
}

.fca-boards-comment-delete:hover {
    color: #DC3545;
}

/* ==========================================================================
   Form
   ========================================================================== */

.fca-boards-form-group {
    margin-bottom: 16px;
}

.fca-boards-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--fcom-primary-text, #1C1E21);
    margin-bottom: 6px;
}

.fca-boards-form-group input,
.fca-boards-form-group textarea {
    width: 100%;
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 6px;
    padding: 10px 12px;
    font-size: 14px;
    color: var(--fcom-primary-text, #1C1E21);
    background: var(--fcom-primary-bg, #FFFFFF);
    transition: border-color 0.2s ease;
}

.fca-boards-form-group input:focus,
.fca-boards-form-group textarea:focus {
    outline: none;
    border-color: var(--fcom-text-link, #216FDB);
}

.fca-boards-form-group textarea {
    resize: vertical;
    line-height: 1.5;
}

.fca-boards-form-error {
    background: #FEE2E2;
    color: #DC2626;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 16px;
}

.fca-boards-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    padding-top: 16px;
    border-top: 1px solid var(--fcom-primary-border, #E4E6EB);
}

/* ==========================================================================
   Loading & Empty States
   ========================================================================== */

.fca-boards-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    color: var(--fcom-secondary-text, #65676B);
}

.fca-boards-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--fcom-secondary-bg, #F0F2F5);
    border-top-color: var(--fcom-text-link, #216FDB);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

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

.fca-boards-error,
.fca-boards-empty {
    text-align: center;
    padding: 48px;
    color: var(--fcom-secondary-text, #65676B);
}

.fca-boards-error p,
.fca-boards-empty p {
    margin: 0 0 16px 0;
}

/* ==========================================================================
   View Toggle
   ========================================================================== */

.fca-boards-view-toggle {
    display: flex;
    gap: 4px;
    background: var(--fcom-secondary-bg, #F0F2F5);
    border-radius: 8px;
    padding: 4px;
}

.fca-boards-view-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    color: var(--fcom-secondary-text, #65676B);
    transition: all 0.2s ease;
}

.fca-boards-view-btn:hover {
    color: var(--fcom-primary-text, #1C1E21);
}

.fca-boards-view-btn.is-active {
    background: var(--fcom-primary-bg, #FFFFFF);
    color: var(--fcom-text-link, #216FDB);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Status Badge (Modal)
   ========================================================================== */

.fca-boards-modal-status {
    margin-bottom: 16px;
}

.fca-boards-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    border: 1px solid;
}

.fca-boards-status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

/* ==========================================================================
   Column Selector (Modal)
   ========================================================================== */

.fca-boards-modal-column-select {
    margin-bottom: 20px;
}

.fca-boards-modal-column-select label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--fcom-primary-text, #1C1E21);
    margin-bottom: 10px;
}

.fca-boards-column-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fca-boards-column-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border: 2px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 8px;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: var(--fcom-primary-text, #1C1E21);
    transition: all 0.2s ease;
}

.fca-boards-column-option:hover {
    border-color: var(--column-color);
    background: color-mix(in srgb, var(--column-color) 10%, transparent);
}

.fca-boards-column-option.is-selected {
    border-color: var(--column-color);
}

.fca-boards-column-option .fca-boards-column-dot {
    width: 10px;
    height: 10px;
}

/* ==========================================================================
   List View
   ========================================================================== */

.fca-boards-list-view {
    background: var(--fcom-primary-bg, #FFFFFF);
    border-radius: 12px;
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    /* Prevent horizontal overflow */
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Tabs */
.fca-boards-tabs {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 16px;
    border-bottom: 1px solid var(--fcom-primary-border, #E4E6EB);
    gap: 16px;
    flex-wrap: wrap;
    min-width: 0;
    /* Allow flex children to shrink */
}

.fca-boards-tabs-list {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
    flex: 1;
    min-width: 0;
    /* Allow flex item to shrink below content size */
    -webkit-overflow-scrolling: touch;
    /* Smooth scrolling on iOS */
}

.fca-boards-tabs-list::-webkit-scrollbar {
    display: none;
}

.fca-boards-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--fcom-secondary-text, #65676B);
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    transition: all 0.2s ease;
    margin-bottom: -1px;
}

.fca-boards-tab:hover {
    color: var(--fcom-primary-text, #1C1E21);
}

.fca-boards-tab.is-active {
    color: var(--fcom-primary-text, #1C1E21);
    border-bottom-color: var(--fcom-text-link, #216FDB);
}

.fca-boards-tab-count {
    font-size: 12px;
    font-weight: 600;
    background: var(--fcom-secondary-bg, #F0F2F5);
    padding: 2px 8px;
    border-radius: 10px;
}

.fca-boards-tab.is-active .fca-boards-tab-count {
    background: var(--fcom-highlight-bg, #E7F3FF);
}

.fca-boards-submit-btn {
    flex-shrink: 0;
    margin: 10px 0;
}

.fca-boards-submit-btn span {
    display: none;
}

@media (min-width: 640px) {
    .fca-boards-submit-btn span {
        display: inline;
    }
}

/* Search & Sort Controls */
.fca-boards-list-controls {
    display: flex;
    gap: 12px;
    padding: 16px;
    background: var(--fcom-secondary-bg, #F0F2F5);
    border-bottom: 1px solid var(--fcom-primary-border, #E4E6EB);
    flex-wrap: wrap;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.fca-boards-search-wrapper {
    flex: 1;
    min-width: 0;
    /* Allow to shrink on mobile */
    position: relative;
}

.fca-boards-search-wrapper svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--fcom-secondary-text, #65676B);
    pointer-events: none;
}

.fca-boards-search-input {
    width: 100%;
    padding: 10px 12px 10px 42px;
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 8px;
    font-size: 14px;
    color: var(--fcom-primary-text, #1C1E21);
    background: var(--fcom-primary-bg, #FFFFFF);
    transition: border-color 0.2s ease;
}

.fca-boards-search-input::placeholder {
    color: var(--fcom-secondary-text, #65676B);
}

.fca-boards-search-input:focus {
    outline: none;
    border-color: var(--fcom-text-link, #216FDB);
}

.fca-boards-sort-wrapper {
    flex-shrink: 0;
}

.fca-boards-sort-select {
    padding: 10px 36px 10px 14px;
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 8px;
    font-size: 14px;
    color: var(--fcom-primary-text, #1C1E21);
    background: var(--fcom-primary-bg, #FFFFFF);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2365676B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.fca-boards-sort-select:focus {
    outline: none;
    border-color: var(--fcom-text-link, #216FDB);
}

/* List Items */
.fca-boards-list-items {
    min-height: 200px;
}

.fca-boards-list-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px 24px;
    border-bottom: 1px solid var(--fcom-primary-border, #E4E6EB);
    cursor: pointer;
    transition: background-color 0.2s ease;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    /* Prevent content from causing horizontal scroll */
}

.fca-boards-list-item:hover {
    background: var(--fcom-secondary-bg, #F0F2F5);
}

.fca-boards-list-item:last-child {
    border-bottom: none;
}

.fca-boards-list-item-avatar {
    flex-shrink: 0;
}

.fca-boards-list-item-avatar img {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
}

.fca-boards-list-item-avatar-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--fcom-secondary-bg, #F0F2F5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    color: var(--fcom-secondary-text, #65676B);
}

.fca-boards-list-item-content {
    flex: 1;
    min-width: 0;
}

.fca-boards-list-item-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--fcom-primary-text, #1C1E21);
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.fca-boards-list-item-desc {
    font-size: 14px;
    color: var(--fcom-secondary-text, #65676B);
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fca-boards-list-item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.fca-boards-list-item-meta-tag {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--fcom-secondary-text, #65676B);
    background: var(--fcom-secondary-bg, #F0F2F5);
    padding: 4px 10px;
    border-radius: 20px;
    border-left: 3px solid transparent;
}

.fca-boards-list-item-meta-tag svg {
    flex-shrink: 0;
}

/* Vote Button (List View) */
.fca-boards-list-item-vote {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
    min-width: 60px;
}

.fca-boards-vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 2px solid var(--fcom-primary-border, #E4E6EB);
    background: var(--fcom-primary-bg, #FFFFFF);
    border-radius: 8px;
    cursor: pointer;
    color: var(--fcom-secondary-text, #65676B);
    transition: all 0.2s ease;
}

.fca-boards-vote-btn:hover {
    border-color: var(--fcom-text-link, #216FDB);
    color: var(--fcom-text-link, #216FDB);
    background: var(--fcom-highlight-bg, #E7F3FF);
}

.fca-boards-vote-btn.is-voted {
    border-color: var(--fcom-text-link, #216FDB);
    color: var(--fcom-primary-bg, #FFFFFF);
    background: var(--fcom-text-link, #216FDB);
}

.fca-boards-vote-count {
    font-size: 16px;
    font-weight: 700;
    color: var(--fcom-primary-text, #1C1E21);
}

/* List Empty State */
.fca-boards-list-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    color: var(--fcom-secondary-text, #65676B);
}

.fca-boards-list-empty svg {
    margin-bottom: 16px;
    opacity: 0.5;
}

.fca-boards-list-empty p {
    margin: 0;
    font-size: 15px;
}

/* List Transition Animation */
.fca-boards-list-move,
.fca-boards-list-enter-active,
.fca-boards-list-leave-active {
    transition: all 0.3s ease;
}

.fca-boards-list-enter-from,
.fca-boards-list-leave-to {
    opacity: 0;
    transform: translateX(-20px);
}

.fca-boards-list-leave-active {
    position: absolute;
}

/* ==========================================================================
   Breadcrumb Navigation
   ========================================================================== */

.fca-boards-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 8px;
}

.fca-boards-breadcrumb-link {
    color: var(--fcom-accent, #1877F2);
    text-decoration: none;
    transition: opacity 0.2s;
}

.fca-boards-breadcrumb-link:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.fca-boards-breadcrumb-sep {
    color: var(--fcom-secondary-text, #65676B);
}

.fca-boards-breadcrumb-current {
    color: var(--fcom-secondary-text, #65676B);
}

/* ==========================================================================
   Vote Animations
   ========================================================================== */

.fca-boards-vote-count {
    display: inline-block;
    transition: transform 0.15s ease, color 0.15s ease;
}

.fca-boards-vote-count.is-animating {
    animation: vote-bump 0.3s ease;
}

@keyframes vote-bump {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.35);
        color: var(--fcom-accent, #1877F2);
    }

    100% {
        transform: scale(1);
    }
}

/* Card vote animation */
.fca-boards-card-votes {
    transition: transform 0.15s ease;
}

.fca-boards-card-votes.is-animating {
    animation: vote-bump 0.3s ease;
}

/* List item vote animation */
.fca-boards-list-item-vote-count.is-animating {
    animation: vote-bump 0.3s ease;
}

/* ==========================================================================
   Category & Tag Badges
   ========================================================================== */

/* Taxonomy (Category & Tags) */
.fca-boards-card-taxonomy,
.fca-boards-list-item-taxonomy {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.fca-boards-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    border: 1px solid transparent;
    transition: opacity 0.2s ease;
}

.fca-boards-category-badge:hover {
    opacity: 0.8;
}

.fca-boards-tag-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 500;
    border-radius: 9999px;
    border: 1px solid transparent;
    transition: opacity 0.2s ease;
}

.fca-boards-tag-badge:hover {
    opacity: 0.8;
}

/* Tags on cards */
.fca-boards-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 8px;
}

.fca-boards-card-tag {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 9999px;
}

/* Tags in list view */
.fca-boards-list-item-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

/* ==========================================================================
   Filter Bar
   ========================================================================== */

.fca-boards-filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    padding: 15px 20px;
    background: var(--fcom-primary-bg, #FFFFFF);
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 8px;
    margin-bottom: 20px;
}

.fca-boards-filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fca-boards-filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fcom-secondary-text, #65676B);
    white-space: nowrap;
}

.fca-boards-tag-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.fca-boards-tag-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 500;
    border: 2px solid;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: transparent;
}

.fca-boards-tag-chip:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.fca-boards-tag-chip.is-active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   Board Directory
   ========================================================================== */

/* Directory styles moved up - this duplicate removed */

/* Directory header now uses native Fluent Community classes */
/* Only component-specific styles remain below */

.fhr_page_actions .fca-boards-search-input {
    min-width: 240px;
    padding: 10px 14px;
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 8px;
    font-size: 14px;
    color: var(--fcom-primary-text, #1C1E21);
    background: var(--fcom-primary-bg, #FFFFFF);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fhr_page_actions .fca-boards-search-input:focus {
    outline: none;
    border-color: var(--fcom-text-link, #216FDB);
    box-shadow: 0 0 0 3px rgba(33, 111, 219, 0.1);
}

.fhr_page_actions .fca-boards-search-input::placeholder {
    color: var(--fcom-secondary-text, #65676B);
}

/* ==========================================================================
   Board Grid
   ========================================================================== */

.fca-boards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.fca-boards-board-card {
    position: relative;
    background: var(--fcom-primary-bg, #FFFFFF);
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 12px;
    padding: 24px;
    cursor: pointer;
    transition: all 0.25s ease;
    overflow: hidden;
}

.fca-boards-board-card:hover {
    border-color: var(--fcom-text-link, #216FDB);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

.fca-boards-board-card.is-default {
    border-color: var(--fcom-text-link, #216FDB);
    border-width: 2px;
}

.fca-boards-default-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: linear-gradient(135deg, var(--fcom-text-link, #216FDB), #1854B4);
    color: #FFFFFF;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(33, 111, 219, 0.3);
}

.fca-boards-board-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--fcom-primary-text, #1C1E21);
    margin: 0 0 10px 0;
    padding-right: 70px;
    /* Space for badge */
    line-height: 1.3;
}

.fca-boards-board-card-description {
    font-size: 14px;
    color: var(--fcom-secondary-text, #65676B);
    margin: 0 0 18px 0;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.fca-boards-board-card-stats {
    display: flex;
    gap: 24px;
    margin-bottom: 18px;
}

.fca-boards-board-card-stat {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--fcom-secondary-text, #65676B);
}

.fca-boards-board-card-stat svg {
    color: var(--fcom-text-link, #216FDB);
}

/* Progress Bar */
.fca-boards-board-card-progress {
    display: flex;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background: var(--fcom-secondary-bg, #F0F2F5);
    margin-top: auto;
}

.fca-boards-board-card-progress-segment {
    transition: flex 0.3s ease;
    min-width: 4px;
}

.fca-boards-board-card-progress-segment:first-child {
    border-radius: 3px 0 0 3px;
}

.fca-boards-board-card-progress-segment:last-child {
    border-radius: 0 3px 3px 0;
}

/* Visibility Badge */
.fca-boards-visibility-badge {
    position: absolute;
    bottom: 16px;
    right: 16px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 6px;
}

.fca-boards-visibility-badge--members {
    background: #FEF3C7;
    color: #92400E;
}

.fca-boards-visibility-badge--private {
    background: #FEE2E2;
    color: #991B1B;
}

/* ==========================================================================
   Directory Empty State
   ========================================================================== */

.fca-boards-empty-icon {
    color: var(--fcom-secondary-text, #65676B);
    opacity: 0.5;
    margin-bottom: 20px;
}

.fca-boards-empty h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--fcom-primary-text, #1C1E21);
    margin: 0 0 8px 0;
}

.fca-boards-empty p {
    font-size: 14px;
    color: var(--fcom-secondary-text, #65676B);
    margin: 0 0 20px 0;
}

/* ==========================================================================
   Directory Modal Form Styles
   ========================================================================== */

.fca-boards-modal-field {
    margin-bottom: 20px;
}

.fca-boards-modal-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--fcom-primary-text, #1C1E21);
    margin-bottom: 8px;
}

.fca-boards-input,
.fca-boards-textarea,
.fca-boards-select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 8px;
    font-size: 14px;
    color: var(--fcom-primary-text, #1C1E21);
    background: var(--fcom-primary-bg, #FFFFFF);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fca-boards-input:focus,
.fca-boards-textarea:focus,
.fca-boards-select:focus {
    outline: none;
    border-color: var(--fcom-text-link, #216FDB);
    box-shadow: 0 0 0 3px rgba(33, 111, 219, 0.1);
}

.fca-boards-input::placeholder,
.fca-boards-textarea::placeholder {
    color: var(--fcom-secondary-text, #65676B);
}

.fca-boards-textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.5;
}

.fca-boards-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2365676B' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 40px;
}

.fca-boards-field-hint {
    display: block;
    font-size: 12px;
    color: var(--fcom-secondary-text, #65676B);
    margin-top: 6px;
}

.fca-boards-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--fcom-primary-text, #1C1E21);
    cursor: pointer;
}

.fca-boards-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--fcom-text-link, #216FDB);
}

.fca-boards-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 24px;
    border-top: 1px solid var(--fcom-primary-border, #E4E6EB);
    background: var(--fcom-secondary-bg, #F0F2F5);
    border-radius: 0 0 12px 12px;
}

.fca-boards-btn-text {
    background: transparent;
    color: var(--fcom-secondary-text, #65676B);
    padding: 8px 16px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.fca-boards-btn-text:hover {
    color: var(--fcom-primary-text, #1C1E21);
}

/* ==========================================================================
   Toast Notifications
   ========================================================================== */

.fca-boards-toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    max-width: 400px;
    pointer-events: none;
}

.fca-boards-toast {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    background: var(--fcom-primary-bg, #FFFFFF);
    border: 1px solid var(--fcom-primary-border, #E4E6EB);
    border-radius: 10px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
    pointer-events: auto;
    overflow: hidden;
}

/* Toast Type Variants */
.fca-boards-toast--success {
    border-left-color: #10B981;
}

.fca-boards-toast--error {
    border-left-color: #EF4444;
}

.fca-boards-toast--warning {
    border-left-color: #F59E0B;
}

.fca-boards-toast--info {
    border-left-color: var(--fcom-text-link, #216FDB);
}

.fca-boards-toast-icon {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fca-boards-toast--success .fca-boards-toast-icon {
    color: #10B981;
}

.fca-boards-toast--error .fca-boards-toast-icon {
    color: #EF4444;
}

.fca-boards-toast--warning .fca-boards-toast-icon {
    color: #F59E0B;
}

.fca-boards-toast--info .fca-boards-toast-icon {
    color: var(--fcom-text-link, #216FDB);
}

.fca-boards-toast-content {
    flex: 1;
    min-width: 0;
}

.fca-boards-toast-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--fcom-primary-text, #1C1E21);
    margin: 0 0 4px 0;
}

.fca-boards-toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--fcom-primary-text, #1C1E21);
    margin: 0;
}

.fca-boards-toast-close {
    flex-shrink: 0;
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: var(--fcom-secondary-text, #65676B);
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s ease, background-color 0.2s ease;
}

.fca-boards-toast-close:hover {
    opacity: 1;
    background: var(--fcom-secondary-bg, #F0F2F5);
}

/* Progress bar for auto-dismiss */
.fca-boards-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: currentColor;
    opacity: 0.3;
    animation: toast-progress linear forwards;
    width: 100%;
    transform-origin: left;
}

@keyframes toast-progress {
    from {
        transform: scaleX(1);
    }

    to {
        transform: scaleX(0);
    }
}

.fca-boards-toast--success .fca-boards-toast-progress {
    background: #10B981;
}

.fca-boards-toast--error .fca-boards-toast-progress {
    background: #EF4444;
}

.fca-boards-toast--warning .fca-boards-toast-progress {
    background: #F59E0B;
}

.fca-boards-toast--info .fca-boards-toast-progress {
    background: var(--fcom-text-link, #216FDB);
}

/* Toast Transition Animations */
.toast-enter-active {
    animation: toast-in 0.3s ease-out;
}

.toast-leave-active {
    animation: toast-out 0.3s ease-in;
}

.toast-move {
    transition: transform 0.3s ease;
}

@keyframes toast-in {
    from {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }

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

@keyframes toast-out {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(100%) scale(0.9);
    }
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .fca-boards {
        padding: 0;
    }

    /* Header now uses native Fluent Community responsive styles */

    .fca-boards-container,
    .fca-boards-list-view,
    .fca-boards-directory>*:not(.fhr_content_layout_header) {
        padding-left: 16px;
        padding-right: 16px;
    }

    .fca-boards-container {
        padding-top: 16px;
        padding-bottom: 16px;
    }

    .fca-boards-list-view {
        margin: 16px;
    }

    .fca-boards-description-wrapper {
        padding: 16px 16px 0;
    }

    .fca-boards-grid {
        padding: 16px;
    }

    .fca-boards-column {
        width: 280px;
        min-width: 280px;
    }

    .fca-boards-modal {
        margin: 0;
        max-height: 100vh;
        border-radius: 0;
    }

    .fca-boards-modal-overlay {
        padding: 0;
    }

    /* List view responsive */
    .fca-boards-list-item {
        flex-wrap: wrap;
        padding: 16px;
    }

    .fca-boards-list-item-avatar {
        order: 1;
    }

    .fca-boards-list-item-content {
        order: 3;
        width: 100%;
        margin-top: 12px;
    }

    .fca-boards-list-item-vote {
        order: 2;
        flex-direction: row;
        gap: 8px;
        margin-left: auto;
    }

    .fca-boards-list-controls {
        flex-direction: column;
    }

    .fca-boards-search-wrapper {
        min-width: 100%;
    }

    .fca-boards-sort-wrapper {
        width: 100%;
    }

    .fca-boards-sort-select {
        width: 100%;
    }

    .fca-boards-tabs {
        flex-direction: column;
        align-items: stretch;
        padding: 0;
        gap: 0;
        overflow: hidden;
        /* Prevent overflow */
    }

    .fca-boards-tabs-list {
        padding: 0 16px;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        box-sizing: border-box;
    }

    .fca-boards-submit-btn {
        margin: 0 16px 16px;
        width: calc(100% - 32px);
        justify-content: center;
    }

    .fca-boards-submit-btn span {
        display: inline;
    }

    /* Board Directory responsive */
    .fca-boards-directory {
        padding: 16px;
    }

    /* Directory header now uses native Fluent Community responsive styles */

    .fhr_page_actions .fca-boards-search-input {
        width: 100%;
        min-width: unset;
    }

    .fca-boards-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .fca-boards-board-card {
        padding: 20px;
    }

    .fca-boards-board-card-title {
        padding-right: 0;
        margin-bottom: 6px;
    }

    .fca-boards-default-badge {
        position: static;
        display: inline-block;
        margin-bottom: 10px;
    }

    .fca-boards-board-card-stats {
        flex-wrap: wrap;
        gap: 16px;
    }

    /* Toast responsive */
    .fca-boards-toast-container {
        bottom: 16px;
        right: 16px;
        left: 16px;
        max-width: none;
    }
}