/* assets/css/fff-danse-frontend.css */

.fff-danse-single {
    max-width: 1200px;
    margin: 0 auto 3rem;
    padding: 1.5rem 1rem 3rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #222;
}

.fff-danse-player {
    margin-bottom: 2.5rem;
    position: relative; /* For absolute positioning af desktop selector */
}

/* Topnavigation: Intro / Se / Lær / Dans */

.fff-danse-video-nav {
    display: flex;
    gap: 0.75rem;
    margin-top: 20px;
    margin-bottom: 0.75rem;
    flex-wrap: wrap;
}

.fff-danse-mode-btn {
    border: 1px solid #d0d0d0;
    background: #fafafa;
    padding: 0.5rem 1.2rem;
    border-radius: 999px; /* Rounded pill */
    font-size: 0.9rem;
    font-weight: 400; /* Normal weight by default */
    cursor: pointer;
    color: #333;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, font-weight 0.2s ease;
}

.fff-danse-mode-btn:hover {
    background: #f0f0f0;
    border-color: #b0b0b0;
}

.fff-danse-mode-btn.is-active {
    background: #e8f0f5; /* Subtle background */
    border-color: #273c4c;
    color: #273c4c;
    font-weight: 700; /* Bold */
}

/* Chat Button */
.fff-danse-chat-btn {
    border: 1px solid #d0d0d0;
    background: #fafafa;
    padding: 0.5rem 1.2rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    color: #333;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, font-weight 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fff-danse-chat-btn:hover {
    background: #f0f0f0;
    border-color: #b0b0b0;
}

.fff-danse-chat-btn .chat-icon {
    font-size: 1.1rem;
}

.fff-danse-chat-btn .chat-label {
    font-size: 0.9rem;
}

/* Vinkel-navigation (ikoner) */

.fff-danse-angle-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 8px;
    margin-bottom: 0.75rem;
    min-height: 2rem;
    position: relative; /* For absolute positioning af desktop selector */
}

.fff-danse-angle-nav.is-empty {
    display: none;
}

/* FIX: Sikre at selectors vises når de er oprettet */
.fff-danse-angle-nav:not(.is-empty) .fff-danse-angle-selector-mobile {
    display: flex !important;
}

/* FJERN gamle .fff-danse-angle-btn styles - de matcher ikke de nye klasser */
/* .fff-danse-angle-btn styles er fjernet - bruger kun desktop/mobile klasser */

/* Video Angle Selector - Desktop (til højre for video) */
.fff-danse-angle-selector-desktop {
    display: none;
}

/* Video Angle Selector - Mobile (under video) */
.fff-danse-angle-selector-mobile {
    display: flex !important;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 0.75rem;
    flex-wrap: wrap;
    width: 100%;
    opacity: 1 !important;
    visibility: visible !important;
}

@media (min-width: 768px) {
    /* Desktop selector skal være relativt til .fff-danse-video-frame */
    .fff-danse-video-frame .fff-danse-angle-selector-desktop,
    .fff-danse-player .fff-danse-angle-selector-desktop {
        display: flex !important;
        flex-direction: column;
        gap: 0.5rem;
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
    }
    
    .fff-danse-angle-selector-mobile {
        display: none !important;
    }
}

