Files
car/frontend/src/components/ScheduleView.module.css

429 lines
6.5 KiB
CSS

.container {
display: flex;
flex-direction: column;
height: calc(100vh - 56px);
overflow: hidden;
}
.toolbar {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 20px;
background: white;
border-bottom: 1px solid #e5e7eb;
flex-shrink: 0;
flex-wrap: wrap;
}
.navGroup {
display: flex;
gap: 4px;
}
.toolBtn {
background: #f3f4f6;
border: 1.5px solid #d1d5db;
color: #374151;
padding: 6px 14px;
border-radius: 6px;
font-size: 13px;
font-weight: 500;
transition: background 0.15s;
}
.toolBtn:hover {
background: #e5e7eb;
}
.dateRange {
font-size: 14px;
font-weight: 600;
color: #374151;
flex: 1;
text-align: center;
}
.addBtn {
background: #1a56db;
color: white;
border: none;
padding: 7px 18px;
border-radius: 6px;
font-size: 13px;
font-weight: 600;
transition: background 0.15s;
white-space: nowrap;
}
.addBtn:hover {
background: #1447c0;
}
.error {
background: #fee2e2;
color: #dc2626;
padding: 10px 20px;
font-size: 14px;
}
.loading {
padding: 20px;
text-align: center;
color: #6b7280;
font-size: 14px;
}
.loadingOverlay {
position: absolute;
top: 0;
left: 0;
right: 0;
z-index: 40;
display: flex;
align-items: center;
justify-content: center;
color: #4b5563;
font-size: 14px;
font-weight: 600;
background: rgba(255, 255, 255, 0.92);
border-bottom: 2px solid #d1d5db;
pointer-events: none;
}
/* Grid wrapper - scrollable */
.gridWrapper {
flex: 1;
overflow: auto;
position: relative;
user-select: none;
}
.grid {
position: relative;
min-height: 100%;
}
/* Sticky header row */
.headerRow {
display: flex;
position: sticky;
top: 0;
z-index: 20;
background: white;
border-bottom: 2px solid #d1d5db;
}
.cornerCell {
flex-shrink: 0;
background: #f9fafb;
border-right: 2px solid #d1d5db;
border-bottom: 2px solid #d1d5db;
position: sticky;
left: 0;
z-index: 30;
}
.dateHeaderGroup {
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: stretch;
border-right: 2px solid #d1d5db;
background: white;
overflow: hidden;
}
.dateHeaderTop {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 2px;
flex: 1;
border-bottom: 1px solid #e5e7eb;
}
.dateHeaderAmPm {
display: flex;
height: 22px;
flex-shrink: 0;
}
.periodLabel {
flex: 1;
display: flex;
align-items: center;
justify-content: center;
font-size: 9px;
font-weight: 500;
color: #9ca3af;
letter-spacing: 0.03em;
}
.periodLabel:first-child {
border-right: 1px solid #f0f0f0;
}
.dateHeader {
flex-shrink: 0;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
border-right: 1px solid #e5e7eb;
gap: 2px;
background: white;
}
.todayHeader {
background: #eff6ff;
}
.weekendHeader {
background: #fafafa;
}
.dateDay {
font-size: 16px;
font-weight: 700;
color: #111827;
line-height: 1;
}
.dateDow {
font-size: 11px;
color: #6b7280;
line-height: 1;
}
.weekendDow {
color: #ef4444;
}
/* Car rows */
.carRow {
display: flex;
border-bottom: 1px solid #e5e7eb;
position: relative;
}
.carRow:hover .cellArea {
background: #fafafa;
}
.carLabel {
flex-shrink: 0;
display: flex;
align-items: flex-start;
gap: 8px;
padding: 6px 12px;
border-right: 2px solid #d1d5db;
background: white;
position: sticky;
left: 0;
z-index: 10;
box-shadow: 2px 0 4px rgba(0,0,0,0.04);
}
.carDot {
width: 10px;
height: 10px;
border-radius: 50%;
flex-shrink: 0;
align-self: center;
}
.carLabelContent {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 0;
flex: 1;
}
.carName {
font-size: 13px;
font-weight: 600;
color: #374151;
width: 100%;
white-space: normal;
overflow-wrap: anywhere;
word-break: break-word;
line-height: 1.2;
}
.carBadges {
display: flex;
gap: 4px;
flex-wrap: nowrap;
}
.badgeEtc {
background: #7c3aed;
color: #fff;
font-size: 10px;
font-weight: 700;
padding: 1px 5px;
border-radius: 4px;
white-space: nowrap;
letter-spacing: 0.03em;
}
.badgeStudless {
background: #0ea5e9;
color: #fff;
font-size: 10px;
font-weight: 700;
padding: 1px 5px;
border-radius: 4px;
white-space: nowrap;
letter-spacing: 0.03em;
}
.badgeWarn {
background: #d97706;
color: #fff;
font-size: 10px;
font-weight: 700;
padding: 1px 5px;
border-radius: 4px;
white-space: nowrap;
letter-spacing: 0.03em;
cursor: default;
}
.badgeWarnWide {
display: flex;
width: 108%;
justify-content: center;
box-sizing: border-box;
}
/* Cell area */
.cellArea {
display: flex;
position: relative;
flex-shrink: 0;
}
.cell {
flex-shrink: 0;
border-right: 1px solid #f0f0f0;
cursor: crosshair;
transition: background 0.1s;
}
.cellTouch {
cursor: pointer;
}
.cell:hover {
background: rgba(26, 86, 219, 0.04);
}
.cellDayEnd {
border-right: 1px solid #d1d5db;
}
.todayCell {
background: rgba(59, 130, 246, 0.06);
}
.weekendCell {
background: rgba(0,0,0,0.015);
}
/* Highlight while dragging to create */
.creatingHighlight {
position: absolute;
border-radius: 6px;
background: rgba(26, 86, 219, 0.2);
border: 2px dashed #1a56db;
pointer-events: none;
z-index: 5;
}
/* Reservation block */
.reservationBlock {
position: absolute;
border-radius: 6px;
border: 1.5px solid;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: center;
padding: 2px 8px;
z-index: 6;
transition: box-shadow 0.1s;
min-width: 0;
}
.reservationBlock:hover {
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
z-index: 7;
}
.blockText {
font-size: 12px;
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.3;
}
.blockDates {
font-size: 10px;
opacity: 0.75;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 1.2;
}
.noCars {
padding: 40px 20px;
text-align: center;
color: #6b7280;
font-size: 14px;
}
/* Right-click context menu */
.contextMenu {
position: fixed;
background: white;
border: 1px solid #d1d5db;
border-radius: 8px;
box-shadow: 0 4px 16px rgba(0,0,0,0.15);
z-index: 1000;
min-width: 140px;
overflow: hidden;
padding: 4px 0;
}
.contextMenuItem {
display: block;
width: 100%;
text-align: left;
background: none;
border: none;
padding: 9px 16px;
font-size: 13px;
color: #374151;
cursor: pointer;
transition: background 0.1s;
}
.contextMenuItem:hover {
background: #f3f4f6;
}
.contextMenuItemDelete {
color: #dc2626;
}
.contextMenuItemDelete:hover {
background: #fee2e2;
}