/**
 * TVA Adjustments CSS
 * Styles for time difference indicators and UI elements
 */

/* Time difference indicators */
.tva-diff {
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: help;
    transition: all 0.2s ease;
}

.tva-diff i {
    margin-right: 4px;
    font-size: 10px;
}

/* Variance indicators */

/* Good match - green (within threshold) */
.tva-diff.good-match {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* No data - gray (ONLY for no GPS) */
.tva-diff.no-data {
    background-color: #f8f9fa;
    color: #6c757d;
    border: 1px solid #dee2e6;
    font-style: italic;
}

/* Basic variance - orange */
.tva-diff.variance {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Major variance - deep orange */
.tva-diff.major-variance {
    background-color: #ffebe6;
    color: #d84315;
    border: 1px solid #ffccbc;
}

/* Severe variance - red with subtle pulse */
.tva-diff.severe-variance {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    animation: subtle-pulse 3s ease-in-out infinite;
}

/* Legacy classes for backward compatibility */
.tva-diff.early {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.tva-diff.late {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tva-diff.accurate {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Hover effects */
.tva-diff:hover {
    transform: scale(1.1);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Pending update state - visual feedback disabled per user request */
.tva-diff.tva-pending {
    /* opacity: 0.5; */
    /* position: relative; */
}

/* Spinning circle disabled per user request
.tva-diff.tva-pending::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    margin-left: -6px;
    margin-top: -6px;
    border: 2px solid #1976d2;
    border-top-color: transparent;
    border-radius: 50%;
    animation: tva-spin 0.8s linear infinite;
}
*/

/* Subtle pulse animation for severe variances */
@keyframes subtle-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.2);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(220, 53, 69, 0);
        transform: scale(1.02);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
        transform: scale(1);
    }
}

/* Adjustment controls */
.tva-adjustment-controls {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 1000;
}

.tva-diff:hover .tva-adjustment-controls {
    display: block;
}

.tva-adjust-btn {
    background: #2196f3;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 4px 8px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.tva-adjust-btn:hover {
    background: #1976d2;
}

/* Timecard row states */
[data-timecard-id].tva-has-adjustments {
    position: relative;
}

/* Row highlighting removed per requirements */

[data-timecard-id].tva-highlighted {
    background-color: #e3f2fd !important;
    outline: 2px solid #2196f3;
    outline-offset: -1px;
}

[data-timecard-id].tva-hover {
    background-color: #f5f5f5;
}

[data-timecard-id].tva-adjusted {
    border-left: 3px solid #ff9800;
}

/* Enhanced Tooltip styles - Modern Design */
.tva-detailed-tooltip {
    position: fixed;
    background: #ffffff;
    color: #333333;
    padding: 0;
    border-radius: 6px;
    font-size: 10px;
    z-index: 10000;
    min-width: 256px;
    max-width: 304px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.tva-detailed-tooltip.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Status Header */
.tva-detailed-tooltip .tooltip-status {
    padding: 13px 16px;
    border-radius: 6px 6px 0 0;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 13px;
}

.tva-detailed-tooltip .tooltip-status.accurate {
    background: #e8f5e9;
    color: #2e7d32;
}

.tva-detailed-tooltip .tooltip-status.early {
    background: #fff3e0;
    color: #f57c00;
}

.tva-detailed-tooltip .tooltip-status.late {
    background: #ffebee;
    color: #c62828;
}

.tva-detailed-tooltip .tooltip-status.warning {
    background: #fff3e0;
    color: #f57c00;
}

.tva-detailed-tooltip .tooltip-status.severe {
    background: #ffebee;
    color: #b71c1c;
    font-weight: 700;
}

.tva-detailed-tooltip .tooltip-status.no-data {
    background: #f5f5f5;
    color: #616161;
}

.tva-detailed-tooltip .tooltip-status-icon {
    font-size: 19px;
    line-height: 1;
}

/* Content Sections */
.tva-detailed-tooltip .tooltip-content {
    padding: 16px;
}

.tva-detailed-tooltip .tooltip-section {
    margin-bottom: 13px;
}

.tva-detailed-tooltip .tooltip-section:last-child {
    margin-bottom: 0;
}

.tva-detailed-tooltip .tooltip-property {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 3px;
}

.tva-detailed-tooltip .tooltip-service {
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Time Comparison */
.tva-detailed-tooltip .tooltip-times {
    background: #f8f9fa;
    border-radius: 5px;
    padding: 10px;
}

.tva-detailed-tooltip .tooltip-time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.tva-detailed-tooltip .tooltip-time-row:last-child {
    margin-bottom: 0;
}

.tva-detailed-tooltip .tooltip-time-label {
    font-size: 10px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 5px;
}

.tva-detailed-tooltip .tooltip-time-value {
    font-size: 11px;
    font-weight: 500;
    color: #1a1a1a;
}

/* GPS Coverage Bar */
.tva-detailed-tooltip .tooltip-gps {
    margin-top: 10px;
}

.tva-detailed-tooltip .tooltip-gps-label {
    font-size: 10px;
    color: #666;
    margin-bottom: 3px;
    display: flex;
    justify-content: space-between;
}

.tva-detailed-tooltip .tooltip-gps-bar {
    height: 5px;
    background: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}

.tva-detailed-tooltip .tooltip-gps-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.tva-detailed-tooltip .tooltip-gps-fill.high {
    background: #4caf50;
}

.tva-detailed-tooltip .tooltip-gps-fill.medium {
    background: #ff9800;
}

.tva-detailed-tooltip .tooltip-gps-fill.low {
    background: #f44336;
}

/* Additional Info */
.tva-detailed-tooltip .tooltip-info {
    font-size: 10px;
    color: #666;
    padding: 6px 10px;
    background: #f8f9fa;
    border-radius: 5px;
    margin-top: 6px;
}

/* Map Button */
.tva-detailed-tooltip .tooltip-actions {
    padding: 10px 16px;
    border-top: 1px solid #e0e0e0;
    border-radius: 0 0 6px 6px;
}

.tva-detailed-tooltip .tooltip-map-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 6px 13px;
    background: #1976d2;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tva-detailed-tooltip .tooltip-map-btn:hover {
    background: #1565c0;
}

.tva-detailed-tooltip .tooltip-map-btn:active {
    background: #0d47a1;
}

/* Problem map button - amber/warning themed */
.tva-detailed-tooltip .tooltip-problem-action {
    padding: 4px 16px 6px;
}

.tva-detailed-tooltip .tooltip-problem-map-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: 6px 13px;
    background: #D97706;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tva-detailed-tooltip .tooltip-problem-map-btn:hover {
    background: #B45309;
}

.tva-detailed-tooltip .tooltip-problem-map-btn:active {
    background: #92400E;
}

/* Keep old styles for backward compatibility */
.tva-detailed-tooltip .tooltip-header {
    font-weight: bold;
    margin-bottom: 8px;
    padding-bottom: 4px;
    border-bottom: 1px solid rgba(255,255,255,0.3);
    color: #4fc3f7;
}

.tva-detailed-tooltip .tooltip-row {
    display: flex;
    justify-content: space-between;
    margin: 4px 0;
    font-size: 11px;
}

.tva-detailed-tooltip .tooltip-label {
    opacity: 0.8;
    margin-right: 10px;
}

.tva-detailed-tooltip .tooltip-value {
    font-weight: 500;
    text-align: right;
}

.tva-detailed-tooltip .tooltip-value.warning {
    color: #ffc107;
}

.tva-detailed-tooltip .tooltip-value.confidence-high {
    color: #4caf50;
}

.tva-detailed-tooltip .tooltip-value.confidence-medium {
    color: #ff9800;
}

.tva-detailed-tooltip .tooltip-value.confidence-low {
    color: #f44336;
}

.tva-detailed-tooltip .tooltip-row.special {
    margin-top: 8px;
    padding-top: 4px;
    border-top: 1px solid rgba(255,255,255,0.2);
}

.tva-detailed-tooltip .tooltip-row.special .tooltip-value {
    color: #ffc107;
}

/* Legacy tooltip styles for backward compatibility */
.tva-tooltip {
    position: fixed;
    z-index: 10000;
    pointer-events: none;
}

.tva-tooltip-content {
    background: #333;
    color: white;
    padding: 12px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    font-size: 12px;
    max-width: 250px;
}

.tva-tooltip-content .property {
    font-weight: bold;
    margin-bottom: 8px;
    color: #4fc3f7;
}

.tva-tooltip-content .times {
    margin-bottom: 6px;
}

.tva-tooltip-content .times div {
    margin: 2px 0;
}

.tva-tooltip-content .difference {
    margin: 6px 0;
    padding: 4px 8px;
    border-radius: 3px;
    text-align: center;
    font-weight: bold;
}

.tva-tooltip-content .difference.early {
    background-color: rgba(255, 243, 205, 0.2);
    color: #ffd54f;
}

.tva-tooltip-content .difference.late {
    background-color: rgba(248, 215, 218, 0.2);
    color: #ef5350;
}

.tva-tooltip-content .confidence {
    margin-top: 6px;
    font-size: 11px;
    opacity: 0.8;
}

/* Status bar */
#tva-status {
    padding: 0;
    margin: 0;
    border-radius: 0;
    font-size: 13px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

#tva-status:empty {
    display: none;
}

.tva-loading {
    display: inline-block;
    color: #1976d2;
    background-color: #e3f2fd;
    padding: 4px 8px;
    border-radius: 3px;
}

.tva-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #1976d2;
    border-top-color: transparent;
    border-radius: 50%;
    animation: tva-spin 0.8s linear infinite;
}

.tva-complete {
    color: #495057;
    background-color: #e9ecef;
    padding: 4px 8px;
    border-radius: 3px;
}

.tva-error {
    color: #721c24;
    background-color: #f8d7da;
    padding: 4px 8px;
    border-radius: 3px;
}

/* Map Toggle Button */
.tva-map-toggle-button {
    position: static;
    margin: 0;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    font-size: 14px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    z-index: 100;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tva-map-toggle-button:hover {
    background: #1976D2;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

.tva-map-toggle-button.active {
    background: #f44336;
}

.tva-map-toggle-button.active span {
    display: none;
}

.tva-map-toggle-button.active::after {
    content: 'Close Map';
}

/* Map Overlay Container - replaces crew list in the right 45% */
.tva-map-overlay {
    position: fixed;
    right: 8px;
    /* Top position set dynamically via JavaScript */
    width: calc(45% - 8px); /* Account for margins */
    /* Height set dynamically via JavaScript */
    display: none;
    background: #fbfbfb;
    /* Add thin black border like the tables */
    border: 1px solid #888;
    border-radius: 2px; /* Minimal rounding */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    z-index: 50; /* Below modals but above content */
    overflow: hidden;
    box-sizing: border-box;
}

.tva-map-overlay.active {
    display: block;
}

/* Hide crew list when map is active */
body.tva-map-active #crew-list-container {
    display: none;
}

/* Map container */
#tva-map-container {
    height: 100%;
    border: none;
    border-radius: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

/* Start expanded */
#tva-map-container.tva-map {
    height: 100%;
    width: 100%;
    overflow: hidden;
    position: relative;
}

#tva-map-container.collapsed {
    height: 40px;
}

