/* Rabbit Tracker Styles */

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f5f5f5;
}

/* Navbar */
.brand-icon {
    font-size: 1.4em;
}

.navbar-brand {
    font-weight: 600;
    width: 200px;
    display: inline-block;
}

#brand-text {
    display: inline-block;
    width: 140px;
    font-family: 'Courier New', monospace;
    letter-spacing: 0.5px;
}

/* Color badge for user list */
.color-badge {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    vertical-align: middle;
}

/* Priority matrix */
.priority-card {
    min-height: 300px;
    margin-bottom: 0.5rem;
}

.priority-card .card-header {
    padding: 0.5rem;
    font-size: 0.9rem;
}

.priority-header-0 { background-color: #dc3545; color: white; }
.priority-header-1 { background-color: #fd7e14; color: white; }
.priority-header-2 { background-color: #ffc107; color: #333; }
.priority-header-3 { background-color: #28a745; color: white; }
.priority-header-4 { background-color: #0dcaf0; color: #333; }
.priority-header-5 { background-color: #6c757d; color: white; }
.priority-header-6 { background-color: #9b59b6; color: white; }

.priority-list {
    min-height: 200px;
    padding: 0.5rem;
}

.priority-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 8px 12px;
    margin-bottom: 6px;
    cursor: grab;
    transition: box-shadow 0.2s;
}

.priority-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.priority-item.dragging {
    opacity: 0.5;
}

/* Gantt Legend */
.gantt-legend {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gantt-legend .badge {
    padding: 4px 10px;
    font-weight: 500;
    color: white;
}

/* Gantt chart - Excel style */
.gantt-container {
    overflow-x: auto;
    overflow-y: auto;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 0;
    min-height: 400px;
    max-height: 800px;
    position: relative;
    cursor: grab;
    user-select: none;
}

.gantt-container.dragging {
    cursor: grabbing;
    user-select: none;
}

.gantt-wrapper {
    display: inline-block;
}

.gantt-table {
    border-collapse: collapse;
    table-layout: auto;
}

/* Month header */
.gantt-month-row th {
    background-color: #343a40;
    color: white;
    text-align: center;
    padding: 8px 4px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid #495057;
}

.gantt-month-header {
    min-width: 40px;
}

/* Task header column */
.gantt-task-header {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
    background-color: #f8f9fa;
    text-align: left;
    padding: 6px 10px;
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid #dee2e6;
    position: sticky;
    left: 0;
    z-index: 10;
}

/* Day header */
.gantt-day-row th {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.gantt-day-header {
    text-align: center;
    padding: 4px 2px;
    min-width: 20px;
    white-space: nowrap;
}

.gantt-day-header .day-name {
    font-size: 0.65rem;
    color: #666;
    text-transform: uppercase;
}

.gantt-day-header .day-num {
    font-size: 0.8rem;
    font-weight: 600;
}

.gantt-day-header.weekend {
    background-color: #c8d3de; /* Более яркий серо-голубой для выходных */
}

.gantt-day-header.weekend .day-name,
.gantt-day-header.weekend .day-num {
    color: #495057; /* Более темный текст */
    font-weight: 600;
}

.gantt-day-header.today {
    background-color: #fff3cd;
}

.gantt-day-header.today .day-num {
    color: #856404;
}

/* Task rows */
.gantt-task-row td {
    border: 1px solid #e9ecef;
    height: 32px;
    padding: 0;
    vertical-align: middle;
}

.gantt-task-label {
    width: 220px !important;
    min-width: 220px !important;
    max-width: 220px !important;
    padding: 4px 10px !important;
    background-color: #fff;
    position: sticky;
    left: 0;
    z-index: 5;
    border-right: 2px solid #dee2e6 !important;
}

.gantt-task-label .task-title {
    display: block;
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

/* Day cells */
.gantt-cell {
    position: relative;
    min-width: 20px;
}

.gantt-cell.weekend {
    background-color: #e3ebf3; /* Более контрастный фон для выходных */
}

.gantt-cell.today {
    background-color: #fff8e1;
}

/* Bar segments */
.gantt-bar-segment {
    height: 22px;
    margin: 4px 0;
    display: flex;
    align-items: center;
    color: white;
    font-size: 0.7rem;
    overflow: visible;
    white-space: nowrap;
    cursor: pointer;
    transition: opacity 0.2s;
}

.gantt-bar-segment:hover {
    opacity: 0.85;
}

.gantt-bar-segment.bar-start {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
    margin-left: 2px;
    padding-left: 6px;
}

.gantt-bar-segment.bar-end {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
    margin-right: 2px;
}

.gantt-bar-segment.bar-single {
    border-radius: 4px;
    margin: 4px 2px;
}

/* Overdue task styling */
.gantt-bar-segment.overdue {
    border: 2px solid #ff8c00;
    box-shadow: 0 0 4px rgba(255, 140, 0, 0.5);
}

.bar-label {
    position: relative;
    z-index: 2;
    text-shadow: 0 1px 2px rgba(0,0,0,0.3);
    font-weight: 500;
}

/* Separator row */
.gantt-separator-row td {
    padding: 0 !important;
    border: none !important;
    background-color: transparent !important;
}

/* Task row hover */
.gantt-task-row:hover td {
    background-color: #f0f7ff;
}

.gantt-task-row:hover .gantt-task-label {
    background-color: #e8f4ff;
}

.gantt-task-row:hover .gantt-cell.weekend {
    background-color: #d0dce9; /* Более темный при наведении на выходные */
}

/* Cards */
.card {
    border-radius: 8px;
}

/* Tables */
.table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
}

/* Cell Comment Icon */
.cell-comment-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    z-index: 10;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cell-comment-icon svg {
    width: 100%;
    height: 100%;
    fill: none;
    stroke: white;
    stroke-width: 1.5;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.gantt-cell:hover .cell-comment-icon svg {
    fill: none;
    stroke: white;
    stroke-width: 2;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.7));
}


/* Responsive */
@media (max-width: 768px) {
    .priority-card {
        margin-bottom: 1rem;
    }

    .gantt-task-label,
    .gantt-task-header {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
    }

    .gantt-task-label .task-title {
        max-width: 160px;
    }

    .cell-comment-icon {
        width: 14px;
        height: 14px;
    }
}
