/* Officer-specific styles */

/* 3-Button Toggle Styles */
.toggle-group-3 {
    display: flex;
    border: 1px solid var(--border-dark);
    border-radius: 4px;
    overflow: hidden;
}

.toggle-button-3 {
    flex: 1;
    padding: 0.5rem 1rem;
    border: none;
    background: transparent;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    cursor: pointer;
    position: relative;
}

.toggle-button-3:active {
    transform: scale(0.95);
}

.theme-dark .toggle-button-3 {
    color: var(--text-dark);
    border-right: 1px solid var(--border-dark);
}

.theme-light .toggle-button-3 {
    color: var(--text-light);
    border-right: 1px solid var(--border-light);
}

.toggle-button-3:last-child {
    border-right: none;
}

.theme-dark .toggle-button-3.active {
    background-color: var(--accent-blue-dark);
    color: white;
}

.theme-light .toggle-button-3.active {
    background-color: var(--accent-blue-light);
    color: white;
}

.theme-dark .toggle-button-3:hover:not(.active) {
    background-color: var(--secondary-hover-dark);
}

.theme-light .toggle-button-3:hover:not(.active) {
    background-color: var(--secondary-hover-light);
}

/* Compact 3-Button Toggle Styles */
.toggle-group-3.compact {
    transform: scale(0.85);
    transform-origin: left center;
}

.toggle-group-3.compact .toggle-button-3 {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
}

/* Ensure toggle doesn't wrap */
.toggle-group-3 {
    flex-shrink: 0;
    white-space: nowrap;
    min-width: fit-content;
}

/* Ensure text wraps instead of toggle */
.flex-wrap-text {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flex-wrap-text > span {
    flex: 1;
    min-width: 0;
    word-wrap: break-word;
}

.flex-wrap-text > .toggle-group-3 {
    flex-shrink: 0;
}

/* Ensure items with three-way-toggle don't wrap */
.data-item-with-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
}

.data-item-with-toggle > span:first-child {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Complainant info specific layout fix */
#complainant-info-postcall-content .flex {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#complainant-info-postcall-content .flex > div:first-child {
    flex: 1;
    min-width: 0;
    word-break: break-word;
}

#complainant-info-postcall-content .three-way-toggle.compact {
    flex-shrink: 0;
    margin-left: 0;
}

/* Post-call interface layout fixes */
#postCallInterface main {
    height: 100%;
    min-height: 0;
}

#postCallInterface section {
    height: 100%;
    min-height: 0;
}

#postCallInterface .acme-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

#postCallInterface #profilerCard {
    height: 100%;
    min-height: 0;
}

#postCallInterface #profilerCard .card-content {
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

/* Fix horizontal scroll in post-call transcript */
#liveTranscriptPostCall {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    max-width: 100%;
}

/* Removed overly broad CSS rule that was affecting profile images and bubble sizing */

#liveTranscriptPostCall .conversation-entry {
    overflow: visible !important;
    max-width: 100%;
}

#liveTranscriptPostCall .conversation-text {
    overflow: visible !important;
}

#liveTranscriptPostCall .three-way-toggle {
    flex-shrink: 0;
}

/* Fix horizontal scroll in all post-call conversation tabs */
#conversationLogPostCall {
    overflow-x: hidden !important;
    max-width: 100%;
}

#conversationLogPostCall * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

#attachedFilesPostCall {
    overflow-x: hidden !important;
    max-width: 100%;
}

#attachedFilesPostCall * {
    max-width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Fix annotate section horizontal scroll */
#annotateConversationSectionPostCall {
    overflow-x: hidden !important;
    max-width: 100%;
}

#annotate-postcall-content {
    overflow-x: hidden !important;
    max-width: 100%;
    min-height: 40px;
}

#annotate-content {
    min-height: 40px;
}

/* Ensure annotation buttons container scrolls properly */
#postCallInterface .annotation-buttons-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

.profiler-tab-content-area {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    height: 100%;
    min-height: 0;
}

.profiler-tab-content {
    padding-right: 4px;
    width: 100%;
    min-width: 0;
}

