
.checkpoint-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 2rem;
    color: var(--bs-secondary);
}

/* Authentication state styles */
.checkpoint-auth-required {
    text-align: center;
    padding: 2rem;
    color: var(--bs-secondary);
    background: var(--bs-light);
    border: 1px solid var(--bs-gray-300);
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.checkpoint-auth-required i {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--bs-warning);
    display: block;
}

.checkpoint-auth-required p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

.checkpoint-loading.checkpoint-error {
    flex-direction: column;
    text-align: center;
    padding: 1.5rem;
    color: var(--bs-danger);
    background: var(--bs-danger-bg-subtle);
    border: 1px solid var(--bs-danger-border-subtle);
    border-radius: 0.375rem;
    margin: 1rem 0;
}

.checkpoint-loading.checkpoint-error i {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    display: block;
}

.checkpoint-loading.checkpoint-error p {
    margin-bottom: 1rem;
}

.checkpoint-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    color: var(--bs-secondary);
}

.checkpoint-empty i {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Timeline Flow Layout - Icons over vertical line pieces */
.checkpoint-timeline-flow {
    position: relative;
    padding: 0;
}

/* Checkpoint Section - Contains line piece and overlaid icon */
.checkpoint-section {
    position: relative;
    margin-bottom: 0;
}

/* Content with integrated vertical line pieces */
.checkpoint-content-with-line {
    display: flex;
    align-items: flex-start;
    position: relative;
}

/* Vertical line pieces */
.vertical-line-piece-start {
    width: 2px;
    height: 40px;
    background-color: var(--bs-gray-400);
    margin-left: 19px; /* Center with 40px icon */
    margin-right: 15px;
    flex-shrink: 0;
}

.vertical-line-piece {
    width: 2px;
    height: 80px;
    background-color: var(--bs-gray-400);
    margin-left: 19px; /* Center with 40px icon */
    margin-right: 15px;
    flex-shrink: 0;
}

.vertical-line-piece-end {
    width: 2px;
    height: 40px;
    background-color: var(--bs-gray-400);
    margin-left: 19px; /* Center with 40px icon */
    margin-right: 15px;
    flex-shrink: 0;
}

/* Checkpoint Headers (Time + Title - Clickable) */
.checkpoint-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    cursor: pointer;
    padding: 0.25rem 0;
    border-radius: 0.25rem;
    transition: all 0.2s;
    margin-top: -0.25rem; /* Move up to align better with line piece */
}

.checkpoint-header:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.05);
    transform: translateX(3px);
}

.checkpoint-time {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bs-secondary);
    background-color: var(--bs-light);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    border: 1px solid var(--bs-gray-300);
    white-space: nowrap;
    transition: all 0.2s;
}

.checkpoint-header:hover .checkpoint-time {
    border-color: var(--bs-primary);
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

.checkpoint-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--bs-body-color);
    flex: 1;
    line-height: 1.4;
}

/* Icon Containers - Positioned over the line pieces */
.checkpoint-icon-container {
    position: absolute;
    left: 0;
    top: 0;
    z-index: 10;
}

/* Current State Section - Icon at top of first line */
.current-state-section .checkpoint-icon-container {
    top: 0;
}

/* Regular Checkpoint Sections - Icon in middle of line */
.checkpoint-section:not(.current-state-section):not(.start-section) .checkpoint-icon-container {
    top: 40px; /* Middle of 80px line piece */
}

/* Start Section - Icon at bottom of final line */
.start-section .checkpoint-icon-container {
    top: 20px; /* Middle of 40px end piece */
}

/* Checkpoint Icons */
.checkpoint-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bs-primary);
    border: 3px solid var(--bs-primary);
    color: white;
    position: relative;
    cursor: pointer;
    transition: all 0.2s;
    /* Background to visually "break" the line beneath */
    box-shadow: 0 0 0 4px var(--bs-body-bg);
}

/* Checkpoint Icon Hover Effects */
.checkpoint-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 0 0 4px var(--bs-body-bg), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Current State Icon (Green, Non-clickable) */
.current-state-icon {
    background-color: var(--bs-success) !important;
    border-color: var(--bs-success) !important;
    cursor: default !important;
}

