Update public/styles.css

This commit is contained in:
JoshBaneyCS 2025-04-30 06:08:21 +00:00
parent 8c60d18027
commit c8d3240678

View File

@ -1,31 +1,13 @@
/* ================= CSS VARIABLES ================= */ /* styles.css */
:root {
--square-size: 60px;
--gap: 8px;
--v-gap: 40px;
--warehouse-height: 200px;
--region-height: 480px;
}
/* ================= GLOBAL & RESET ================= */ /* ─── Global & Layout ───────────────────────────────────────────────────────── */
html, body {
height: 100%;
margin: 0;
padding: 0;
font-family: Arial, sans-serif;
background: #f4f4f4;
box-sizing: border-box;
}
*, *::before, *::after {
box-sizing: inherit;
}
/* ================= HEADER & NAV ================= */ /* Fixed header */
.main-header { .main-header {
background-color: #232F3E; background-color: #232F3E;
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0.5rem 2rem; padding: 0.5rem 1rem;
position: fixed; position: fixed;
top: 0; left: 0; right: 0; top: 0; left: 0; right: 0;
z-index: 1000; z-index: 1000;
@ -54,36 +36,40 @@ html, body {
background-color: #e48f00; background-color: #e48f00;
} }
/* ================= PAGE & CONTAINERS ================= */ /* Main page container (offset for fixed header) */
.page-container,
.heatmap-container {
display: flex;
flex-direction: column;
margin-top: 70px; /* height of header */
}
.page-container { .page-container {
margin-top: 70px; /* height of header */
width: 95%; width: 95%;
max-width: 1200px; max-width: 1200px;
margin: 0 auto; margin-left: auto;
margin-right: auto;
padding: 1rem; padding: 1rem;
background: #fff; background-color: #fff;
border-radius: 6px; border-radius: 6px;
} box-shadow: 0 2px 6px rgba(0,0,0,0.1);
.heatmap-container {
height: calc(100vh - 70px);
} }
/* ================= FORM STYLES ================= */ /* Utility */
.form-input, .form-textarea { .hidden {
width: 80%; display: none !important;
max-width: 400px; }
margin: 1rem auto;
/* ─── Forms & Buttons ───────────────────────────────────────────────────────── */
/* Text inputs and textareas */
.form-input,
.form-textarea {
width: 90%;
margin: 0.5rem auto;
display: block; display: block;
padding: 1rem; padding: 0.75rem;
font-size: 1rem;
border: 1px solid #ccc; border: 1px solid #ccc;
border-radius: 6px; border-radius: 6px;
font-size: 1rem;
box-sizing: border-box;
} }
/* Large submit button */
.big-button { .big-button {
background-color: #28a745; background-color: #28a745;
color: white; color: white;
@ -98,147 +84,80 @@ html, body {
.big-button:hover { .big-button:hover {
background-color: #218838; background-color: #218838;
} }
fieldset {
border: 1px solid #ccc; /* ─── Heat Map Page ────────────────────────────────────────────────────────── */
/* Container for the heat map (scrollable & zoomable) */
#heatmap-container {
margin-top: 70px; /* offset under header */
width: 95%;
height: calc(100vh - 70px);
margin-left: auto;
margin-right: auto;
position: relative;
overflow: auto;
background-color: #f9f9f9;
border-radius: 6px; border-radius: 6px;
padding: 1rem; box-shadow: 0 2px 6px rgba(0,0,0,0.1);
margin-bottom: 1.5rem;
}
legend {
font-weight: bold;
} }
/* ================= FLOOR SELECTOR ================= */ /* Dock door squares */
.floor-selector { .dock-door {
text-align: center; width: 30px;
padding: 0.5rem 0; height: 30px;
background: #fafafa; background-color: #ccc;
border-bottom: 1px solid #ddd; border: 1px solid #999;
} box-sizing: border-box;
.floor-selector label { position: absolute;
margin: 0 1rem;
font-weight: bold;
cursor: pointer; cursor: pointer;
} }
.floor-selector input { .dock-door:hover {
margin-right: 0.25rem; outline: 2px solid #FF9900;
z-index: 10;
} }
/* ================= HEATMAP SCROLL & ZOOM ================= */ /* Additional area rectangles */
.heatmap-scroll { .area-rect {
flex: 1; position: absolute;
overflow: auto; background-color: rgba(200,200,200,0.3);
position: relative; border: 1px solid #999;
}
/* ================= DIAGRAM LAYOUT ================= */
.diagram-container {
width: calc((var(--square-size) * 83) + (var(--gap) * 82));
display: flex;
flex-direction: column;
align-items: center;
gap: var(--v-gap);
padding: var(--v-gap);
box-sizing: border-box; box-sizing: border-box;
} }
.area-rect label {
/* Dock-door row */
.dock-row {
display: flex;
gap: var(--gap);
flex-wrap: nowrap;
}
.dock-square {
width: var(--square-size);
height: var(--square-size);
background: #ddd;
border-radius: 4px;
display: flex;
align-items: center;
justify-content: center;
font-size: 0.75rem;
color: #333;
user-select: none;
}
/* ================= REGIONS ================= */
.regions-container {
display: flex;
width: 100%;
gap: var(--gap);
}
.region {
position: relative;
flex: 1;
height: var(--region-height);
border: 2px solid #666;
border-radius: 4px;
overflow: hidden;
}
.region-amod { background: #eef; }
.region-preslam { background: #efe; }
.region-bmod { background: #fee; }
/* AFE override: line up station squares horizontally */
#region-preslam {
display: flex !important;
align-items: center;
overflow-x: auto;
overflow-y: hidden;
flex-wrap: nowrap;
padding: var(--gap) 0;
}
#region-preslam .station-square {
position: static;
flex: 0 0 auto;
margin: calc(var(--gap)/2);
}
/* ================= CENTER LABEL ================= */
.region .ar-center {
position: absolute; position: absolute;
top: 50%; left: 50%; top: 4px; left: 4px;
transform: translate(-50%,-50%); font-size: 0.85rem;
white-space: pre-line;
text-align: center;
font-size: 1.2rem;
font-weight: bold; font-weight: bold;
color: rgba(0,0,0,0.6);
pointer-events: none;
} }
/* ================= STATION SQUARES ================= */ /* Floor selector radios */
.region .station-square { .floor-selector {
position: absolute; position: absolute;
width: var(--square-size); top: 10px; right: 10px;
height: var(--square-size); background: rgba(255,255,255,0.9);
line-height: var(--square-size); padding: 0.5rem;
text-align: center; border-radius: 6px;
font-size: 0.75rem; box-shadow: 0 1px 4px rgba(0,0,0,0.2);
color: #111;
background: #ddd;
border: 1px solid #aaa;
border-radius: 4px;
box-shadow: 1px 1px 3px rgba(0,0,0,0.2);
cursor: pointer;
user-select: none;
transition: background 0.3s;
} }
/* ================= WAREHOUSE RECTANGLE ================= */ /* ─── Trends Page ──────────────────────────────────────────────────────────── */
.warehouse {
width: calc((var(--square-size) * 83) + (var(--gap) * 82)); /* Chart container */
height: var(--warehouse-height); #chart-container {
background: #ccc; height: 50vh;
border-radius: 6px; width: 100%;
margin-bottom: 2rem;
} }
/* Spreadsheet-style Trends table */
/* Spreadsheet-style table wrapper */
#trends-table-container { #trends-table-container {
max-height: 50vh; /* adjust as needed */ max-height: 50vh;
overflow: auto; overflow: auto;
border: 1px solid #ddd; border: 1px solid #ddd;
margin-bottom: 1rem; margin-bottom: 1rem;
} }
/* Table styling */
#trends-table { #trends-table {
width: 100%; width: 100%;
border-collapse: collapse; border-collapse: collapse;
@ -249,6 +168,7 @@ legend {
padding: 8px; padding: 8px;
text-align: center; text-align: center;
border-bottom: 1px solid #ddd; border-bottom: 1px solid #ddd;
font-size: 0.95rem;
} }
#trends-table thead th { #trends-table thead th {
position: sticky; position: sticky;
@ -258,11 +178,12 @@ legend {
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
} }
/* zebra striping */ /* Zebra striping */
#trends-table tbody tr:nth-child(even) { #trends-table tbody tr:nth-child(even) {
background: #fafafa; background: #fafafa;
} }
/* sort arrow indicators */
/* Sort arrow indicators */
.sortable::after { .sortable::after {
content: '▲▼'; content: '▲▼';
font-size: 0.6em; font-size: 0.6em;
@ -275,22 +196,3 @@ legend {
.sortable.desc::after { .sortable.desc::after {
content: '▼'; content: '▼';
} }
/* ================= TOOLTIP ================= */
.tooltip {
position: absolute;
pointer-events: none;
background: rgba(0,0,0,0.75);
color: #fff;
padding: 8px;
border-radius: 4px;
font-size: 0.9rem;
line-height: 1.2;
display: none;
z-index: 2000;
}
/* ================= UTILITY ================= */
.hidden {
display: none !important;
}