/* RESET */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* MAIN CONTAINER */
.gantt-chart {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 1px solid #ccc;
    border-radius: 4px;
}

/* HEADER */
.header {
    display: flex;
    flex-wrap: wrap; /* allow wrapping on mobile */
}

/* COLUMNS (HEADER + TASK CELLS) */
.day-of-week,
.task {
    flex: 1 0 0;     /* equal-width columns */
    min-width: 0;    /* prevents overflow */
    text-align: center;
    font-weight: bold;
    position: relative;
}

/* ALTERNATING COLUMN COLORS */
.day-of-week:nth-child(odd),
.task:nth-child(odd) {
    background-color: #ffffff;
}

.day-of-week:nth-child(even),
.task:nth-child(even) {
    background-color: #f7f9fc;
}

/* ROWS */
.rows-container {
    display: flex;
    flex-direction: column;
}

.row {
    display: flex;
    flex-wrap: wrap;   /* ⭐ REQUIRED for mobile responsiveness */
    position: relative;
    margin: 0;
}

/* TASK CELLS */
.task {
    height: 40px;
    position: relative;
    border-bottom: 1px solid #ddd;
}

/* HEADER LABELS */
.day-label {
    display: flex;
    flex-direction: column;
}

.weekday {
    font-weight: bold;
    font-size: 12px;
    color: #555;
}

.daynum {
    font-size: 0.85rem;
    margin-top: 2px;
}

/* WEEKDAY PILL */
.weekday-pill {
    display: inline-block;
    padding: 4px 10px;
    background-color: #fafafa;
    border: 1px solid #ddd;
    font-size: 12px;
    font-weight: 600;
    color: #555;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    user-select: none;
    text-align: center;
    white-space: nowrap;
}

/* EVENT BARS */
.event-bar-wk {
    position: absolute;
    top: 15%;
    height: 70%;
    background-color: #c79b21;
    border-radius: 4px;
    color: white;
    font-size: 12px;
    padding-left: 4px;
    display: flex;
    align-items: center;
}

/* RESPONSIVE BREAKPOINTS */
@media (max-width: 768px) {
    .day-of-week,
    .task {
        flex-basis: calc(100% / 2); /* 2 columns */
    }
}

@media (max-width: 480px) {
    .day-of-week,
    .task {
        flex-basis: 100%; /* 1 column */
    }
}
