/* Minimal Table Styling */
.table {
    font-size: 13px;
}

.table th {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    font-weight: 600;
    padding: 8px;
}

.table td {
    padding: 0;
    vertical-align: middle;
    border-color: #dee2e6;
}

/* Timeline Container */
.timeline-container {
    background: #fafafa;
    position: relative;
    overflow: hidden;
}

/* Grid Lines */
.grid-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 1px;
    background: #e9ecef;
    z-index: 1;
}

/* Well Bars - Minimalist Design */
.well-bar {
    position: absolute;
    height: 20px;
    border-radius: 3px;
    cursor: move;
    z-index: 5;
    transition: all 0.2s ease;
    border: 1px solid rgba(0,0,0,0.1);
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.well-bar:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    z-index: 10;
}

.well-bar.dragging {
    opacity: 0.8;
    transform: scale(1.05);
    z-index: 100;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    transition: none; /* Disable transition during drag for immediate feedback */
}

/* Status Colors - Simple and Clean */
.well-overall-100 {
    background: linear-gradient(to right, #28a745, #20c997);
    color: white;
}

.well-overall-95 {
    background: linear-gradient(to right, #17a2b8, #6f42c1);
    color: white;
}

.well-overall-75 {
    background: linear-gradient(to right, #ffc107, #fd7e14);
    color: #212529;
}

.well-overall-low {
    background: linear-gradient(to right, #dc3545, #e83e8c);
    color: white;
}

.bar-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    font-size: 10px;
    pointer-events: none;
}

.bar-label {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.progress-bar {
    width: 30px;
    height: 4px;
    background: rgba(255,255,255,0.3);
    border-radius: 2px;
    overflow: hidden;
    margin-left: 4px;
}

.progress-fill {
    height: 100%;
    background: rgba(255,255,255,0.8);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Drag Handle */
.drag-handle:hover {
    color: #007bff !important;
}

.drag-handle:active {
    cursor: grabbing;
}

/* Sortable Styling */
.rig-row.sortable-ghost {
    opacity: 0.5;
    background: #f8f9fa;
}

.rig-row.sortable-chosen {
    background: #e3f2fd;
}

/* Timeline Header */
.timeline-header {
    min-width: fit-content;
}

.month-header {
    border-right: 1px solid #dee2e6;
    padding: 2px;
    background: #f8f9fa;
}

.week-header {
    border-right: 1px solid #dee2e6;
    padding: 2px;
    line-height: 1.1;
}

/* Drop Zone Styling */
.drop-zone {
    background: rgba(0, 123, 255, 0.1);
    border: 2px dashed #007bff;
    border-radius: 4px;
}

/* Grid line highlighting during drag */
.timeline-container.drop-zone .grid-line {
    background: rgba(0, 123, 255, 0.3);
    width: 2px;
}

/* Zone Filter Styling */
#zoneFilter {
    min-width: 120px;
    font-size: 13px;
}

/* Zone text styling */
.fw-bold .fw-bold {
    font-weight: 600 !important;
    color: #495057 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .card-header .d-flex.justify-content-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.75rem;
    }

    .card-header .d-flex.align-items-center.gap-3 {
        flex-direction: column;
        align-items: stretch !important;
        width: 100%;
        gap: 0.5rem !important;
    }

    #zoneFilter {
        width: 100%;
    }

    .btn-group {
        width: 100%;
        display: flex;
    }

    .btn-group .btn {
        flex: 1;
    }

    .table {
        font-size: 11px;
    }

    .table th.border-end {
        width: 180px !important;
        min-width: 180px !important;
    }
    
    .well-bar {
        height: 18px;
    }
    
    .bar-content {
        font-size: 9px;
        padding: 0 4px;
    }
    
    .timeline-container {
        height: 50px;
    }

    #chartContainer {
        overflow-x: auto;
    }
}
/* Tooltip Styling */
.tooltip-content {
    text-align: left;
    max-width: 250px;
}

.tooltip-content .badge {
    font-size: 0.75em;
}

/* Enhanced Tooltip */
.tooltip .tooltip-inner {
    max-width: 300px;
    text-align: left;
    background-color: rgba(0, 0, 0, 0.9);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.4;
}

.tooltip .tooltip-arrow {
    border-top-color: rgba(0, 0, 0, 0.9);
}

/* Modal Enhancements */
.modal-header.bg-primary {
    background: linear-gradient(135deg, #007bff, #0056b3) !important;
}

.modal-body .table-sm td {
    padding: 0.25rem 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.modal-body .table-sm td:first-child {
    font-weight: 600;
    width: 30%;
}

.progress {
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    font-size: 11px;
    font-weight: 600;
}

/* Well Bar Hover Effects - Enhanced for better notes interaction feedback */
.well-bar:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    z-index: 15;
    cursor: pointer;
    border: 2px solid #007bff;
}

.well-bar:hover .bar-content {
    transform: scale(1.02);
}

/* Click indication with better visual feedback */
.well-bar:active {
    transform: translateY(-1px) scale(0.98);
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

/* Enhanced cursor pointer for better UX */
.well-bar {
    cursor: pointer;
    transition: all 0.3s ease;
}

.well-bar::after {
    content: "📝";
    position: absolute;
    top: -8px;
    right: -8px;
    background: #007bff;
    color: white;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
}

.well-bar:hover::after {
    opacity: 1;
    transform: scale(1);
}

/* Pulse animation for hover effect */
@keyframes pulse {
    0% { box-shadow: 0 2px 4px rgba(0,0,0,0.15); }
    50% { box-shadow: 0 4px 12px rgba(0,0,0,0.3); }
    100% { box-shadow: 0 2px 4px rgba(0,0,0,0.15); }
}

/* Loading animation for modal */
@keyframes fadeInModal {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-content {
    animation: fadeInModal 0.3s ease-out;
}

/* Enhanced status badges in modal */
.modal-body .badge {
    font-size: 0.8em;
    padding: 0.4em 0.8em;
}

.modal-body .alert {
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

.modal-body .alert-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb);
    color: #155724;
}

.modal-body .alert-warning {
    background: linear-gradient(135deg, #fff3cd, #ffeaa7);
    color: #856404;
}

.modal-body .alert-info {
    background: linear-gradient(135deg, #d1ecf1, #bee5eb);
    color: #0c5460;
}

/* Collapsible weeks styling */
.week-header.hidden,
.grid-line.hidden {
    display: none;
}