#tva-map-container.collapsed .tva-map-content {
    display: none;
}

.tva-map-header {
    background-color: #eee;
    padding: 8px 10px;
    border-bottom: 1px solid #888;
    cursor: default;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
    color: #333;
    position: relative;
}

.tva-map-header:hover {
    background-color: #e5e5e5;
}

.tva-map-toggle {
    font-size: 18px;
    transition: transform 0.3s ease;
}

#tva-map-container.collapsed .tva-map-toggle {
    transform: rotate(180deg);
}

.tva-map-content {
    height: calc(100% - 45px); /* Account for header + border + padding */
    position: relative;
    background: #fbfbfb;
    overflow: hidden;
    padding-bottom: 40px; /* Add padding for Street View pegman control */
    box-sizing: border-box;
}

/* Map canvas styling */
.tva-map-canvas {
    background: #f0f0f0;
    height: 100%;
    width: 100%;
}

/* Map controls */
.tva-map-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Stops button removed */

/* Close button styles */
.tva-map-close {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: auto;
    transition: background 0.2s ease;
}

.tva-map-close:hover {
    background: #d32f2f;
}

/* Stop info window */
.tva-stop-info {
    min-width: 200px;
    padding: 5px;
}

.tva-stop-info h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 14px;
}

.tva-stop-info p {
    margin: 5px 0;
    font-size: 12px;
    color: #666;
}