/* NYT: Understøt nye knap-klasser */
.fff-danse-angle-btn-desktop,
.fff-danse-angle-btn-mobile {
    width: 2rem !important;
    height: 2rem !important;
    min-width: 2rem !important;
    min-height: 2rem !important;
    border-radius: 50%;
    border: 1px solid #d0d0d0;
    background: #fff;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.15s ease, transform 0.15s ease;
    position: relative;
    padding: 0;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.fff-danse-angle-btn-desktop:hover,
.fff-danse-angle-btn-mobile:hover {
    background: #f5f5f5;
}

.fff-danse-angle-btn-desktop.is-active,
.fff-danse-angle-btn-mobile.is-active {
    background: #273c4c;
    border-color: #273c4c;
    color: #fff;
    transform: translateY(-1px);
}

/* Angle icon line visibility */
.fff-danse-angle-btn-desktop svg line,
.fff-danse-angle-btn-mobile svg line {
    stroke: #222 !important;
    stroke-width: 3 !important;
    stroke-linecap: round !important;
}

/* Active angle state */
.fff-danse-angle-btn-desktop.is-active svg line,
.fff-danse-angle-btn-mobile.is-active svg line {
    stroke: #000 !important;
    stroke-width: 4 !important;
}

/* Ikoner skal styles ligesom før */
.fff-danse-angle-btn-desktop svg,
.fff-danse-angle-btn-mobile svg {
    width: 1.3rem !important;
    height: 1.3rem !important;
    min-width: 1.3rem !important;
    min-height: 1.3rem !important;
    display: block !important;
    fill: none !important;
    flex-shrink: 0;
    opacity: 1 !important;
    visibility: visible !important;
}

/* FIX: Sikre at SVG line elementer er synlige */
.fff-danse-angle-btn-desktop svg line,
.fff-danse-angle-btn-mobile svg line {
    stroke: #222 !important;
    stroke-width: 3 !important;
    stroke-linecap: round !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: block !important;
}

/* Tooltip for desktop knapper */
.fff-danse-angle-tooltip {
    position: absolute;
    right: 100%;
    margin-right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.fff-danse-angle-btn-desktop:hover .fff-danse-angle-tooltip {
    opacity: 1;
}

/* Video container – responsiv 16:9 */

.fff-danse-video-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.fff-danse-video-inner {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.25s ease-out;
    display: block;
}

.fff-danse-video-inner.is-visible {
    opacity: 1;
}

.fff-danse-video-inner iframe {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Metadata sektioner */

.fff-danse-meta-sections {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.fff-danse-meta-group {
    border-top: 1px solid #e0e0e0;
    padding-top: 1.25rem;
}

.fff-danse-meta-heading {
    font-size: 1.05rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: #444;
    margin: 0 0 0.75rem;
}

.fff-danse-meta-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); /* Two columns on desktop */
    gap: 0.4rem 1.25rem;
    margin: 0;
}

.fff-danse-meta-label {
    font-weight: 600;
    margin: 0;
    color: #333;
}

.fff-danse-meta-value {
    margin: 0;
    color: #444;
}

/* Originalt indhold */

.fff-danse-original-content {
    margin-top: 3rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
}

/* Responsivitet */

@media (max-width: 900px) {
    .fff-danse-single {
        padding-inline: 1rem;
    }

    .fff-danse-meta-grid {
        grid-template-columns: 1fr; /* Single column on tablet/mobile */
    }
}

@media (max-width: 700px) {
    .fff-danse-video-nav {
        justify-content: center;
    }

    .fff-danse-angle-nav {
        justify-content: center;
    }

    .fff-danse-chat-btn .chat-label {
        display: none;
    }

    .fff-danse-chat-btn {
        padding: 0.5rem 0.75rem;
    }
}

/* Archive styles */
.fff-danse-archive {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

.fff-danse-archive .page-header {
    margin-bottom: 2rem;
    text-align: center;
}

.fff-danse-archive .page-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: #222;
}

.fff-danse-search {
    margin: 2rem 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.fff-danse-search form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fff-danse-search-wrapper {
    position: relative;
    display: flex;
    gap: 0.75rem;
}

.fff-danse-search .search-field {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fff-danse-search .search-field:focus {
    outline: none;
    border-color: #273c4c;
    box-shadow: 0 0 0 3px rgba(39, 60, 76, 0.1);
}

.fff-danse-search-options {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.fff-danse-ai-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.fff-danse-ai-toggle input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.fff-danse-ai-toggle .toggle-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
    color: #555;
}

.fff-danse-ai-toggle .toggle-icon {
    font-size: 1.2rem;
}

.fff-danse-ai-toggle input[type="checkbox"]:checked + .toggle-label {
    color: #273c4c;
    font-weight: 600;
}

.fff-danse-search .search-submit {
    padding: 0.75rem 1.5rem;
    background: #273c4c;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.fff-danse-search .search-submit:hover {
    background: #1a2a35;
}

/* Search Suggestions Dropdown */
.fff-danse-search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-top: none;
    border-radius: 0 0 4px 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 100;
    display: none;
    margin-top: -1px;
}

.fff-danse-suggestions-list {
    max-height: 200px;
    overflow-y: auto;
}

.fff-danse-suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.15s ease;
}

.fff-danse-suggestion-item:hover {
    background: #f5f5f5;
}

.fff-danse-suggestion-item:last-child {
    border-bottom: none;
}

/* Search Status */
.fff-danse-search-status {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border-radius: 4px;
    font-size: 0.9rem;
    display: none;
}

.fff-danse-status-loading {
    color: #273c4c;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fff-danse-status-loading::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid #273c4c;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

.fff-danse-status-success {
    color: #155724;
    background: #d4edda;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

.fff-danse-status-error {
    color: #721c24;
    background: #f8d7da;
    padding: 0.5rem 0.75rem;
    border-radius: 4px;
}

/* Search Suggestions Box (after results) */
.fff-danse-search-suggestions-box {
    margin-top: 2rem;
    padding: 1.5rem;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.fff-danse-search-suggestions-box h3 {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    color: #273c4c;
}

.fff-danse-search-suggestions-box ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.fff-danse-search-suggestions-box li {
    margin: 0;
}

.fff-danse-suggestion-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    color: #273c4c;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.fff-danse-suggestion-link:hover {
    background: #273c4c;
    color: #fff;
    border-color: #273c4c;
}

/* View Switcher */
.fff-danse-view-switcher {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    justify-content: flex-end;
    align-items: center;
}

.fff-danse-view-switcher .view-btn {
    padding: 0.5rem 0.75rem;
    border: 1px solid #ddd;
    background: #fff;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
}

.fff-danse-view-switcher .view-btn:hover {
    background: #f5f5f5;
    border-color: #273c4c;
}

.fff-danse-view-switcher .view-btn.active {
    background: #273c4c;
    color: #fff;
    border-color: #273c4c;
}

.fff-danse-view-switcher .view-btn .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

/* Archive Wrapper (for filters) */
.fff-danse-archive-wrapper {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

/* Filter Sidebar */
.fff-danse-filters {
    background: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.fff-danse-filters h3 {
    margin: 0 0 1.5rem;
    font-size: 1.1rem;
    color: #273c4c;
    border-bottom: 2px solid #273c4c;
    padding-bottom: 0.5rem;
}

.fff-danse-filter-group {
    margin-bottom: 1.5rem;
}

.fff-danse-filter-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.fff-danse-filter-select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
}

.fff-danse-filter-submit {
    width: 100%;
    padding: 0.75rem;
    background: #273c4c;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-top: 1rem;
}

.fff-danse-filter-submit:hover {
    background: #1a2a35;
}

.fff-danse-main {
    min-width: 0; /* Prevent grid overflow */
}

/* Grid View */
.fff-danse-grid {
    display: grid;
    grid-template-columns: repeat(var(--fff-danse-grid-columns, 3), 1fr);
    gap: 2rem;
    margin-top: 0;
}

.fff-danse-grid .fff-danse-item {
    display: flex;
    flex-direction: column;
}

/* List View */
.fff-danse-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin-top: 0;
}

.fff-danse-list .fff-danse-item {
    display: flex;
    flex-direction: row;
    gap: 1.5rem;
    margin-bottom: 0;
    border-bottom: 1px solid #e0e0e0;
    border-radius: 0;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
}

.fff-danse-list .fff-danse-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.fff-danse-list .fff-danse-item:hover {
    transform: none;
    box-shadow: none;
    background: #fafafa;
}

.fff-danse-list .fff-danse-thumbnail {
    flex: 0 0 200px;
    width: 200px;
    aspect-ratio: 16/9;
}

.fff-danse-list .fff-danse-content {
    flex: 1;
    padding: 0;
}

/* Table View */
.fff-danse-table {
    display: table;
    width: 100%;
    border-collapse: collapse;
    margin-top: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}

.fff-danse-table .fff-danse-item {
    display: table-row;
    border-bottom: 1px solid #e0e0e0;
    transition: background 0.2s ease;
}

.fff-danse-table .fff-danse-item:last-child {
    border-bottom: none;
}

.fff-danse-table .fff-danse-item:hover {
    background: #f9f9f9;
    transform: none;
    box-shadow: none;
}

.fff-danse-table .fff-danse-item > a {
    display: table-row;
}

.fff-danse-table .fff-danse-thumbnail,
.fff-danse-table .fff-danse-content {
    display: table-cell;
    padding: 1rem;
    vertical-align: middle;
}

.fff-danse-table .fff-danse-thumbnail {
    width: 150px;
    padding-right: 0;
}

.fff-danse-table .fff-danse-thumbnail img {
    width: 150px;
    height: auto;
    border-radius: 4px;
}

.fff-danse-table .fff-danse-title {
    font-size: 1.1rem;
    margin: 0 0 0.5rem;
}

.fff-danse-table .fff-danse-field {
    display: inline-block;
    margin-right: 1rem;
    margin-bottom: 0.25rem;
    font-size: 0.875rem;
}

/* Masonry View */
.fff-danse-masonry {
    column-count: var(--fff-danse-grid-columns, 3);
    column-gap: 2rem;
    margin-top: 0;
}

.fff-danse-masonry .fff-danse-item {
    break-inside: avoid;
    margin-bottom: 2rem;
    display: inline-block;
    width: 100%;
}

.fff-danse-masonry .fff-danse-item:hover {
    transform: translateY(-2px);
}

/* Field Display */
.fff-danse-field {
    margin: 0.5rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.fff-danse-field .field-label {
    font-weight: 600;
    color: #555;
    margin-right: 0.5rem;
}

.fff-danse-field .field-value {
    color: #333;
}

/* Mobile Filter Toggle */
.fff-danse-filter-toggle {
    display: none;
    width: 100%;
    padding: 1rem;
    background: #273c4c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 1rem;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.fff-danse-filter-toggle.is-active {
    background: #1a2a35;
}

.fff-danse-filter-toggle .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
}

.fff-danse-item {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: #fff;
}

.fff-danse-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.fff-danse-item a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.fff-danse-thumbnail {
    aspect-ratio: 16/9;
    overflow: hidden;
    background: #000;
}

.fff-danse-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.fff-danse-thumbnail-placeholder {
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 0.875rem;
}

.fff-danse-content {
    padding: 1.5rem;
}

.fff-danse-title {
    margin: 0 0 0.5rem;
    font-size: 1.25rem;
    color: #222;
    line-height: 1.4;
}

.fff-danse-navn {
    margin: 0 0 0.75rem;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

.fff-danse-meta {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
}

.fff-danse-meta span {
    padding: 0.25rem 0.75rem;
    background: #f5f5f5;
    border-radius: 999px;
    font-size: 0.875rem;
    color: #555;
}

.fff-danse-meta .egn {
    background: #e8f0f5;
    color: #273c4c;
}

.fff-danse-pagination {
    margin-top: 3rem;
    text-align: center;
}

.fff-danse-no-results {
    text-align: center;
    padding: 3rem;
    color: #666;
    font-size: 1.1rem;
}

/* Chat Modal */
.fff-danse-chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    pointer-events: none;
}

.fff-danse-chat-modal.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.fff-danse-chat-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
}

.fff-danse-chat-modal-content {
    position: relative;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    z-index: 1;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.fff-danse-chat-modal.is-open .fff-danse-chat-modal-content {
    transform: scale(1);
}

.fff-danse-chat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
}

.fff-danse-chat-title {
    margin: 0;
    font-size: 1.25rem;
    color: #273c4c;
    font-weight: 600;
}

.fff-danse-chat-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.fff-danse-chat-close:hover {
    background: #f0f0f0;
    color: #333;
}

.fff-danse-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 300px;
    max-height: calc(80vh - 180px);
}

.fff-danse-chat-message {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.fff-danse-chat-message-user {
    flex-direction: row-reverse;
}

.fff-danse-chat-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
    background: #f5f5f5;
}

.fff-danse-chat-message-user .fff-danse-chat-avatar {
    background: #273c4c;
}

.fff-danse-chat-bubble {
    max-width: 75%;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    background: #f5f5f5;
    color: #333;
    line-height: 1.5;
}

.fff-danse-chat-message-user .fff-danse-chat-bubble {
    background: #273c4c;
    color: #fff;
}

.fff-danse-chat-bubble p {
    margin: 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.fff-danse-chat-bubble a.fff-danse-chat-link {
    color: #273c4c;
    text-decoration: underline;
    font-weight: 500;
    transition: color 0.2s ease;
}

.fff-danse-chat-bubble a.fff-danse-chat-link:hover {
    color: #1a2a35;
    text-decoration: underline;
}

.fff-danse-chat-bubble.fff-danse-chat-thinking {
    background: #e8f0f5;
    color: #273c4c;
    font-style: italic;
}

.fff-danse-chat-bubble.fff-danse-chat-error {
    background: #f8d7da;
    color: #721c24;
}

.fff-danse-chat-results {
    margin-top: 0.5rem;
}

.fff-danse-chat-results-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fff-danse-chat-result-item {
    margin: 0;
}

.fff-danse-chat-result-link {
    display: block;
    padding: 1rem;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.fff-danse-chat-result-link:hover {
    background: #f0f0f0;
    border-color: #273c4c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.fff-danse-chat-result-title {
    margin: 0 0 0.5rem;
    font-size: 1rem;
    color: #273c4c;
    font-weight: 600;
}

.fff-danse-chat-result-meta {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

.fff-danse-chat-result-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.fff-danse-chat-result-tags .tag {
    padding: 0.25rem 0.75rem;
    background: #e8f0f5;
    border-radius: 999px;
    font-size: 0.8rem;
    color: #273c4c;
}

.fff-danse-chat-suggestions {
    margin-top: 0.5rem;
}

.fff-danse-chat-suggestions p {
    margin: 0 0 0.5rem;
    font-size: 0.9rem;
    color: #666;
}

.fff-danse-chat-suggestions-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.fff-danse-chat-suggestion-btn {
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #273c4c;
    cursor: pointer;
    transition: all 0.2s ease;
}

.fff-danse-chat-suggestion-btn:hover {
    background: #273c4c;
    color: #fff;
    border-color: #273c4c;
}

.fff-danse-chat-input-wrapper {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid #e0e0e0;
}

.fff-danse-chat-form {
    display: flex;
    gap: 0.75rem;
}

.fff-danse-chat-input {
    flex: 1;
    padding: 0.75rem 1rem;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fff-danse-chat-input:focus {
    outline: none;
    border-color: #273c4c;
    box-shadow: 0 0 0 3px rgba(39, 60, 76, 0.1);
}

.fff-danse-chat-send {
    padding: 0.75rem 1.5rem;
    background: #273c4c;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.fff-danse-chat-send:hover {
    background: #1a2a35;
}

.fff-danse-chat-send:active {
    transform: scale(0.98);
}

/* Metadata List */
.fff-danse-chat-metadata {
    margin-top: 0.5rem;
}

.fff-danse-chat-metadata-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.fff-danse-chat-metadata-group-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    color: #273c4c;
    font-weight: 600;
    text-transform: capitalize;
}

.fff-danse-chat-metadata-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.fff-danse-chat-metadata-item {
    margin: 0;
    padding: 0.5rem;
    background: #fff;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.fff-danse-chat-metadata-key {
    background: #e8f0f5;
    color: #273c4c;
    padding: 0.2rem 0.5rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    font-weight: 600;
}

.fff-danse-chat-metadata-label {
    color: #555;
    margin-left: 0.5rem;
}

/* Links */
.fff-danse-chat-links {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.fff-danse-chat-link-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #273c4c;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    text-align: center;
    transition: all 0.2s ease;
    border: 2px solid #273c4c;
}

.fff-danse-chat-link-btn:hover {
    background: #1a2a35;
    border-color: #1a2a35;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Values List */
.fff-danse-chat-values {
    margin-top: 0.5rem;
}

.fff-danse-chat-values-info {
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: #f0f7fa;
    border-radius: 6px;
    font-size: 0.9rem;
    color: #555;
    text-align: center;
}

.fff-danse-chat-values-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.5rem;
}

.fff-danse-chat-values-item {
    margin: 0;
    padding: 0.75rem 1rem;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #333;
    transition: all 0.2s ease;
}

.fff-danse-chat-values-item:hover {
    background: #f9f9f9;
    border-color: #273c4c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fff-danse-chat-link-btn:active {
    transform: translateY(0);
}

@media (max-width: 768px) {
    .fff-danse-chat-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 100vh;
        border-radius: 0;
        height: 100vh;
    }

    .fff-danse-chat-messages {
        max-height: calc(100vh - 180px);
    }

    .fff-danse-chat-bubble {
        max-width: 85%;
    }

    .fff-danse-chat-btn .chat-label {
        display: none;
    }
}

@media (max-width: 768px) {
    .fff-danse-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .fff-danse-archive .page-title {
        font-size: 2rem;
    }
    
    /* Archive Wrapper - Mobile */
    .fff-danse-archive-wrapper {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .fff-danse-filters {
        position: static;
        display: none;
    }
    
    .fff-danse-filters.is-open {
        display: block;
    }
    
    .fff-danse-filter-toggle {
        display: flex;
    }
    
    /* View Switcher - Mobile */
    .fff-danse-view-switcher {
        justify-content: center;
        margin-bottom: 1.5rem;
    }
    
    .fff-danse-view-switcher .view-btn {
        min-width: 36px;
        height: 36px;
        padding: 0.4rem;
    }
    
    /* List View - Mobile */
    .fff-danse-list .fff-danse-item {
        flex-direction: column;
    }
    
    .fff-danse-list .fff-danse-thumbnail {
        flex: 0 0 auto;
        width: 100%;
    }
    
    /* Table View - Mobile */
    .fff-danse-table {
        display: block;
    }
    
    .fff-danse-table .fff-danse-item {
        display: block;
        border-bottom: 1px solid #e0e0e0;
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .fff-danse-table .fff-danse-item > a {
        display: block;
    }
    
    .fff-danse-table .fff-danse-thumbnail,
    .fff-danse-table .fff-danse-content {
        display: block;
        padding: 0;
    }
    
    .fff-danse-table .fff-danse-thumbnail {
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .fff-danse-table .fff-danse-thumbnail img {
        width: 100%;
    }
    
    /* Masonry View - Mobile */
    .fff-danse-masonry {
        column-count: 1;
    }
}
