Heat-Tracker/public/styles.css

255 lines
5.0 KiB
CSS

/* ================= CSS VARIABLES ================= */
:root {
--square-size: 60px;
--gap: 8px;
--v-gap: 40px;
--warehouse-height: 200px;
--region-height: 480px;
}
/* ================= GLOBAL & RESET ================= */
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 ================= */
.main-header {
background-color: #232F3E;
display: flex;
align-items: center;
padding: 0.5rem 2rem;
position: fixed;
top: 0; left: 0; right: 0;
z-index: 1000;
}
.logo {
height: 40px;
margin-right: 1rem;
}
.header-title {
color: #fff;
font-size: 1.2rem;
font-weight: bold;
margin-right: auto;
}
.nav-btn {
background-color: #FF9900;
color: #111;
border: none;
border-radius: 5px;
padding: 0.5rem 1rem;
margin-left: 0.5rem;
cursor: pointer;
font-weight: bold;
}
.nav-btn:hover {
background-color: #e48f00;
}
/* ================= PAGE & CONTAINERS ================= */
.page-container,
.heatmap-container {
display: flex;
flex-direction: column;
margin-top: 70px; /* height of header */
}
.page-container {
width: 95%;
max-width: 1200px;
margin: 0 auto;
padding: 1rem;
background: #fff;
border-radius: 6px;
}
.heatmap-container {
height: calc(100vh - 70px);
}
/* ================= FORM STYLES ================= */
.form-input, .form-textarea {
width: 80%;
max-width: 400px;
margin: 1rem auto;
display: block;
padding: 1rem;
font-size: 1rem;
border: 1px solid #ccc;
border-radius: 6px;
}
.big-button {
background-color: #28a745;
color: white;
padding: 0.75rem 1.5rem;
border: none;
border-radius: 6px;
cursor: pointer;
font-size: 1rem;
margin: 1rem auto;
display: block;
}
.big-button:hover {
background-color: #218838;
}
fieldset {
border: 1px solid #ccc;
border-radius: 6px;
padding: 1rem;
margin-bottom: 1.5rem;
}
legend {
font-weight: bold;
}
/* ================= FLOOR SELECTOR ================= */
.floor-selector {
text-align: center;
padding: 0.5rem 0;
background: #fafafa;
border-bottom: 1px solid #ddd;
}
.floor-selector label {
margin: 0 1rem;
font-weight: bold;
cursor: pointer;
}
.floor-selector input {
margin-right: 0.25rem;
}
/* ================= HEATMAP SCROLL & ZOOM ================= */
.heatmap-scroll {
flex: 1;
overflow: auto;
position: relative;
}
/* ================= 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;
}
/* 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;
top: 50%; left: 50%;
transform: translate(-50%,-50%);
white-space: pre-line;
text-align: center;
font-size: 1.2rem;
font-weight: bold;
color: rgba(0,0,0,0.6);
pointer-events: none;
}
/* ================= STATION SQUARES ================= */
.region .station-square {
position: absolute;
width: var(--square-size);
height: var(--square-size);
line-height: var(--square-size);
text-align: center;
font-size: 0.75rem;
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 ================= */
.warehouse {
width: calc((var(--square-size) * 83) + (var(--gap) * 82));
height: var(--warehouse-height);
background: #ccc;
border-radius: 6px;
}
/* ================= 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;
}