/* Prevent horizontal overflow in accordion items */
.accordion-item {
    width: 100%;
    min-width: 0;
}

.accordion-header {
    width: 100%;
    min-width: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accordion-header-text {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.accordion-header .three-way-toggle {
    flex-shrink: 0;
}

.accordion-content {
    width: 100%;
    min-width: 0;
    overflow-wrap: break-word;
}

/* Annotation buttons container styling */
.annotation-buttons-container {
    min-height: 40px; /* Prevent vertical scrollbar */
    display: flex;
    align-items: center;
    flex-wrap: wrap; /* Allow buttons to wrap to multiple lines */
    gap: 0.5rem; /* Add gap between buttons */
    padding: 0.5rem 0; /* Add vertical padding */
    overflow: visible !important; /* Force no overflow */
    max-height: none !important; /* Remove any height constraints */
    height: auto !important; /* Let it size to content */
}

/* Remove horizontal scroll and let it wrap */
#annotateConversationSection .annotation-buttons-container,
#annotateConversationSectionPostCall .annotation-buttons-container {
    overflow-x: visible !important;
    overflow-y: visible !important;
    max-width: 100%;
}

/* Ensure annotate sections expand to content */
#annotateConversationSection,
#annotateConversationSectionPostCall {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Ensure the annotate content wrapper also doesn't constrain height */
#annotate-content,
#annotate-content-post-call {
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

/* Style individual annotation buttons for better spacing */
.annotation-buttons-container button {
    margin: 0.125rem; /* Small margin for wrapped buttons */
}

/* Override any parent container constraints for annotation sections */
.card-content:has(#annotateConversationSection),
.card-content:has(#annotateConversationSectionPostCall) {
    overflow: visible !important;
}

/* Ensure the parent flex container doesn't constrain */
#conversationCard .card-content {
    overflow-x: hidden;
    overflow-y: visible !important;
}

/* Thin scrollbar for annotation buttons */
.annotation-buttons-container::-webkit-scrollbar {
    height: 6px;
}

.picture-in-picture {
    position: absolute;
    bottom: 6rem;
    right: 1rem;
    width: 140px;
    height: 105px;
    border: 2px solid var(--accent-blue-dark);
    border-radius: 0;
    overflow: hidden;
    z-index: 10;
    box-shadow: 0 0 20px 8px rgba(0, 0, 0, 0.8),
                0 0 40px 15px rgba(0, 0, 0, 0.6);
}

.theme-light .picture-in-picture {
    border: 2px solid var(--accent-blue-light);
}

.report-modal-content {
    margin: 5% auto;
    padding: 30px;
    width: 90%;
    max-width: 1400px;
    max-height: 90vh;
    overflow-y: auto;
}

.icon-tab-button {
    padding: 0.6rem 0.85rem;
    font-size: 1.26rem;
    border: none;
    background: none;
    margin-right: 0.125rem;
    transition: color 0.2s;
    position: relative;
}

.theme-dark .icon-tab-button {
    color: var(--tab-text-inactive-dark);
}

.theme-light .icon-tab-button {
    color: #6B7280;
}

.theme-dark .icon-tab-button:hover:not(.active-tab) {
    color: var(--tab-text-active-dark);
    background-color: var(--tab-hover-bg-dark);
}

.theme-light .icon-tab-button:hover:not(.active-tab) {
    color: #4B5563;
}

.theme-dark .icon-tab-button.active-tab {
    color: #FFFFFF;
}

.theme-light .icon-tab-button.active-tab {
    color: #1F2937;
}

/* Active icon tab blue underline */
.icon-tab-button.active-tab::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 4px;
    background-color: var(--accent-blue-dark);
    transition: all 0.2s;
}

.theme-light .icon-tab-button.active-tab::after {
    background-color: var(--accent-blue-light);
}

/* Modal Dialog Styles */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.2s ease-out;
}

.modal-dialog {
    background-color: var(--card-bg-dark);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideIn 0.3s ease-out;
}

