/* ---------- Base & Layout ---------- */
body {
    margin: 10px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ---------- Menubar (Header) ---------- */
.menubar {
    display: flex;
    justify-content: flex-start; /* Aligns items to the left */
    align-items: center;
    gap: 20px;
    padding: 8px 15px;
    background: #f0f4f8;
    border-radius: 6px;
    margin-bottom: 12px;
}

.menubar h3 {
    margin: 0; /* Prevents title from pushing the bar taller */
    font-size: 18px;
    color: #334e68;
}

/* Pushes the Navigation Links to the far right */
.menubar > span:last-child {
    margin-left: auto;
}

.menubar a {
    margin-left: 15px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    color: #3b82f6;
}

.menubar a:hover {
    text-decoration: underline;
}

/* ---------- Controls (Buttons) ---------- */
/* ---------- Controls Container ---------- */
.controls {
    display: flex;
    flex-direction: row; /* Forces them into a horizontal line */
    align-items: stretch; /* This is the secret: it stretches all children to the same height */
    gap: 8px;
    margin: 0; 
}

/* ---------- Uniform Buttons ---------- */
.controls button {
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centers text vertically */
    align-items: center;     /* Centers text horizontally */
    
    /* Sizing */
    padding: 6px 15px;
    min-height: 44px;        /* Ensures a consistent baseline height */
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    
    /* Typography */
    font-size: 13px;
    line-height: 1.2;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.controls button:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Sub-text inside buttons */
.controls .small-font {
    display: block;
    font-size: 10px;
    color: #64748b;
    margin-top: 2px;
    font-weight: normal;
}
/* ---------- The Table ---------- */
.main-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    table-layout: fixed; /* Critical for AS400 command strings */
}

/* Sticky Headers */
.main-table thead th {
    position: sticky;
    top: 0;
    background-color: #879bcc;
    color: #000;
    padding: 12px 10px;
    border: 1px solid #808080;
    text-align: left;
    z-index: 10;
}

/* Day Filter Columns */
th.filter-day {
    position: relative;
    cursor: pointer;
    text-align: center;
    width: 30px;
}

th.filter-day:hover {
    background-color: #768ab8;
}

th.filter-day.active {
    background-color: #ffeb3b !important;
    color: #000;
}

/* Table Cells */
.main-table td {
    padding: 8px 6px;
    border: 1px solid #ccc;
    vertical-align: top;
    overflow-wrap: break-word;
}

/* ---------------- Row colouring  ------------- */  
.prereq-row {  
    background-color: #bfd8ff
}
.special-instructions-row { 
    background-color: #cadfff
}
.history-row{
    background-color: #d5e6ff
}



/* ------------  make days of teh week thinner ----------------*/

/* 1. Force the columns to be super narrow */
td.thin, th.thin {
    width: 22px !important;    /* Narrowest possible for a single character */
    min-width: 22px;
    max-width: 22px;
    padding: 6px 0 !important; /* Vertical padding only, 0 on sides */
    text-align: center;        /* Centers 'Y' and Day letters */
    border: 1px solid #ccc;
    box-sizing: border-box;
}

/* 2. Specific header centering and tooltip anchor */
th.filter-day {
    position: relative;
    cursor: pointer;
    background-color: #879bcc;
    /* Center text specifically for the header cell */
    display: table-cell; 
    vertical-align: middle;
    text-align: center !important; 
}

/* 3. Ensure the table follows these rules strictly */
table.robot-batch {
    table-layout: fixed; 
    width: 100%;
    border-collapse: collapse;
}

/* ----------------------  make days of teh week thinner -------------------------------*/

/* Utilities */
.courier-text { font-family: "Courier New", Courier, monospace; }

/* ---------- Sticky Note Tooltips ---------- */
th.filter-day:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 140%;
    left: 50%;
    transform: translateX(-50%) rotate(-2deg);
    background: linear-gradient(135deg, #ffef7d 0%, #fff5b1 100%);
    color: #333;
    padding: 10px;
    width: 110px;
    font-size: 12px;
    font-weight: bold;
    text-align: center;
    box-shadow: 5px 5px 7px rgba(0,0,0,0.2);
    border-left: 1px solid #e6d354;
    z-index: 1000;
}

/* The Red Pin */
th.filter-day:hover::before {
    content: '';
    position: absolute;
    bottom: 132%;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    background: #cc0000;
    border-radius: 50%;
    z-index: 1001;
    box-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* day of week selected  */
.active-col {
    background-color: rgb(240, 244, 248)
}