.tva-stop-info strong {
    color: #333;
}

/* Route Playback Controls */
.tva-playback-controls {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.tva-playback-controls.ready {
    opacity: 1;
}

.tva-playback-controls:not(.ready) {
    opacity: 0.5;
    pointer-events: none;
}

.tva-play-btn {
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s ease;
}

.tva-play-btn:hover {
    background: #1976D2;
}

.tva-time-display {
    font-size: 14px;
    color: #666;
    min-width: 80px;
}

.tva-time-display .separator {
    margin: 0 4px;
    color: #999;
}

.tva-time-slider {
    flex: 1;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: #ddd;
    outline: none;
    cursor: pointer;
}

.tva-time-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    background: #2196F3;
    border-radius: 50%;
    cursor: pointer;
}

.tva-time-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    background: #2196F3;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.tva-speed-selector {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 3px;
    background: white;
    font-size: 14px;
    cursor: pointer;
}

/* Truck movement trail */
.tva-movement-trail {
    stroke-dasharray: 5, 5;
    animation: dash 0.5s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -10;
    }
}

/* Map markers */
.tva-marker {
    position: relative;
    cursor: pointer;
}

.tva-marker-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: all 0.2s ease;
}

.tva-marker-icon.early {
    background-color: #ffd54f;
    color: #856404;
}

.tva-marker-icon.late {
    background-color: #ef5350;
    color: white;
}

.tva-marker-icon.accurate {
    background-color: #4caf50;
    color: white;
}

.tva-marker-icon:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 8px rgba(0,0,0,0.4);
}

/* Info window */
.tva-info-window {
    padding: 0;
    min-width: 180px;
    max-width: 250px;
}

.tva-info-window h4 {
    margin: 0 0 8px 0;
    color: #1976d2;
    font-size: 13px;
    line-height: 1.2;
}

.tva-info-window .times {
    font-size: 11px;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* TVA Control Bar */
.tva-control-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 0 12px;
    min-height: 36px;
}

.tva-control-bar-left {
    flex: 0 0 auto;
}

.tva-control-bar-center {
    flex: 1 1 auto;
    text-align: center;
}

.tva-control-bar-right {
    flex: 0 0 auto;
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Custom Info Window Styles */
.tva-custom-info-window {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    padding: 12px;
    min-width: 180px;
    max-width: 250px;
    font-family: Arial, sans-serif;
    z-index: 1000;
    cursor: default;
}

.tva-custom-info-window::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

.tva-custom-info-window-close {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    color: #666;
    font-size: 16px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.tva-custom-info-window-close:hover {
    background-color: #f0f0f0;
}

/* TVA Suggestions Button */
.tva-suggestions-button {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.tva-suggestions-button:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tva-suggestions-button.has-suggestions {
    background: #ff9800;
    animation: pulse 2s infinite;
}

.tva-suggestions-button.has-suggestions:hover {
    background: #f57c00;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 152, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 152, 0, 0);
    }
}

.tva-suggestions-count {
    background: rgba(255,255,255,0.3);
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: bold;
}

/* TVA Modal Styles */
.tva-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.tva-modal.open {
    display: block;
}

.tva-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1;
}

.tva-modal-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    z-index: 2;
}

.tva-modal-header {
    background: #eee;
    padding: 15px 20px;
    border-bottom: 1px solid #888;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tva-modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.tva-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tva-modal-close:hover {
    background: #ddd;
    color: #333;
}

.tva-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.tva-modal-footer {
    background: #f5f5f5;
    padding: 15px 20px;
    border-top: 1px solid #ddd;
    border-radius: 0 0 8px 8px;
    text-align: right;
}