.theme-light .modal-dialog {
    background-color: var(--card-bg-light);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.theme-light .modal-header {
    border-bottom-color: var(--border-light);
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0;
}

.modal-close-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.theme-light .modal-close-btn {
    color: var(--text-light);
}

.modal-close-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.theme-light .modal-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-dark);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.theme-light .modal-footer {
    border-top-color: var(--border-light);
}

.form-section {
    margin-bottom: 24px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: var(--accent-blue-dark);
}

.theme-light .form-section-title {
    color: var(--accent-blue-light);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

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

.form-row .form-group {
    margin-bottom: 0;
}

.form-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.theme-light .form-label {
    color: var(--text-light);
}

/* Video controls hover effect */
.video-controls-container {
    opacity: 0.2;
    transition: opacity 0.3s ease;
}

.video-feed-container:hover .video-controls-container {
    opacity: 1;
}

/* Keep text-colored icons their designated colors */
.text-officer .fas,
.text-complainant .fas,
.text-ai-transcript .fas,
.conversation-icon.text-officer,
.conversation-icon.text-complainant {
    color: inherit !important;
}

/* Card collapse styling */
.card-header {
    position: relative;
    cursor: pointer;
    user-select: none;
    padding-right: 40px;
}

.card-collapse-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%) rotate(0deg);
    font-size: 0.75rem;
    color: var(--tab-text-inactive-dark);
    transition: transform 0.2s ease;
}

.theme-light .card-collapse-toggle {
    color: var(--tab-text-inactive-light);
}

.card-header.collapsed .card-collapse-toggle {
    transform: translateY(-50%) rotate(180deg);
}

/* Collapse toggle button styles */
.collapse-toggle-btn {
    background: none;
    border: none;
    color: var(--tab-text-inactive-dark);
    padding: 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.collapse-toggle-btn:hover {
    color: var(--tab-text-active-dark);
}

.theme-light .collapse-toggle-btn {
    color: var(--tab-text-inactive-light);
}

.theme-light .collapse-toggle-btn:hover {
    color: var(--tab-text-active-light);
}

.collapse-toggle-btn i {
    transition: transform 0.2s ease;
    display: inline-block;
}

.collapse-toggle-btn.collapsed i {
    transform: rotate(180deg);
}

/* Section collapse styles for main tabs and AI suggestions */
#active-mainTabsSection {
    transition: height 0.3s ease;
}

#active-mainTabsSection.collapsed {
    height: 3rem !important; /* Just show the tab bar */
}

#active-mainTabsSection.collapsed .collapsible-content {
    display: none;
}

#aiSuggestionsSection {
    transition: height 0.3s ease;
}

#aiSuggestionsSection.collapsed {
    height: 3.5rem !important; /* Just show the header/tabs */
}

#aiSuggestionsSection.collapsed .ai-suggestion-content,
#aiSuggestionsSection.collapsed #suggestionTabsContent {
    display: none;
}

/* When one section is collapsed, the other should expand */
#active-mainTabsSection:not(.collapsed) + #aiSuggestionsSection.collapsed {
    /* Main tabs expanded, AI collapsed */
}

#active-mainTabsSection.collapsed + #aiSuggestionsSection:not(.collapsed) {
    /* Main tabs collapsed, AI expanded */
}

.card-content {
    transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    overflow: hidden;
}

