/* Timeline statistics */
.timeline-stats .stat-item {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.timeline-stats .stat-item i {
    font-size: 24px;
    margin-bottom: 8px;
    display: block;
}

.timeline-stats .stat-item strong {
    display: block;
    font-size: 18px;
    margin-bottom: 4px;
}

/* Timeline filters and general styling */
.timeline-filters .btn {
    margin-right: 5px;
}

.empty-timeline {
    color: #6c757d;
}

/* Full-width timeline layout overrides */
.timeline, .timeline-item, .timeline-desk {
    display: block !important;
    width: 100% !important;
}

.timeline {
    table-layout: auto !important;
}

.timeline:before,
.timeline-item .timeline-desk .arrow {
    display: none !important;
}

.timeline-item {
    margin-bottom: 25px;
}

.timeline-item[style*="display: none"] {
    display: none !important;
}

.timeline-desk {
    vertical-align: top !important;
}

.timeline-desk a {
    color: inherit;
}

.timeline-desk a.btn-primary,
.timeline-desk a.btn-info,
.timeline-desk a.btn-success,
.timeline-desk a.btn-warning,
.timeline-desk a.btn-danger {
    color: #fff;
}

.timeline-item .timeline-desk .panel {
    margin: 0 !important;
    border: 1px solid #e3e3e3;
}

.timeline-icon {
    position: static !important;
    left: auto !important;
    top: auto !important;
    display: inline-block !important;
    margin: 0 10px 0 0 !important;
}

/* Timeline icons use inline styles from centralized config */
.timeline .timeline-icon {
    border-radius: 50%;
    display: block;
    height: 12px;
    width: 12px;
    border: 3px solid #ffffff;
}

/* Timeline content borders using centralized colors */
.timeline-item.email .timeline-content > div {
    border-left-color: #337ab7;
}

.timeline-item.file .timeline-content > div {
    border-left-color: #5cb85c;
}

.timeline-item.photo .timeline-content > div {
    border-left-color: #f0ad4e;
}

.timeline-item.message .timeline-content > div {
    border-left-color: #9C27B0;
}

/* File drop zone styling */
.file-drop-zone {
    display: block;
    border: 2px dashed #d3d3d3;
    border-radius: 4px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #fafafa;
    margin-bottom: 0;
}

.file-drop-zone:hover {
    border-color: #5cb85c;
    background-color: #f0f9f0;
}

.file-drop-zone.dragover {
    border-color: #5cb85c;
    background-color: #e8f5e9;
    border-style: solid;
}

#photo-drop-zone:hover {
    border-color: #f0ad4e;
    background-color: #fff8f0;
}

#photo-drop-zone.dragover {
    border-color: #f0ad4e;
    background-color: #fff3e0;
}

.file-drop-message {
    pointer-events: none;
}

.file-drop-message p {
    margin: 10px 0 5px;
    font-size: 14px;
}

.visually-hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
}

/* Timeline item styling */
.timeline-item-header {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 1px solid #f5f5f5 !important;
}

.timeline-item-icon {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    margin: 0 !important;
    flex-shrink: 0 !important;
    font-size: 14px !important;
    color: white !important;
}

.timeline-item-content {
    flex: 1 !important;
}

.timeline-item-title {
    margin: 0 0 4px 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
}

.timeline-item-meta {
    color: #777 !important;
    font-size: 11px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
}

.timeline-item-created-at {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.timeline-item-user {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.timeline-item-date {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.timeline-item-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* Deleted timeline items */
.timeline-item-deleted {
    opacity: 0.5;
}

.timeline-item-deleted .panel {
    margin: 0;
}

.timeline-item-deleted:hover {
    opacity: 0.7;
}

/* Timeline action buttons */
.btn-delete-timeline,
.btn-restore-timeline {
    cursor: pointer !important;
}

/* Message preview styling */
.message-preview {
    font-size: 13px;
    line-height: 1.6;
    color: #333;
    word-wrap: break-word;
}

.message-preview-html {
    padding: 12px 15px;
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    max-height: 200px;
    overflow: hidden;
    position: relative;
}

.message-preview-html p {
    margin: 0 0 8px 0;
}

.message-preview-html p:last-child {
    margin-bottom: 0;
}

.message-preview-html a {
    color: #337ab7;
    text-decoration: underline;
}

.message-preview-html img {
    max-width: 100%;
    height: auto;
}

.message-preview-html table {
    max-width: 100%;
}

/* Fancybox photo thumbnail strip */
#fancybox-thumbs {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    text-align: center;
    padding: 8px 10px;
    background: rgba(0, 0, 0, 0.6);
    white-space: nowrap;
    overflow-x: auto;
    z-index: 99999;
}

.fancybox-thumb {
    display: inline-block;
    margin: 0 4px;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 3px;
    opacity: 0.6;
    transition: opacity 0.2s, border-color 0.2s;
    vertical-align: middle;
}

.fancybox-thumb:hover {
    opacity: 1;
}

.fancybox-thumb-active {
    border-color: #fff;
    opacity: 1;
}

.fancybox-thumb img {
    display: block;
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 2px;
}

/* Email header styling */
.email-header {
    padding-bottom: 8px;
    border-bottom: 1px solid #f0f0f0;
}

/* Message title styling */
.message-title {
    font-size: 14px;
}

/* Copy timeline modal */
.copy-type-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.copy-type-buttons .btn {
    flex: 1 1 100%;
    text-align: left;
    padding: 10px 15px;
}

.copy-type-buttons .btn.active {
    background-color: #337ab7;
    color: #fff;
    border-color: #337ab7;
}

.copy-type-buttons .btn i {
    margin-right: 6px;
    width: 16px;
    text-align: center;
}

.btn-copy-timeline {
    cursor: pointer !important;
}

#copy-search-results .list-group-item {
    cursor: pointer;
    padding: 10px 15px;
}

#copy-search-results .list-group-item:hover {
    background-color: #f5f5f5;
}