.tva-modal-button {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tva-modal-button:hover {
    background: #1976D2;
}

.tva-no-suggestions {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-size: 16px;
}

/* TVA Suggestion Groups in Modal */
.tva-suggestion-group {
    margin-bottom: 20px;
}

.tva-suggestion-type {
    font-weight: bold;
    color: #1976d2;
    margin-bottom: 10px;
    font-size: 16px;
    border-bottom: 2px solid #e3f2fd;
    padding-bottom: 5px;
}

.tva-suggestion-item {
    background: #f5f5f5;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 4px;
    border-left: 4px solid #ff9800;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tva-suggestion-message {
    flex: 1;
    color: #333;
}

.tva-suggestion-action {
    background: #4caf50;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
    transition: all 0.2s ease;
}

.tva-suggestion-action:hover {
    background: #388e3c;
}

.tva-info-window .difference {
    padding: 6px;
    border-radius: 3px;
}

/* TVA Status Bar */
.tva-status-bar {
    padding: 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Status messages */
.tva-success {
    background-color: #4caf50;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    transition: opacity 0.3s ease;
    display: inline-block;
}

.tva-error {
    background-color: #f44336;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
}

.tva-loading {
    background-color: #2196F3;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
}

.tva-info {
    background-color: #2196F3;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    display: inline-block;
}
    text-align: center;
    margin: 8px 0;
    font-weight: bold;
}

.tva-info-window .actions {
    display: flex;
    gap: 6px;
    margin-top: 8px;
}

.tva-info-window button {
    flex: 1;
    padding: 4px 8px;
    border: none;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.tva-info-window button:first-child {
    background-color: #2196f3;
    color: white;
}

.tva-info-window button:first-child:hover {
    background-color: #1976d2;
}

.tva-info-window button:last-child {
    background-color: #f5f5f5;
    color: #333;
}

.tva-info-window button:last-child:hover {
    background-color: #e0e0e0;
}

/* Additional truck selector modal improvements */
.tva-truck-list {
    max-height: 350px;
    overflow-y: auto;
    margin-bottom: 10px;
}

.tva-truck-item {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
    font-size: 13px;
}

.tva-truck-item:hover {
    background-color: #f5f5f5;
    border-color: #2196F3;
}

.tva-truck-info {
    flex: 1;
}

.tva-truck-name {
    font-weight: bold;
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
}

.tva-truck-number {
    color: #6b7280;
    font-weight: normal;
    font-size: 0.9em;
}

.tva-truck-driver {
    font-size: 11px;
    color: #666;
    display: block;
}

.tva-truck-actions {
    display: flex;
    gap: 6px;
}

.tva-truck-select,
.tva-truck-default {
    background: #f5f5f5;
    border: 1px solid #ddd;
    padding: 4px 8px;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    font-size: 12px;
}

.tva-truck-select:hover,
.tva-truck-default:hover {
    background: #e0e0e0;
    border-color: #999;
}

.tva-truck-select.selected {
    background: #4CAF50;
    color: white;
    border-color: #45a049;
}

.tva-truck-default.selected {
    background: #2196F3;
    color: white;
    border-color: #1976D2;
}

/* Icon additions for truck selector */
.tva-truck-select i,
.tva-truck-default i {
    margin-right: 0;
    font-size: 12px;
}

.tva-truck-default i.fa-check {
    display: none;
}

.tva-truck-default.selected i.fa-users {
    display: none;
}

.tva-truck-default.selected i.fa-check {
    display: inline;
}

/* No truck button */
.tva-truck-no-truck {
    text-align: center;
    padding-top: 8px;
    border-top: 1px solid #ddd;
}

.tva-no-truck-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 6px 16px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.tva-no-truck-btn:hover {
    background: #d32f2f;
}

.tva-no-truck-btn i {
    margin-right: 4px;
    font-size: 12px;
}

/* Match Score Styles */
.tva-match-score {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-left: 8px;
    vertical-align: middle;
}

.tva-match-score.high {
    background: #4CAF50;
    color: white;
}

.tva-match-score.medium {
    background: #FF9800;
    color: white;
}

.tva-match-score.low {
    background: #f44336;
    color: white;
}

.tva-match-score.none {
    background: #9e9e9e;
    color: white;
}

/* Truck section headers */
.tva-truck-section-header {
    font-size: 12px;
    font-weight: bold;
    color: #4CAF50;
    padding: 8px 4px;
    margin-bottom: 6px;
    border-bottom: 1px solid #e0e0e0;
}

.tva-truck-section-header i {
    margin-right: 6px;
}

.tva-truck-section-header.tva-truck-section-no-gps {
    color: #9e9e9e;
    margin-top: 12px;
}

.tva-truck-section-header.tva-truck-section-zero-match {
    color: #f44336;
    margin-top: 12px;
}

/* Trucks without GPS data */
.tva-truck-item.no-gps {
    opacity: 0.6;
    background-color: #f9f9f9;
}

.tva-truck-item.no-gps:hover {
    opacity: 0.8;
}

/* Trucks with 0% match */
.tva-truck-item.zero-match {
    opacity: 0.7;
    background-color: #fff5f5;
}

.tva-truck-item.zero-match:hover {
    opacity: 0.85;
}

/* Currently selected truck highlight */
.tva-truck-item.currently-selected {
    background-color: #e8f5e9;
    border-color: #4CAF50;
}

/* Play/pause button improvements */
.tva-play-pause {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    transition: all 0.2s ease;
}

.tva-play-pause:hover {
    background: #45a049;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tva-play-pause.playing {
    background: #f44336;
}

.tva-play-pause.playing:hover {
    background: #d32f2f;
}

/* Control bar height fix */
#tva-control-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    margin-bottom: 15px;
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 50px;
}

/* Ensure truck selector is on the left */
#tva-truck-container {
    order: 1;
    flex: 0 0 auto;
}

#tva-status {
    order: 2;
    flex: 1 1 auto;
    text-align: center;
    margin: 0 20px;
}

#tva-suggestions-container {
    order: 3;
    flex: 0 0 auto;
}

#tva-map-button-container {
    order: 4;
    flex: 0 0 auto;
}