.card-content.collapsed {
    max-height: 0 !important;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

.acme-card.collapsed {
    flex-grow: 0;
}

/* Section collapse styling */
.section-header {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.section-collapse-toggle {
    font-size: 0.75rem;
    color: var(--tab-text-inactive-dark);
    transition: transform 0.2s;
    margin-left: 8px;
}

.theme-light .section-collapse-toggle {
    color: var(--tab-text-inactive-light);
}

.section-content {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

.section-content.collapsed {
    max-height: 0 !important;
    opacity: 0;
}

/* Profiler specific styles */
.profiler-tab-bar {
    display: flex;
    border-bottom: 1px solid var(--border-dark);
}

.theme-light .profiler-tab-bar {
    border-bottom-color: var(--border-light);
}

.profiler-tab-content-area {
    padding-top: 0.75rem;
}

.theme-dark .text-officer {
    color: #6EE7B7;
}

.theme-light .text-officer {
    color: #10B981;
}

.theme-dark .text-complainant {
    color: #93C5FD;
}

.theme-light .text-complainant {
    color: #3B82F6;
}

.theme-dark .text-ai-transcript {
    color: #FDBA74;
}

.theme-light .text-ai-transcript {
    color: #F59E0B;
}

/* Accordion styles */
.accordion-item .accordion-header {
    cursor: pointer;
    padding: 0.5rem;
    transition: background-color 0.2s;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header-text.cancelled {
    text-decoration: line-through;
    opacity: 0.6;
}

.theme-dark .accordion-item .accordion-header:hover {
    background-color: var(--secondary-bg-dark);
}

.theme-light .accordion-item .accordion-header:hover {
    background-color: var(--secondary-bg-light);
}

.accordion-item .accordion-header.active {
    font-weight: 600;
}

.theme-dark .accordion-item .accordion-header.active {
    color: var(--accent-blue-dark);
}

.theme-light .accordion-item .accordion-header.active {
    color: var(--accent-blue-light);
}

.accordion-item .accordion-content {
    display: none;
    padding: 0.5rem 0.5rem 0.5rem 0.75rem;
    font-size: 0.875rem;
    border-left: 2px solid;
}

.theme-dark .accordion-item .accordion-content {
    border-left-color: var(--accent-blue-dark);
}

.theme-light .accordion-item .accordion-content {
    border-left-color: var(--accent-blue-light);
}

.accordion-item .accordion-content .info-list-item {
    margin-bottom: 0.5rem;
}

.accordion-item .accordion-content .info-list-item .flex {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.accordion-item .accordion-content .info-list-item i.status-icon {
    flex-shrink: 0;
    width: 1em;
}

.accordion-item .accordion-content .direct-connections {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px dashed;
}

.theme-dark .accordion-item .accordion-content .direct-connections {
    border-top-color: var(--border-dark);
}

.theme-light .accordion-item .accordion-content .direct-connections {
    border-top-color: var(--border-light);
}

.cancel-accordion-item-btn {
    padding: 0.25rem;
    margin-left: auto;
}

.theme-dark .cancel-accordion-item-btn {
    color: var(--placeholder-dark);
}

.theme-light .cancel-accordion-item-btn {
    color: var(--placeholder-light);
}

.theme-dark .cancel-accordion-item-btn:hover {
    color: #EF4444;
}

.theme-light .cancel-accordion-item-btn:hover {
    color: #DC2626;
}

/* Report builder specific styles */
.tab-notification-dot {
    height: 0.5rem;
    width: 0.5rem;
    background-color: #EF4444;
    border-radius: 0;
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
}

.report-toggle-btn {
    background: none;
    border: none;
    padding: 0.1rem 0.25rem;
    cursor: pointer;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.theme-dark .report-toggle-btn.include {
    color: #22C55E;
}

.theme-light .report-toggle-btn.include {
    color: #16A34A;
}

.theme-dark .report-toggle-btn.exclude {
    color: #EF4444;
}

.theme-light .report-toggle-btn.exclude {
    color: #DC2626;
}

.theme-dark .report-toggle-btn.review {
    color: #EAB308;
}

.theme-light .report-toggle-btn.review {
    color: #CA8A04;
}

/* 3-Way Toggle Switch Styles */
.three-way-toggle {
    position: relative;
    display: inline-flex;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 2rem;
    padding: 0.25rem;
    gap: 0.25rem;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    margin-left: auto;
    white-space: nowrap;
    overflow: visible !important;
}

/* Compact version for tight spaces */
.three-way-toggle.compact {
    padding: 0.125rem;
    gap: 0.125rem;
}

.three-way-toggle.compact .toggle-option {
    width: 1rem;
    height: 1rem;
    font-size: 0.5rem;
}

/* Compact slider adjustments */
.three-way-toggle.compact .toggle-slider {
    width: 1rem;
    height: 1rem;
    top: 0.125rem;
    left: 0.125rem;
}

/* Compact slider positions */
.three-way-toggle.compact .toggle-input[value="exclude"]:checked ~ .toggle-slider {
    transform: translateX(0);
}

.three-way-toggle.compact .toggle-input[value="review"]:checked ~ .toggle-slider {
    transform: translateX(calc(1rem + 0.125rem));
}

.three-way-toggle.compact .toggle-input[value="include"]:checked ~ .toggle-slider {
    transform: translateX(calc(2rem + 0.25rem));
}

.theme-dark .three-way-toggle {
    background-color: rgba(255, 255, 255, 0.1);
}

.toggle-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-option {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    color: #6B7280;
    font-size: 0.75rem;
}

/* Slider that moves behind the selected option */
.toggle-slider {
    position: absolute;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    transition: all 0.3s ease;
    z-index: 1;
    top: 0.25rem;
    left: 0.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Position slider based on selection */
.toggle-input[value="exclude"]:checked ~ .toggle-slider {
    transform: translateX(0);
    background-color: #EF4444;
}

.toggle-input[value="review"]:checked ~ .toggle-slider {
    transform: translateX(1.75rem);
    background-color: #EAB308;
}

.toggle-input[value="include"]:checked ~ .toggle-slider {
    transform: translateX(3.5rem);
    background-color: #22C55E;
}

/* Active state styling */
.toggle-input[value="exclude"]:checked ~ .toggle-option.exclude {
    color: #FFFFFF;
}

.toggle-input[value="review"]:checked ~ .toggle-option.review {
    color: #000000;
}

.toggle-input[value="include"]:checked ~ .toggle-option.include {
    color: #FFFFFF;
}

/* Hover effects */
.toggle-option:hover {
    transform: scale(1.1);
}

/* Prevent scale on compact toggles */
.three-way-toggle.compact .toggle-option:hover {
    transform: scale(1.05);
}

/* Pulse animation for review state */
.toggle-input[value="review"]:checked ~ .toggle-slider {
    animation: pulse-toggle 2s infinite;
}

@keyframes pulse-toggle {
    0% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(234, 179, 8, 0.7);
    }
    70% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 10px rgba(234, 179, 8, 0);
    }
    100% {
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), 0 0 0 0 rgba(234, 179, 8, 0);
    }
}

/* Tooltip on hover */
.toggle-option::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-0.5rem);
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 9999;
}

/* Smart positioning for tooltips near edges */
.three-way-toggle:first-child .toggle-option.exclude::after,
.three-way-toggle:nth-child(-n+2) .toggle-option.exclude::after {
    left: 0;
    transform: translateY(-0.5rem);
}

.three-way-toggle:last-child .toggle-option.include::after,
.three-way-toggle:nth-last-child(-n+2) .toggle-option.include::after {
    left: auto;
    right: 0;
    transform: translateY(-0.5rem);
}

/* Ensure parent containers don't clip tooltips */
.space-y-1, .space-y-2, .card-content, .acme-card {
    overflow: visible !important;
}

/* For containers that need scrolling, use overflow-y */
.scrollable-content {
    overflow-x: visible !important;
    overflow-y: auto !important;
    position: relative;
}

/* Ensure flex containers don't clip */
.flex.justify-between.items-center {
    overflow: visible !important;
}

/* Make accordion content allow overflow for tooltips */
.accordion-content {
    overflow: visible !important;
}

/* Ensure profiler tab content allows tooltips */
.profiler-tab-content {
    overflow: visible !important;
}

/* Use higher z-index for tooltips to ensure they appear above everything */
.toggle-option::after {
    z-index: 9999 !important;
}

.toggle-option:hover::after {
    opacity: 1;
}

.toggle-option.exclude:hover::after {
    background-color: #EF4444;
    color: #FFFFFF;
}

.toggle-option.review:hover::after {
    background-color: #EAB308;
    color: #000000;
}

.toggle-option.include:hover::after {
    background-color: #22C55E;
    color: #FFFFFF;
}

/* Conversation entry styles */
.conversation-entry {
    display: flex;
    align-items: flex-start;
}

.conversation-icon-wrapper {
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
    flex-shrink: 0;
}

.conversation-icon {
    font-size: 1rem;
}

.theme-dark .conversation-icon {
    color: var(--placeholder-dark);
}

.theme-light .conversation-icon {
    color: var(--placeholder-light);
}

.conversation-text {
    flex-grow: 1;
    overflow-wrap: break-word;
    word-wrap: break-word;
    min-width: 0;
}

.conversation-text .quoted-text {
    font-style: italic;
}

.theme-dark .conversation-text .quoted-text {
    color: #FDBA74;
}

.theme-light .conversation-text .quoted-text {
    color: #F59E0B;
}

/* AI Edit Toolbar */
#aiEditToolbarContainer {
    position: relative;
}

#aiEditToolbar {
    position: absolute;
    top: 2.5rem;
    right: 0;
    z-index: 20;
    padding: 0.5rem;
    border-radius: 0;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    display: none;
    width: 220px;
}

