/* Communication Tab Styles */

.communication-tab {
    padding: 1rem 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Todo item interactive styles */
.todo-item-display {
    transition: all 0.2s ease;
    border-radius: 4px;
    padding: 4px 8px !important;
    margin: 2px 0;
}

.todo-item-display:hover {
    background-color: rgba(0, 123, 255, 0.05);
    transform: translateX(2px);
}

.todo-item-display .todo-checkbox {
    transition: transform 0.2s ease;
}

.todo-item-display:hover .todo-checkbox {
    transform: scale(1.1);
}

.todo-item-display.text-decoration-line-through {
    opacity: 0.7;
}

.todo-items .progress {
    background-color: #e9ecef;
}

.todo-items .progress-bar {
    background-color: #28a745;
    transition: width 0.3s ease;
}

/* Two-column layout for communication tab */
.communication-tab-content[data-tab-type="communication"] {
    height: calc(100vh - 250px);
    min-height: 500px;
    display: flex !important;
    gap: 20px;
    padding: 20px;
}

.communication-tab-content .left-column {
    flex: 0 0 40%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
}

.communication-tab-content .right-column {
    flex: 1;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

/* Exhibitor info card styling */
.exhibitor-info-card {
    margin-bottom: 0;
}

.exhibitor-info-card .info-item {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.exhibitor-info-card .info-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

/* Force proper layout in tab panes */
.tab-pane .communication-tab-content[data-tab-type="communication"] {
    display: flex !important;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive layout - adjusted to stack only on very narrow screens */
@media (max-width: 768px) {
    .communication-tab-content[data-tab-type="communication"] {
        flex-direction: column !important;
    }
    
    .communication-tab-content .left-column {
        flex: 0 0 auto !important;
        max-height: 400px;
        width: 100%;
    }
    
    .communication-tab-content .right-column {
        width: 100%;
    }
}

/* Reminders section in communication tab */
.communication-tab-content .reminders-section {
    min-height: 300px;
}

.communication-tab-content .reminders-container {
    padding-right: 5px;
}

/* Communication history styles */
.communication-history-section {
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.communication-list-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
}

/* Sticky add note section */
.communication-tab-content .add-note-section {
    flex-shrink: 0;
}

/* Note Form */
.note-form-container {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.note-form {
    display: flex;
    flex-direction: column;
}

.note-input {
    width: 100%;
    min-height: 80px;
    padding: 0.75rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1.5;
    resize: vertical;
    margin-bottom: 0.75rem;
}

.note-input:focus {
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.note-form-actions {
    display: flex;
    justify-content: flex-end;
}

.submit-note-btn {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.submit-note-btn:hover {
    background-color: #0069d9;
}

.submit-note-btn i {
    font-size: 0.75rem;
}

/* Notes Timeline */
.notes-timeline {
    flex: 1;
    overflow-y: auto;
}

.notes-timeline h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.notes-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note-item {
    padding: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background-color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.note-item:hover {
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

/* Flexbox utility for gap */
.gap-2 {
    gap: 0.5rem;
}

.note-author {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #6c757d;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.8rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
}

.note-date {
    font-size: 0.75rem;
    color: #6c757d;
}

.note-content {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #212529;
    white-space: pre-wrap;
    word-break: break-word;
}

/* Delete note button */
.delete-note-btn {
    opacity: 0;
    transition: opacity 0.2s ease;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 4px;
}

.note-item:hover .delete-note-btn {
    opacity: 1;
}

.delete-note-btn:hover {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.delete-note-btn i {
    font-size: 0.75rem;
}

/* @mention styling */
.mention {
    display: inline;
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
    border-radius: 3px;
    padding: 0 3px;
    font-weight: 500;
}

/* Mention suggestion dropdown */
.mention-dropdown {
    position: absolute;
    background-color: white;
    border: 1px solid #ced4da;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
    width: 250px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
}

.mention-item {
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.mention-item:hover {
    background-color: #f8f9fa;
}

/* Empty state */
.no-data {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.no-data i {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    opacity: 0.3;
}

/* Status dropdown in exhibitor detail window */
.status-dropdown-trigger {
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
}

.status-dropdown-trigger:hover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transform: translateY(-1px);
}

.status-dropdown-icon {
    margin-left: 8px;
    font-size: 0.75rem;
    opacity: 0.8;
    transition: transform 0.2s ease;
}

.status-dropdown.active + .status-dropdown-icon {
    transform: rotate(180deg);
}

.status-dropdown {
    position: absolute;
    top: 120%;
    right: 0;
    width: 220px;
    background: white;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2147483647; /* Maximum possible z-index value */
    display: none;
    flex-direction: column;
    overflow: visible; /* Change from hidden to visible to prevent clipping */
    border: 1px solid #dee2e6;
    transition: opacity 0.2s, transform 0.2s;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: auto; /* Ensure dropdown can receive pointer events */
}

.status-dropdown.active {
    display: flex;
    opacity: 1;
    transform: translateY(0);
}

.status-option {
    padding: 10px 14px;
    color: white;
    font-size: 0.8125rem;
    transition: all 0.2s;
    white-space: nowrap;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    pointer-events: auto; /* Ensure status options can receive clicks */
    position: relative; /* Ensure proper positioning */
    z-index: 1000000; /* Even higher z-index for options */
}

.status-option:last-child {
    border-bottom: none;
}

.status-option:hover {
    filter: brightness(1.1);
    transform: translateX(2px);
    box-shadow: inset 3px 0 0 rgba(255,255,255,0.5);
}

/* Special text color for light status options */
.status-option[data-status="uncontacted_no_response"],
.status-option[data-status="undecided"] {
    color: #333 !important;
}

/* Position the dropdown correctly */
.status-dropdown-trigger {
    position: relative;
    z-index: 999998; /* High z-index for the trigger */
    pointer-events: auto; /* Ensure trigger can receive clicks */
}

/* Remove the duplicate trigger styles */

/* Animation for status changes */
@keyframes statusUpdated {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.status-updated {
    animation: statusUpdated 0.5s ease;
}

/* Ensure dropdown doesn't interfere with tab buttons */
.status-dropdown.active {
    isolation: isolate; /* Create a new stacking context */
}

/* Additional protection for dropdown positioning */
.exhibitor-header {
    position: static;
    z-index: auto;
}

.tabs {
    position: static;
    z-index: auto;
}

/* Ensure the status trigger creates proper stacking context for dropdown */
.status-dropdown-trigger {
    position: relative;
    z-index: 999998; /* High z-index for the trigger */
    pointer-events: auto; /* Ensure trigger can receive clicks */
    isolation: isolate; /* Create new stacking context */
}

/* Force tab panes to not interfere with dropdown */
.tab-pane {
    position: static !important;
    z-index: auto !important;
    transform: none !important;
    opacity: 1 !important;
}

/* Ensure tab content doesn't create stacking context */
.tab-content {
    position: static !important;
    z-index: auto !important;
    transform: none !important;
    opacity: 1 !important;
}

/* Ensure dropdown container doesn't get clipped */
.exhibitor-details-content {
    overflow: visible !important;
    position: static !important;
    z-index: auto !important;
}

/* Remove stacking context from communication tab */
.communication-tab {
    position: static !important;
    z-index: auto !important;
    overflow: visible !important;
}

/* Ensure dropdown options work on all browsers */
.status-option {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.status-option:active {
    background-color: rgba(0, 0, 0, 0.1) !important;
}

/* Communication Tab Layout Fixes */
/* Ensure the tab content uses proper flexbox layout */
.exhibitor-detail-window .tab-pane {
    height: 100%;
}

.exhibitor-detail-window .communication-tab-content[data-tab-type="communication"] {
    display: flex !important;
    gap: 20px !important;
    height: calc(100% - 40px) !important;
    padding: 20px !important;
    box-sizing: border-box !important;
    width: 100% !important;
}

/* Left column - 40% width with smaller minimum */
.exhibitor-detail-window .communication-tab-content .left-column {
    flex: 0 0 40% !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
    min-width: 200px !important;  /* Reduced from 300px */
    height: 100% !important;
    overflow: visible !important;
}

/* Right column - remaining space with smaller minimum */
.exhibitor-detail-window .communication-tab-content .right-column {
    flex: 1 1 auto !important;
    background: white !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    display: flex !important;
    flex-direction: column !important;
    min-width: 250px !important;  /* Reduced from 400px */
    height: 100% !important;
    overflow: hidden !important;
}

/* Ensure proper scrolling in sections */
.exhibitor-detail-window .reminders-container {
    overflow-y: auto !important;
    flex: 1 !important;
}

.exhibitor-detail-window .communication-history-section {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
}

.exhibitor-detail-window .communication-list-container {
    overflow-y: auto !important;
    flex: 1 !important;
}

/* Fix for tab content visibility */
.exhibitor-detail-window .tab-content {
    height: calc(100% - 50px) !important;
    position: relative !important;
}

.exhibitor-detail-window .tab-pane.active {
    display: block !important;
    height: 100% !important;
}