/* GPS Map button improvements */
.tva-map-toggle-button {
    background: #2196F3;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.tva-map-toggle-button:hover {
    background: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.tva-map-toggle-button.active {
    background: #f44336;
}

.tva-map-toggle-button.active:hover {
    background: #d32f2f;
}

.tva-map-toggle-button i {
    font-size: 14px;
}

.tva-map-toggle-button span {
    display: inline-block;
}

/* Truck Selector */
.tva-truck-selector {
    /* Remove margin and padding when inside control bar */
    margin: 0;
    padding: 0;
    background-color: transparent;
    border: none;
    border-radius: 0;
}

.tva-truck-selector-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tva-truck-selector label {
    font-weight: bold;
    color: #333;
    font-size: 13px;
}

.tva-truck-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 4px 12px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tva-truck-button:hover {
    background-color: #f8f9fa;
    border-color: #2196f3;
}

.tva-truck-button:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.tva-truck-status {
    font-size: 13px;
    font-style: italic;
    color: #666;
    transition: all 0.3s ease;
}

.tva-truck-status.success {
    color: #4caf50;
    font-weight: bold;
}

.tva-truck-status.error {
    color: #f44336;
}

/* Truck Selection Modal */
.tva-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.tva-modal.open {
    display: block;
}

.tva-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.tva-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.tva-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
}

.tva-modal-header h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.tva-modal-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.tva-modal-close:hover {
    background-color: #f5f5f5;
    color: #333;
}

.tva-modal-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Truck List styles removed - using the improved ones above */

/* Animations */
@keyframes tva-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tva-diff {
        font-size: 10px;
        padding: 1px 4px;
    }
    
    #tva-map-container {
        height: 300px;
    }
    
    .tva-tooltip-content {
        max-width: 200px;
        font-size: 11px;
    }
    
    /* Control bar responsive layout */
    #tva-control-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    #tva-control-bar > div {
        width: 100%;
        text-align: center;
    }
    
    .tva-truck-selector-inner {
        justify-content: center;
    }
}

/* Drive-specific styles */
.tva-drive-stops {
    margin-left: 8px;
    font-size: 11px;
    white-space: nowrap;
}

.tva-drive-stops i {
    font-size: 12px;
}

/* Drive row highlighting removed per requirements */

/* Print styles */
@media print {
    .tva-diff {
        border: 1px solid #333 !important;
        background-color: transparent !important;
        color: #333 !important;
    }
    
    #tva-map-container {
        display: none;
    }
    
    .tva-tooltip {
        display: none;
    }
    
    .tva-drive-stops {
        display: none;
    }
}

/* TVA Suggestions Container */
.tva-suggestions {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
}

.tva-suggestions-header {
    font-size: 16px;
    font-weight: bold;
    margin-bottom: 15px;
    color: #333;
}

.tva-suggestion-group {
    margin-bottom: 20px;
}

.tva-suggestion-type {
    font-size: 14px;
    font-weight: bold;
    color: #666;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e0e0e0;
}

.tva-suggestion-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 8px;
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 3px;
}

.tva-suggestion-item:hover {
    background: #f5f5f5;
}

.tva-suggestion-message {
    flex: 1;
    color: #555;
    font-size: 13px;
}

.tva-suggestion-action {
    margin-left: 10px;
    padding: 5px 12px;
    background: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.2s;
}

.tva-suggestion-action:hover {
    background: #45a049;
}

.tva-suggestion-action:active {
    background: #3d8b40;
}

/* Suggestion type color variants */
.tva-suggestion-item.tva-suggestion-shop {
    border-left: 4px solid #2196F3;
}

.tva-suggestion-item.tva-suggestion-remove {
    border-left: 4px solid #f44336;
}

.tva-suggestion-item.tva-suggestion-add {
    border-left: 4px solid #4CAF50;
}

/* Detail line under suggestion message */
.tva-suggestion-detail {
    display: block;
    font-size: 11px;
    color: #888;
    margin-top: 3px;
    font-weight: normal;
}

/* GPS Coverage Info */
.tva-gps-coverage-info {
    margin-top: 0;
    margin-bottom: 15px;
    padding: 8px 12px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 13px;
}

.tva-gps-coverage-info:empty {
    display: none;
}

.tva-no-gps {
    color: #6c757d;
    font-style: italic;
}