.theme-dark #aiEditToolbar {
    background-color: var(--card-bg-dark);
    border: 1px solid var(--border-dark);
}

.theme-light #aiEditToolbar {
    background-color: var(--card-bg-light);
    border: 1px solid var(--border-light);
}

#aiEditToolbar .ai-edit-action {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    cursor: pointer;
    transition: background-color 0.2s;
    font-size: 0.875rem;
}

.theme-dark #aiEditToolbar .ai-edit-action:hover {
    background-color: var(--secondary-bg-dark);
}

.theme-light #aiEditToolbar .ai-edit-action:hover {
    background-color: var(--secondary-bg-light);
}

#aiEditToolbar .ai-edit-action i {
    width: 1.25rem;
}

#customAiEditInputContainer {
    display: none;
    margin-top: 0.5rem;
}

/* Context Menu Styles */
.context-menu-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
    font-size: 0.875rem;
}

.theme-dark .context-menu-item:hover {
    background-color: var(--secondary-bg-dark);
}

.theme-light .context-menu-item:hover {
    background-color: var(--secondary-bg-light);
}

.context-menu-divider {
    height: 1px;
    margin: 0.25rem 0;
}

.theme-dark .context-menu-divider {
    background-color: var(--border-dark);
}

.theme-light .context-menu-divider {
    background-color: var(--border-light);
}

