/* 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;

    /* prevent horizontal overflow */
    overflow-x: hidden;
    overflow-y: hidden;

    padding: 0;
    margin: 0;
}

.gantt-chart {
    border: none;
    outline: 1px solid #ccc;
}



/* HEADER */
.header {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    background-color: aqua;
}

/* ROWS CONTAINER */
.rows-container {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* ROWS */
.row {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    position: relative;
}

/* HEADER CELLS + TASK CELLS */
.day-of-week,
.task {
    flex: 1 1 0;
    min-width: 0;
    text-align: center;
    font-weight: bold;
    position: relative;

    padding: 0;
    margin: 0;
}

/* REMOVE ALL BORDERS IN ROWS */
.task,
.row,
.rows-container {
    border: none !important;
}

/* REMOVE HEADER CELL BORDERS TOO */
.day-of-week {
   margin-left: -140px;
}

/* 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;
}

.day-of-week {
    flex: 1 1 0;        /* equal width, shrink allowed */
    min-width: 0;       /* ⭐ prevents content from pushing the column wider */
    overflow: hidden;   /* prevents text from expanding the cell */
    text-overflow: ellipsis;
   /*  white-space: nowrap; keeps THU 6 on one line */
    padding: 0;         /* remove any accidental padding */
    margin: 0;
}

/* TASK HEIGHT */
.task {
    height: 40px;
}

/* HEADER LABELS */
.day-label {
    display: flex;

    margin-left: 0px;
}

.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;
    overflow: hidden;   /* prevents text from expanding the cell */
    text-overflow: ellipsis;
    white-space: nowrap; /* keeps text on one line */
}

/* MOBILE: condensed but same grid */
@media (max-width: 768px) {
    .task {
        height: 32px;
    }
    .weekday,
    .weekday-pill,
    .event-bar-wk {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .task {
        height: 28px;
    }
    .weekday,
    .weekday-pill,
    .event-bar-wk {
        font-size: 10px;
    }
}

/* ===== FIX FOR HEADER SHIFTING RIGHT ===== */

.day-label {
    width: 100%;
    min-width: 0;
    overflow: hidden;
}

.weekday,
.daynum {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.weekday-pill {
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header,
.row {
    column-gap: 0;
}