.tva-coverage-details {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tva-coverage-label {
    font-weight: 500;
    color: #495057;
}

.tva-coverage-time {
    color: #333;
    font-family: monospace;
}

.tva-coverage-quality {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.tva-coverage-excellent {
    background-color: #d4edda;
    color: #155724;
}

.tva-coverage-good {
    background-color: #d1ecf1;
    color: #0c5460;
}

.tva-coverage-fair {
    background-color: #fff3cd;
    color: #856404;
}

.tva-coverage-poor {
    background-color: #f8d7da;
    color: #721c24;
}

.tva-coverage-sparse {
    background-color: #f8d7da;
    color: #721c24;
}

.tva-coverage-unknown {
    background-color: #e2e3e5;
    color: #383d41;
}

/* Outside GPS coverage indicator styling */
.tva-diff.no-gps-coverage {
    background-color: #e9ecef;
    color: #6c757d;
    border: 1px solid #ced4da;
    font-style: italic;
    opacity: 0.7;
}

/* ===============================================
   Pass-through Indicator Styles
   For brief geofence crossings (< 5 minutes)
   =============================================== */

/* Pass-through indicator badge */
.tva-diff.pass-through,
.tva-diff.tva-pass-through {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.tva-diff.pass-through:hover,
.tva-diff.tva-pass-through:hover {
    background-color: #c1e2e9;
}

.pass-through-icon {
    margin-right: 3px;
}

/* Pass-through tooltip status header */
.tva-detailed-tooltip .tooltip-status.pass-through {
    background: #d1ecf1;
    color: #0c5460;
}

/* Pass-through tooltip warning section */
.tooltip-section.pass-through-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.pass-through-header {
    color: #856404;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pass-through-header .icon {
    font-size: 14px;
}

.pass-through-detail {
    font-size: 12px;
    color: #856404;
    line-height: 1.4;
}

/* Pass-through map marker */
.tva-marker.pass-through-marker,
.tva-marker-icon.pass-through {
    background-color: #17a2b8 !important;
    border-color: #138496 !important;
    color: white !important;
}

.tva-marker-icon.pass-through {
    font-size: 14px;
}

/* Pass-through info window */
.tva-info-window.pass-through-info h4 {
    color: #17a2b8;
}

.tva-info-window.pass-through-info .pass-through-warning {
    background: #fff3cd;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 12px;
}

/* ===============================================
   Time Mismatch Indicator Styles
   For GPS visits at different time than timecard
   =============================================== */

/* Time mismatch indicator badge */
.tva-diff.time-mismatch,
.tva-diff.tva-time-mismatch {
    background-color: #ffeaa7;
    color: #d35400;
    border: 1px solid #e67e22;
}

.tva-diff.time-mismatch:hover,
.tva-diff.tva-time-mismatch:hover {
    background-color: #fdcb6e;
}

.tva-diff.time-mismatch i,
.tva-diff.tva-time-mismatch i {
    margin-right: 4px;
}

/* Time mismatch tooltip status header */
.tva-detailed-tooltip .tooltip-status.time-mismatch {
    background: #ffeaa7;
    color: #d35400;
}

/* Time mismatch tooltip warning section */
.tooltip-section.time-mismatch-warning {
    background: #ffeaa7;
    border: 1px solid #e67e22;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.time-mismatch-header {
    color: #d35400;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-mismatch-header .icon {
    font-size: 14px;
}

.time-mismatch-detail {
    font-size: 12px;
    color: #d35400;
    line-height: 1.4;
}

.time-mismatch-explanation {
    font-size: 11px;
    color: #7f8c8d;
    margin-top: 6px;
    line-height: 1.3;
}

/* Time mismatch map marker */
.tva-marker.time-mismatch-marker,
.tva-marker-icon.time-mismatch {
    background-color: #e67e22 !important;
    border-color: #d35400 !important;
    color: white !important;
}

.tva-marker-icon.time-mismatch {
    font-size: 14px;
}

/* Time mismatch info window */
.tva-info-window.time-mismatch-info h4 {
    color: #e67e22;
}

.tva-info-window.time-mismatch-info .time-mismatch-warning {
    background: #ffeaa7;
    padding: 8px;
    border-radius: 4px;
    margin-bottom: 10px;
    font-size: 12px;
    border: 1px solid #e67e22;
}

/* ===============================================
   No Visit Indicator Styles
   For timecard entries with no GPS visit detected
   =============================================== */

/* No visit indicator badge - RED */
.tva-diff.no-visit,
.tva-diff.tva-no-visit {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tva-diff.no-visit:hover,
.tva-diff.tva-no-visit:hover {
    background-color: #f1b0b7;
}

.tva-diff.no-visit i,
.tva-diff.tva-no-visit i {
    margin-right: 4px;
    font-weight: bold;
}

/* No visit tooltip status header */
.tva-detailed-tooltip .tooltip-status.no-visit {
    background: #f8d7da;
    color: #721c24;
}

/* No visit tooltip warning section */
.tooltip-section.no-visit-warning {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.no-visit-header {
    color: #721c24;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.no-visit-header .icon {
    font-size: 16px;
    font-weight: bold;
    background: #dc3545;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.no-visit-detail {
    font-size: 12px;
    color: #721c24;
    line-height: 1.4;
}

.no-visit-explanation {
    font-size: 11px;
    color: #856404;
    margin-top: 6px;
    line-height: 1.4;
    padding-left: 8px;
}

/* ===============================================
   No Geofence Indicator Styles
   For properties with no geofence configured
   =============================================== */

/* No geofence indicator badge - GRAY */
.tva-diff.no-geofence,
.tva-diff.tva-no-geofence {
    background-color: #f3f4f6;
    color: #6b7280;
    border: 1px solid #d1d5db;
}

.tva-diff.no-geofence:hover,
.tva-diff.tva-no-geofence:hover {
    background-color: #e5e7eb;
}

.tva-diff.no-geofence i,
.tva-diff.tva-no-geofence i {
    margin-right: 4px;
}

/* No geofence tooltip status header */
.tva-detailed-tooltip .tooltip-status.no-geofence {
    background: #f3f4f6;
    color: #6b7280;
}

/* No geofence tooltip warning section */
.tooltip-section.no-geofence-warning {
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.no-geofence-header {
    color: #4b5563;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.no-geofence-header .icon {
    font-size: 16px;
    font-weight: bold;
    background: #9ca3af;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.no-geofence-detail {
    font-size: 12px;
    color: #4b5563;
    line-height: 1.4;
}

.no-geofence-explanation {
    font-size: 11px;
    color: #6b7280;
    margin-top: 6px;
    line-height: 1.4;
    padding-left: 8px;
}

/* ===============================================
   No Return Indicator Styles
   For timecard entries where the truck visited for
   an earlier entry but did not return for this one
   =============================================== */

/* No return indicator badge - AMBER */
.tva-diff.no-return,
.tva-diff.tva-no-return {
    background-color: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.tva-diff.no-return:hover,
.tva-diff.tva-no-return:hover {
    background-color: #fde68a;
}

.tva-diff.no-return i,
.tva-diff.tva-no-return i {
    margin-right: 4px;
    font-weight: bold;
}

/* No return tooltip status header */
.tva-detailed-tooltip .tooltip-status.no-return {
    background: #fef3c7;
    color: #92400e;
}

/* No return tooltip warning section */
.tooltip-section.no-return-warning {
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.no-return-header {
    color: #92400e;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.no-return-header .icon {
    font-size: 16px;
    font-weight: bold;
    background: #f59e0b;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.no-return-detail {
    font-size: 12px;
    color: #92400e;
    line-height: 1.4;
}

.no-return-explanation {
    font-size: 11px;
    color: #78350f;
    margin-top: 6px;
    line-height: 1.4;
    padding-left: 8px;
}

/* ===============================================
   Outside GPS Coverage Indicator Styles
   For entries before GPS data starts or after it ends
   =============================================== */

/* Outside coverage indicator badge - muted blue-gray */
.tva-diff.outside-coverage,
.tva-diff.tva-outside-coverage {
    background-color: #e8eef4;
    color: #4a5568;
    border: 1px solid #cbd5e0;
}

.tva-diff.outside-coverage:hover,
.tva-diff.tva-outside-coverage:hover {
    background-color: #dce4ed;
}

.tva-diff.outside-coverage i,
.tva-diff.tva-outside-coverage i {
    margin-right: 4px;
}

/* Tooltip status badge for outside coverage */
.tva-detailed-tooltip .tooltip-status.outside-coverage {
    background-color: #e8eef4;
    color: #4a5568;
    border-bottom: 2px solid #cbd5e0;
}

/* Tooltip section for outside coverage */
.tooltip-section.outside-coverage-warning {
    background-color: #f7fafc;
    border-left: 3px solid #a0aec0;
    padding: 8px 10px;
    margin: 4px 0;
    border-radius: 0 4px 4px 0;
}

.outside-coverage-header {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    color: #4a5568;
    font-size: 12px;
}

.outside-coverage-header .icon {
    font-size: 14px;
    width: 18px;
    text-align: center;
}

.outside-coverage-detail {
    font-size: 11px;
    color: #4a5568;
    line-height: 1.4;
    padding-left: 8px;
}

.outside-coverage-explanation {
    font-size: 11px;
    color: #718096;
    margin-top: 6px;
    line-height: 1.4;
    padding-left: 8px;
}

/* ===============================================
   Before-Lunch Indicator Styles
   For properties immediately before lunch break
   =============================================== */

/* Before-lunch indicator badge */
.tva-diff.before-lunch,
.tva-diff.tva-before-lunch {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.tva-diff.before-lunch:hover,
.tva-diff.tva-before-lunch:hover {
    background-color: #c1e2e9;
}

.tva-diff.before-lunch i,
.tva-diff.tva-before-lunch i {
    margin-right: 4px;
}

/* Before-lunch tooltip status header */
.tva-detailed-tooltip .tooltip-status.before-lunch {
    background: #d1ecf1;
    color: #0c5460;
}

/* Before-lunch tooltip info section */
.tooltip-section.before-lunch-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.before-lunch-header {
    color: #0c5460;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.before-lunch-header .icon {
    font-size: 14px;
}

.before-lunch-detail {
    font-size: 12px;
    color: #0c5460;
    line-height: 1.4;
}

/* Day-end indicator badge (same cyan color scheme as before-lunch and pass-through) */
.tva-diff.day-end,
.tva-diff.tva-day-end {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.tva-diff.day-end:hover,
.tva-diff.tva-day-end:hover {
    background-color: #c1e2e9;
}

.tva-diff.day-end i,
.tva-diff.tva-day-end i {
    margin-right: 4px;
}

/* Day-end tooltip status header */
.tva-detailed-tooltip .tooltip-status.day-end {
    background: #d1ecf1;
    color: #0c5460;
}

/* Day-end tooltip info section */
.tooltip-section.day-end-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.day-end-header {
    color: #0c5460;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.day-end-header .icon {
    font-size: 14px;
}

.day-end-detail {
    font-size: 12px;
    color: #0c5460;
    line-height: 1.4;
}

/* ===============================================
   Lunch Entry Indicator Styles
   For lunchtime and lunchdrive entries
   =============================================== */

/* Lunch indicator badge (same cyan color scheme) */
.tva-diff.lunch,
.tva-diff.tva-lunch {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.tva-diff.lunch:hover,
.tva-diff.tva-lunch:hover {
    background-color: #c1e2e9;
}

.tva-diff.lunch i,
.tva-diff.tva-lunch i {
    margin-right: 4px;
}

/* Lunch tooltip status header */
.tva-detailed-tooltip .tooltip-status.lunch {
    background: #d1ecf1;
    color: #0c5460;
}

/* Lunch tooltip info section */
.tooltip-section.lunch-info {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.lunch-header {
    color: #0c5460;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.lunch-header .icon {
    font-size: 14px;
}

.lunch-detail {
    font-size: 12px;
    color: #0c5460;
    line-height: 1.4;
}

/* Vendor-run indicator badge (neutral gray - off-site vendor, not geofence-tracked) */
.tva-diff.vendor,
.tva-diff.tva-vendor {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.tva-diff.vendor:hover,
.tva-diff.tva-vendor:hover {
    background-color: #d5d7d9;
}

/* Vendor tooltip status header */
.tva-detailed-tooltip .tooltip-status.vendor {
    background: #e2e3e5;
    color: #383d41;
}

/* Vendor tooltip info section */
.tooltip-section.vendor-info {
    background: #e2e3e5;
    border: 1px solid #d6d8db;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.vendor-header {
    color: #383d41;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.vendor-header .icon {
    font-size: 14px;
}

.vendor-detail {
    font-size: 12px;
    color: #383d41;
    line-height: 1.4;
}
/* ===============================================
   Destination Not Reached Indicator Styles
   For drives where the destination property was never visited
   =============================================== */

/* Destination not reached indicator badge */
.tva-diff.destination-not-reached,
.tva-diff.tva-destination-not-reached {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.tva-diff.destination-not-reached:hover,
.tva-diff.tva-destination-not-reached:hover {
    background-color: #ffe9a8;
}

.tva-diff.destination-not-reached i,
.tva-diff.tva-destination-not-reached i {
    margin-right: 4px;
    color: #e67c00;
}

/* Destination not reached tooltip status header */
.tva-detailed-tooltip .tooltip-status.destination-not-reached {
    background: #fff3cd;
    color: #856404;
}

/* Destination not reached tooltip info section */
.tooltip-section.destination-not-reached-info {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.destination-not-reached-header {
    color: #856404;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.destination-not-reached-header .icon {
    background: #e67c00;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.destination-not-reached-detail {
    font-size: 12px;
    color: #856404;
    line-height: 1.4;
}

/* ===============================================
   End-of-Day Drive Indicator Styles
   Shows whether final drive ended at shop or not
   =============================================== */

/* Ended at shop indicator (green) */
.tva-diff.ended-at-shop,
.tva-diff.tva-end-of-day-drive.ended-at-shop {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.tva-diff.ended-at-shop:hover,
.tva-diff.tva-end-of-day-drive.ended-at-shop:hover {
    background-color: #c1e2c7;
}

.tva-diff.ended-at-shop i,
.tva-diff.tva-end-of-day-drive.ended-at-shop i {
    margin-right: 4px;
    color: #28a745;
}

/* Ended outside shop indicator (blue/info) */
.tva-diff.ended-outside-shop,
.tva-diff.tva-end-of-day-drive.ended-outside-shop {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

.tva-diff.ended-outside-shop:hover,
.tva-diff.tva-end-of-day-drive.ended-outside-shop:hover {
    background-color: #c1e2e9;
}

.tva-diff.ended-outside-shop i,
.tva-diff.tva-end-of-day-drive.ended-outside-shop i {
    margin-right: 4px;
    color: #17a2b8;
}

/* End-of-day drive tooltip status headers */
.tva-detailed-tooltip .tooltip-status.ended-at-shop {
    background: #d4edda;
    color: #155724;
}

.tva-detailed-tooltip .tooltip-status.ended-outside-shop {
    background: #d1ecf1;
    color: #0c5460;
}

/* End-of-day drive tooltip info section */
.tooltip-section.end-of-day-drive-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.end-of-day-drive-header {
    color: #495057;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.end-of-day-drive-header .icon {
    font-size: 14px;
}

.end-of-day-drive-detail {
    font-size: 12px;
    color: #6c757d;
    line-height: 1.4;
}

/* ===============================================
   Destination Not Reached Tooltip Styles
   =============================================== */

.tooltip-section.destination-not-reached-info {
    background: #fff3cd;
    border: 1px solid #ffeeba;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.destination-not-reached-explanation {
    font-size: 11px;
    color: #856404;
    margin-top: 6px;
    line-height: 1.4;
    padding-left: 8px;
}

/* ===============================================
   End-of-Day Drive Tooltip Styles
   =============================================== */

.tooltip-section.end-of-day-drive-info {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.tooltip-section.end-of-day-drive-info.ended-at-shop {
    background: #d4edda;
    border: 1px solid #c3e6cb;
}

.tooltip-section.end-of-day-drive-info.ended-outside-shop {
    background: #d1ecf1;
    border: 1px solid #bee5eb;
}

/* Shop suggestion styling */
.shop-suggestion {
    background: #e7f3ff;
    border: 1px solid #b8daff;
    border-radius: 4px;
    padding: 6px 8px;
    margin-top: 8px;
    font-size: 11px;
    color: #004085;
}

.shop-suggestion i {
    color: #ffc107;
    margin-right: 4px;
}

/* Indirect drive-anchor info badge (neutral - GPS reference exists but no
   diff can honestly be attributed to this drive) */
.tva-diff.anchor-info,
.tva-diff.tva-anchor-info {
    background-color: #e7f1f8;
    color: #31708f;
    border: 1px solid #d0e3f0;
}

.tva-diff.anchor-info:hover,
.tva-diff.tva-anchor-info:hover {
    background-color: #d8e9f5;
}

.tva-detailed-tooltip .tooltip-status.anchor-info {
    background: #e7f1f8;
    color: #31708f;
}

.tooltip-section.anchor-info-section {
    background: #e7f1f8;
    border: 1px solid #d0e3f0;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.anchor-info-header {
    color: #31708f;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.anchor-info-header .icon {
    font-size: 14px;
}

.anchor-info-detail {
    font-size: 12px;
    color: #31708f;
}

/* GPS-bracketed visit tooltip section (informational - times are real fence
   crossings; the stay between them was inferred) */
.tooltip-section.bracketed-info {
    background: #fdf6e3;
    border: 1px solid #f0e6c8;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.bracketed-header {
    color: #8a6d3b;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.bracketed-header .icon {
    font-size: 14px;
}

.bracketed-detail {
    font-size: 12px;
    color: #8a6d3b;
}

/* Same-property service-change chips (neutral green - the crew stayed on the
   property; the end-click / micro-drive is a timecard formality) */
.tva-diff.on-property,
.tva-diff.tva-on-property {
    background-color: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #c8e6d0;
}

.tva-diff.on-property:hover,
.tva-diff.tva-on-property:hover {
    background-color: #d7ecdd;
}

.tva-detailed-tooltip .tooltip-status.on-property {
    background: #e6f4ea;
    color: #1e7e34;
}

.tooltip-section.on-property-info {
    background: #e6f4ea;
    border: 1px solid #c8e6d0;
    border-radius: 4px;
    padding: 8px;
    margin: 8px 0;
}

.on-property-header {
    color: #1e7e34;
    font-weight: bold;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.on-property-header .icon {
    font-size: 14px;
}

.on-property-detail {
    font-size: 12px;
    color: #1e7e34;
}