/* Suggestion item styles */
.suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem 0;
}

.suggestion-item-text {
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.suggestion-item-text .edit-suggestion-btn {
    margin-left: 0.5rem;
    font-size: 0.7rem;
    opacity: 0.6;
    cursor: pointer;
}

.suggestion-item-text .edit-suggestion-btn:hover {
    opacity: 1;
}

.suggestion-item-actions {
    display: flex;
    gap: 0.25rem;
    margin-left: 0.5rem;
}

.suggestion-item-actions button {
    background: none;
    border: none;
    padding: 0.2rem;
    cursor: pointer;
    font-size: 0.75rem;
}

.theme-dark .suggestion-item-actions button {
    color: var(--placeholder-dark);
}

.theme-light .suggestion-item-actions button {
    color: var(--placeholder-light);
}

.theme-dark .suggestion-item-actions button:hover {
    color: var(--text-dark);
}

.theme-light .suggestion-item-actions button:hover {
    color: var(--text-light);
}

.suggestion-item-actions .undo-button {
    display: none;
}

.suggestion-item.irrelevant .undo-button {
    display: inline-block;
}

.suggestion-task-list {
    list-style: none;
    padding-left: 1.5rem;
    margin-top: 0.25rem;
}

.suggestion-task-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.125rem;
}

.suggestion-task-list input[type="checkbox"] {
    margin-right: 0.5rem;
}

.suggestion-task-list label.completed {
    text-decoration: line-through;
    opacity: 0.7;
}