.current-state-icon:hover {
    transform: none !important;
    box-shadow: 0 0 0 4px var(--bs-body-bg) !important;
}

/* Start Icon (Gray, clickable) */
.start-icon {
    background-color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
    cursor: pointer;
    transition: all 0.2s;
}

.start-icon:hover {
    transform: scale(1.05);
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
    box-shadow: 0 0 0 4px var(--bs-body-bg), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Checkpoint Icon Types */
.checkpoint-initial {
    background-color: var(--bs-success) !important;
    border-color: var(--bs-success) !important;
}

.checkpoint-response {
    background-color: var(--bs-info) !important;
    border-color: var(--bs-info) !important;
}

.checkpoint-followup {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

.checkpoint-system {
    background-color: var(--bs-warning) !important;
    border-color: var(--bs-warning) !important;
}

.checkpoint-archived {
    background-color: var(--bs-secondary) !important;
    border-color: var(--bs-secondary) !important;
    opacity: 0.7;
}

/* Dark theme support */
@media (prefers-color-scheme: dark) {
    .checkpoint-time {
        background-color: var(--bs-dark);
        border-color: var(--bs-gray-600);
        color: var(--bs-light);
    }
    
    .checkpoint-header:hover .checkpoint-time {
        background-color: rgba(var(--bs-primary-rgb), 0.2);
        border-color: var(--bs-primary);
    }
    
    .checkpoint-header:hover {
        background-color: rgba(var(--bs-primary-rgb), 0.1);
    }
    
    .checkpoint-icon {
        box-shadow: 0 0 0 4px var(--bs-body-bg);
    }
    
    .current-state-icon:hover {
        box-shadow: 0 0 0 4px var(--bs-body-bg) !important;
    }
    
    .start-icon:hover {
        box-shadow: 0 0 0 4px var(--bs-body-bg), 0 4px 12px rgba(0, 0, 0, 0.15);
    }
}

.dark-theme .checkpoint-time {
    background-color: var(--bs-dark);
    border-color: var(--bs-gray-600);
    color: var(--bs-light);
}

.dark-theme .checkpoint-header:hover .checkpoint-time {
    background-color: rgba(var(--bs-primary-rgb), 0.2);
    border-color: var(--bs-primary);
}

.dark-theme .checkpoint-header:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
}

.dark-theme .checkpoint-icon {
    box-shadow: 0 0 0 4px var(--bs-body-bg);
}

.dark-theme .current-state-icon:hover {
    box-shadow: 0 0 0 4px var(--bs-body-bg) !important;
}

.dark-theme .start-icon:hover {
    box-shadow: 0 0 0 4px var(--bs-body-bg), 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Checkpoint Details Modal */
.checkpoint-details-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: 1050;
}

.checkpoint-details-modal {
    background-color: var(--bs-body-bg);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.checkpoint-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid var(--bs-gray-300);
}

.checkpoint-details-header h5 {
    margin: 0;
}

.checkpoint-details-body {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.detail-section {
    margin-bottom: 1.5rem;
}

.detail-section label {
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--bs-secondary);
    margin-bottom: 0.25rem;
}

.detail-value {
    color: var(--bs-body-color);
}

.message-content {
    background-color: var(--bs-gray-100);
    border-radius: 0.25rem;
    padding: 0.5rem;
    overflow-y: auto;
}

.message-content pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.checkpoint-details-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid var(--bs-gray-300);
}

.confirmation-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: 1060;
}

.confirmation-dialog {
    background-color: var(--bs-body-bg);
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 450px;
}

.confirmation-header {
    padding: 1rem;
    border-bottom: 1px solid var(--bs-gray-300);
}

.confirmation-header h5 {
    margin: 0;
}

.confirmation-body {
    padding: 1rem;
}

.confirmation-footer {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    padding: 1rem;
    border-top: 1px solid var(--bs-gray-300);
}

.text-warning {
    color: var(--bs-warning) !important;
}

/* Dark mode adjustments for modal */
@media (prefers-color-scheme: dark) {
    .message-content {
        background-color: var(--bs-gray-800);
    }
}

.dark-theme .message-content {
    background-color: var(--bs-gray-800);
}