.suggestion-item.potential-task .suggestion-item-text {
    color: var(--tab-text-inactive-dark);
}

.theme-light .suggestion-item.potential-task .suggestion-item-text {
    color: var(--tab-text-inactive-light);
}

.suggestion-item.potential-task .suggestion-icon-bubble {
    background-color: var(--secondary-bg-dark);
}

.theme-light .suggestion-item.potential-task .suggestion-icon-bubble {
    background-color: var(--secondary-bg-light);
}

.suggestion-icon-bubble {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 0;
    color: white;
    margin-right: 0.5rem;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.theme-dark .suggestion-item.complete .suggestion-icon-bubble {
    background-color: var(--suggestion-icon-bg-complete-dark);
}

.theme-light .suggestion-item.complete .suggestion-icon-bubble {
    background-color: var(--suggestion-icon-bg-complete-light);
}

.theme-dark .suggestion-item.pending .suggestion-icon-bubble {
    background-color: var(--suggestion-icon-bg-pending-dark);
}

.theme-light .suggestion-item.pending .suggestion-icon-bubble {
    background-color: var(--suggestion-icon-bg-pending-light);
}

.theme-dark .suggestion-item.irrelevant .suggestion-icon-bubble {
    background-color: var(--suggestion-icon-bg-irrelevant-dark);
}

.theme-light .suggestion-item.irrelevant .suggestion-icon-bubble {
    background-color: var(--suggestion-icon-bg-irrelevant-light);
}

.theme-dark .suggestion-item.officer-request .suggestion-icon-bubble {
    background-color: var(--suggestion-icon-bg-officer-request-dark);
}

.theme-light .suggestion-item.officer-request .suggestion-icon-bubble {
    background-color: var(--suggestion-icon-bg-officer-request-light);
}

.suggestion-item.complete .suggestion-item-text {
    color: var(--suggestion-complete-dark);
}

.theme-light .suggestion-item.complete .suggestion-item-text {
    color: var(--suggestion-complete-light);
}

.suggestion-item.pending .suggestion-item-text {
    color: var(--suggestion-pending-dark);
}

.theme-light .suggestion-item.pending .suggestion-item-text {
    color: var(--suggestion-pending-light);
}

.suggestion-item.irrelevant .suggestion-item-text {
    color: var(--suggestion-irrelevant-dark);
    text-decoration: line-through;
}

.theme-light .suggestion-item.irrelevant .suggestion-item-text {
    color: var(--suggestion-irrelevant-light);
}

.suggestion-item.officer-request .suggestion-item-text {
    color: var(--suggestion-officer-request-dark);
    font-style: italic;
}

.theme-light .suggestion-item.officer-request .suggestion-item-text {
    color: var(--suggestion-officer-request-light);
    font-style: italic;
}

.suggestion-item.officer-request.complete .suggestion-item-text {
    font-style: normal;
    cursor: pointer;
}

.theme-dark .suggestion-item.officer-request.complete .suggestion-item-text:hover {
    color: var(--accent-blue-hover-dark);
    text-decoration: underline;
}

.theme-light .suggestion-item.officer-request.complete .suggestion-item-text:hover {
    color: var(--accent-blue-hover-light);
    text-decoration: underline;
}

/* Video Playback Styles */
#videoPlaybackContainer {
    min-height: 500px;
}

/* Playback Speed Indicator */
#speedText {
    min-width: 2rem;
    text-align: center;
}

/* Timeline Markers */
.timeline-marker {
    position: absolute;
    width: 4px;
    height: 100%;
    background-color: var(--accent-blue-dark);
    cursor: pointer;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.timeline-marker:hover {
    opacity: 1;
}

/* Data Tooltip */
#dataTooltip {
    max-width: 250px;
}

/* Highlight Mode */
.highlight-mode .timeline-marker {
    animation: pulse 2s infinite;
}

/* Connections diagram styles */
.connections-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    position: relative;
    min-height: 250px;
}

.root-profile-node {
    padding: 0.75rem 1rem;
    border-radius: 0;
    font-weight: 600;
    margin-bottom: 2rem;
    text-align: center;
}

.theme-dark .root-profile-node {
    background-color: var(--accent-blue-dark);
    color: white;
}

.theme-light .root-profile-node {
    background-color: var(--accent-blue-light);
    color: white;
}

.connected-node-group {
    display: flex;
    justify-content: space-around;
    width: 100%;
    margin-bottom: 1.5rem;
}

.connected-node {
    padding: 0.5rem;
    border-radius: 0;
    text-align: center;
    font-size: 0.8rem;
    width: 100px;
    position: relative;
    cursor: pointer;
}

.theme-dark .connected-node {
    background-color: var(--secondary-bg-dark);
    border: 1px solid var(--border-dark);
}

.theme-light .connected-node {
    background-color: var(--secondary-bg-light);
    border: 1px solid var(--border-light);
}

.connected-node i {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.theme-dark .connected-node i {
    color: var(--accent-blue-dark);
}

.theme-light .connected-node i {
    color: var(--accent-blue-light);
}

.connection-line {
    position: absolute;
    border-left: 2px dashed;
    height: 30px;
    z-index: -1;
}

.theme-dark .connection-line {
    border-left-color: var(--placeholder-dark);
}

.theme-light .connection-line {
    border-left-color: var(--placeholder-light);
}

.line-to-people {
    top: 45%;
    left: 20%;
    transform: rotate(45deg);
}

.line-to-locations {
    top: 50%;
    left: 50%;
    transform: translateX(-50%) rotate(90deg);
}

.line-to-behaviors {
    top: 45%;
    right: 20%;
    transform: rotate(-45deg);
}

/* Transcript streaming styles */
.transcript-streaming {
    border-left: 3px solid var(--accent-blue-dark);
    padding-left: 0.5rem;
    margin-left: -0.5rem;
}

.theme-light .transcript-streaming {
    border-left-color: var(--accent-blue-light);
}

.transcript-confidence {
    background-color: rgba(74, 144, 226, 0.1);
    padding: 0.125rem 0.25rem;
    border-radius: 0;
    font-size: 0.6rem;
}

.transcript-streaming:hover {
    background-color: rgba(74, 144, 226, 0.05);
}

/* Video feed container */
.video-feed-container {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

/* Make video container take priority for space */
section.flex-col {
    display: flex;
    flex-direction: column;
    height: 100%;
}

#screenShareDisplay {
    padding: 1rem;
    border-radius: 0;
    overflow-y: auto;
}

.theme-dark #screenShareDisplay {
    background-color: var(--card-bg-dark);
    border: 1px solid var(--border-dark);
}

.theme-light #screenShareDisplay {
    background-color: var(--card-bg-light);
    border: 1px solid var(--border-light);
}

/* Ensure transcript visibility */
#liveTranscript {
    min-height: 200px;
    height: 100%;
}

.conversation-tab-content {
    min-height: 200px;
    height: 100%;
}

/* Tab count badge styling override */
.tab-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-blue-dark);
    color: white;
    border-radius: 50%;
    width: 1.2rem;
    height: 1.2rem;
    font-size: 0.7rem;
    font-weight: bold;
    margin-left: 0.25rem;
}

.theme-light .tab-count-badge {
    background-color: var(--accent-blue-light);
}

/* Animate new suggestions */
.suggestion-item {
    animation: fadeIn 0.3s ease-out;
}

/* Animate tab changes */
.tab-content {
    animation: fadeIn 0.2s ease-out;
}

/* Animate button clicks */
.acme-button-text:active, .acme-button-small:active {
    animation: pulse 0.2s ease-out;
}

/* Animate transcript entries */
.conversation-entry {
    animation: slideIn 0.3s ease-out;
}

/* Animate notification badges */
.tab-count-badge {
    animation: pulse 0.5s ease-out;
}

/* Animate accordion items */
.accordion-content {
    transition: all 0.3s ease-out;
}

/* Animate hover states */
button, .acme-card, .suggestion-item {
    transition: all 0.2s ease;
}