Files
kantinen-wrapper/style.css

1928 lines
39 KiB
CSS
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
:root {
/* Premium Slate/Gray-Blue Palette - Light Mode */
--bg-body: #f1f5f9;
/* Slate 100 */
--bg-card: #ffffff;
--text-primary: #334155;
/* Slate 700 */
--text-secondary: #64748b;
--accent-color: #2563eb;
/* Blue 600 visible accent, distinguishable from text */
--border-color: #cbd5e1;
/* Slate 300 */
--banner-bg: #e2e8f0;
--banner-text: #1e293b;
--success-color: #059669;
--error-color: #dc2626;
--card-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.05), 0 2px 4px -2px rgb(0 0 0 / 0.05);
/* Reduced opacity for visible glassmorphism blur effect */
--header-bg: rgba(255, 255, 255, 0.72);
--header-border: 1px solid rgba(203, 213, 225, 0.6);
}
[data-theme="dark"] {
/* Premium Slate/Gray-Blue Palette - Dark Mode */
--bg-body: #1e293b;
/* Deep Slate Gray (Requested) */
--bg-card: #283548;
/* Darker than Slate 700 → more layer contrast vs bg-body */
--text-primary: #f8fafc;
/* Slate 50 */
--text-secondary: #cbd5e1;
/* Slate 300 */
--accent-color: #60a5fa;
/* Blue 400 */
--border-color: #526377;
/* Slightly lighter → visible border on darker card bg */
--banner-bg: #475569;
--banner-text: #e2e8f0;
/* Reduced opacity for visible glassmorphism blur effect */
--header-bg: rgba(30, 41, 59, 0.72);
--header-border: 1px solid rgba(71, 85, 105, 0.6);
--card-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.4);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Inter', system-ui, -apple-system, sans-serif;
background-color: var(--bg-body);
color: var(--text-primary);
transition: background-color 0.3s ease, color 0.3s ease;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
/* Fix scrolling bug: Reset html/body styles from host page */
/* IMPORTANT: html must NOT have overflow set, or it creates a scroll container that breaks position: sticky */
html {
height: auto !important;
min-height: 100% !important;
overflow: visible !important;
position: static !important;
margin: 0 !important;
padding: 0 !important;
}
body {
height: auto !important;
min-height: 100% !important;
overflow-x: clip !important;
/* clip prevents horizontal overflow without breaking sticky */
overflow-y: visible !important;
position: static !important;
margin: 0 !important;
padding: 0 !important;
}
/* Header */
.app-header {
flex-shrink: 0;
z-index: 100;
backdrop-filter: blur(12px);
background-color: var(--header-bg);
border-bottom: var(--header-border);
padding: 1rem 0;
}
.header-content {
width: 100%;
/* Full width */
padding: 0 2rem;
/* Comfortable padding */
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
gap: 1rem;
}
.brand {
display: flex;
align-items: center;
gap: 0.75rem;
}
.brand-text {
display: flex;
flex-direction: column;
}
.brand h1 {
font-size: 1.25rem;
font-weight: 700;
letter-spacing: -0.025em;
margin-bottom: 0;
}
.subtitle {
font-size: 0.85rem;
color: var(--text-secondary);
font-weight: 400;
margin-left: 2px;
}
.logo-icon {
font-size: 1.5rem;
color: var(--accent-color);
}
/* Controls */
.controls {
display: flex;
align-items: center;
gap: 1.5rem;
justify-self: end;
}
/* Header Week Info (centered) */
.header-week-info {
text-align: center;
line-height: 1.3;
}
.header-center-wrapper {
display: flex;
flex-direction: row;
align-items: center;
gap: 1.5rem;
justify-content: center;
}
.header-week-title {
font-size: 1.1rem;
font-weight: 600;
color: var(--text-primary);
}
.header-week-subtitle {
font-size: 0.85rem;
color: var(--text-secondary);
}
/* Language Toggle (FR-100) */
.lang-toggle {
display: inline-flex;
gap: 0;
border-radius: 6px;
overflow: hidden;
border: 1px solid var(--border-color);
background: var(--bg-card);
}
.lang-btn {
padding: 3px 10px;
font-size: 0.7rem;
font-weight: 600;
letter-spacing: 0.03em;
background: transparent;
color: var(--text-secondary);
border: none;
cursor: pointer;
transition: all 0.2s;
}
.lang-btn:hover {
color: var(--text-primary);
background: rgba(100, 116, 139, 0.1);
}
.lang-btn.active {
background: var(--accent-color);
color: white;
}
.nav-group {
display: flex;
background-color: var(--bg-card);
border: 1px solid var(--border-color);
padding: 0.25rem;
border-radius: 8px;
}
.nav-btn {
background: none;
border: none;
padding: 0.5rem 1rem;
font-size: 0.875rem;
font-weight: 500;
color: var(--text-secondary);
cursor: pointer;
border-radius: 6px;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 0.5rem;
}
.nav-btn:hover {
color: var(--text-primary);
background-color: rgba(100, 116, 139, 0.1);
}
.nav-btn.active {
background-color: var(--accent-color);
color: white;
}
/* Notification state for Next Week */
.nav-btn.new-week-available {
animation: goldPulse 2s infinite;
border-color: #f59e0b;
color: var(--accent-color);
}
.nav-btn.new-week-available.active {
color: white;
}
@keyframes goldPulse {
0% {
box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
}
70% {
box-shadow: 0 0 0 10px rgba(245, 158, 11, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
}
}
/* Badge for nav buttons (day count indicator) */
.nav-badge {
background-color: var(--error-color);
color: white;
font-size: 0.75rem;
font-weight: 600;
padding: 0 6px;
border-radius: 10px;
min-width: 18px;
height: 18px;
display: inline-flex;
align-items: center;
justify-content: center;
margin-left: 8px;
gap: 3px;
line-height: 1;
}
.nav-badge .orderable {
color: #fff;
font-weight: 800;
}
.nav-badge .separator {
opacity: 0.6;
font-weight: 400;
}
.nav-badge .total {
opacity: 0.8;
font-weight: 400;
}
.nav-btn.active .nav-badge {
background: rgba(255, 255, 255, 0.3);
}
/* Primary style for Login Button to match header */
#btn-login-open {
background-color: var(--accent-color);
color: white;
padding: 0.5rem 1.25rem;
border-radius: 8px;
font-weight: 600;
letter-spacing: 0.025em;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
#btn-login-open:hover {
background-color: #334155;
/* Slightly lighter than slate-900 */
transform: translateY(-1px);
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
/* User Badge Button (Login) */
.user-badge-btn {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 12px;
background: var(--bg-card);
border: 1px solid var(--border-color);
border-radius: 20px;
font-size: 0.9rem;
font-weight: 500;
color: var(--text-primary);
cursor: pointer;
transition: all 0.2s;
}
.user-badge-btn:hover {
background: rgba(100, 116, 139, 0.1);
border-color: var(--accent-color);
}
.user-badge-btn .material-icons-round {
font-size: 1.25rem;
color: var(--accent-color);
}
.icon-btn {
background: none;
border: none;
color: var(--text-primary);
cursor: pointer;
padding: 0.5rem;
border-radius: 50%;
transition: background-color 0.2s;
display: flex;
align-items: center;
justify-content: center;
}
.icon-btn:hover {
background-color: rgba(100, 116, 139, 0.1);
}
/* Refresh button animation */
#btn-refresh.refreshing .material-icons-round,
#alarm-bell.refreshing .material-icons-round {
animation: rotate 1s linear infinite;
}
@keyframes rotate {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
/* Progress Modal */
.progress-container {
margin-bottom: 1.5rem;
}
.progress-bar {
width: 100%;
height: 8px;
background-color: var(--border-color);
border-radius: 4px;
overflow: hidden;
margin-bottom: 0.75rem;
}
.progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--accent-color) 0%, #60a5fa 100%);
width: 0%;
transition: width 0.3s ease;
border-radius: 4px;
}
.progress-percent {
text-align: center;
font-size: 1.5rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 0.5rem;
}
.progress-message {
text-align: center;
color: var(--text-secondary);
font-size: 0.9rem;
font-weight: 500;
}
/* Container - flex column, full width so child scrollbar is at edge */
.container {
flex: 1;
width: 100%;
overflow: hidden;
padding: 0 0 0 0;
/* Only top padding, no horizontal so child fills width */
display: flex;
flex-direction: column;
}
/* Add horizontal padding to direct children of container to maintain layout */
.container>*:not(.menu-grid) {
padding-left: 2rem;
padding-right: 2rem;
}
/* Banner */
.banner {
background-color: var(--banner-bg);
color: var(--banner-text);
padding: 0.75rem 1rem;
border-radius: 8px;
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 2rem;
font-size: 0.875rem;
font-weight: 500;
border: 1px solid var(--border-color);
max-width: fit-content;
}
/* User Badge */
.user-badge {
display: flex;
align-items: center;
gap: 8px;
padding: 6px 12px;
background: var(--bg-card);
/* Changed from --surface */
border: 1px solid var(--border-color);
/* Changed from --border */
border-radius: 20px;
font-size: 0.9rem;
font-weight: 500;
}
/* Language Toggle */
.lang-toggle-dropdown {
position: relative;
display: flex;
align-items: center;
}
#btn-lang-toggle {
padding: 0;
min-width: 42px;
}
.lang-dropdown-menu {
position: absolute;
top: calc(100% + 8px);
right: 0;
background: var(--bg-card);
backdrop-filter: blur(12px);
border: 1px solid var(--border-color);
border-radius: 12px;
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
z-index: 1001;
min-width: 120px;
padding: 8px;
display: flex;
flex-direction: column;
gap: 4px;
animation: modalSlide 0.2s ease-out;
}
.lang-dropdown-menu .lang-btn {
background: none;
border: none;
padding: 10px 14px;
border-radius: 8px;
color: var(--text-primary);
font-size: 0.9rem;
font-weight: 500;
cursor: pointer;
text-align: left;
transition: all 0.2s;
display: flex;
align-items: center;
gap: 8px;
white-space: nowrap;
}
.lang-dropdown-menu .lang-btn:hover {
background: rgba(59, 130, 246, 0.1);
color: var(--accent-color);
}
.lang-dropdown-menu .lang-btn.active {
background: rgba(59, 130, 246, 0.15);
color: var(--accent-color);
font-weight: 700;
}
.icon-btn-small {
background: none;
border: none;
padding: 4px;
cursor: pointer;
color: var(--text-secondary);
/* Changed from --text-muted */
display: flex;
align-items: center;
justify-content: center;
border-radius: 50%;
transition: all 0.2s;
}
.icon-btn-small:hover {
color: var(--error-color);
/* Changed from --danger */
background: rgba(239, 68, 68, 0.1);
}
/* Modal */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
backdrop-filter: blur(4px);
display: flex;
align-items: center;
justify-content: center;
z-index: 1000;
transition: all 0.3s;
}
.modal.hidden {
opacity: 0;
pointer-events: none;
}
.modal-content {
background: var(--bg-card);
width: 90%;
max-width: 400px;
border-radius: 16px;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
overflow: hidden;
animation: modalSlide 0.3s ease-out;
}
/* History Modal specific */
.history-modal-content {
max-width: 600px;
max-height: 85vh;
display: flex;
flex-direction: column;
}
.history-modal-content .modal-body {
overflow-y: auto;
padding: 0;
/* Padding is handled by inner elements */
}
/* History Styles */
.history-year-group {
margin-bottom: 16px;
}
.history-year-header {
background: var(--bg-card);
padding: 12px 20px;
margin: 0;
font-size: 1.2rem;
font-weight: 700;
color: var(--text-primary);
border-bottom: 2px solid var(--border-color);
position: sticky;
top: 0;
z-index: 12;
}
.history-month-group {
border-bottom: 1px solid var(--border-color);
}
.history-month-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 14px 20px;
margin: 0;
font-size: 1.05rem;
font-weight: 600;
color: var(--text-primary);
background: var(--bg-body);
cursor: pointer;
transition: background 0.2s;
}
.history-month-header:hover {
background: var(--border-color);
/* Slight hover effect */
}
.history-month-summary {
display: flex;
align-items: center;
gap: 12px;
font-size: 0.95rem;
color: var(--text-secondary);
}
.history-month-content {
display: none;
/* Collapsed by default */
background: var(--bg-card);
}
.history-month-group.open .history-month-content {
display: block;
/* Expanded when open class is present */
}
.history-month-group.open .history-month-header .material-icons-round {
transform: rotate(180deg);
}
.history-month-header .material-icons-round {
transition: transform 0.3s;
font-size: 20px;
}
.history-week-group {
padding: 12px 20px;
border-bottom: 1px dashed var(--border-color);
}
.history-week-group:last-child {
border-bottom: none;
}
.history-week-header {
display: flex;
justify-content: space-between;
align-items: center;
font-size: 0.9rem;
font-weight: 600;
color: var(--text-secondary);
margin-bottom: 10px;
}
.history-week-summary {
font-size: 0.85rem;
font-weight: 500;
background: rgba(100, 116, 139, 0.1);
padding: 4px 10px;
border-radius: 12px;
}
.history-items {
display: flex;
flex-direction: column;
gap: 8px;
}
.history-item {
display: grid;
grid-template-columns: 50px 1fr auto;
align-items: center;
gap: 12px;
padding: 10px 12px;
background: var(--bg-body);
border-radius: 8px;
border: 1px solid var(--border-color);
}
.history-item-date {
font-size: 0.85rem;
color: var(--text-secondary);
font-weight: 500;
}
.history-item-details {
display: flex;
flex-direction: column;
gap: 4px;
}
.history-item-name {
font-size: 0.95rem;
font-weight: 500;
color: var(--text-primary);
}
.history-item-price {
font-weight: 600;
color: var(--text-primary);
}
.history-item-status {
font-size: 0.8rem;
font-weight: 600;
color: var(--text-primary);
text-transform: uppercase;
letter-spacing: 0.5px;
}
.history-item-cancelled {
opacity: 0.5;
filter: grayscale(1);
}
.history-item-price-cancelled {
text-decoration: line-through;
color: var(--text-secondary);
}
@keyframes modalSlide {
from {
transform: translateY(20px);
opacity: 0;
}
to {
transform: translateY(0);
opacity: 1;
}
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 20px;
border-bottom: 1px solid var(--border-color);
}
.modal-header h2 {
margin: 0;
font-size: 1.25rem;
}
.modal-body {
padding: 20px;
}
#login-form {
padding: 20px;
}
.form-group {
margin-bottom: 20px;
}
.form-group label {
display: block;
margin-bottom: 6px;
font-weight: 500;
font-size: 0.9rem;
}
.form-group input {
width: 100%;
padding: 10px 12px;
border: 1px solid var(--border-color);
/* Changed from --border */
border-radius: 8px;
background: var(--bg-body);
/* Changed from --bg */
color: var(--text-primary);
/* Changed from --text */
font-family: inherit;
transition: border-color 0.2s;
}
.form-group input:focus {
outline: none;
border-color: var(--accent-color);
/* Changed from --primary */
}
.help-text {
display: block;
margin-top: 4px;
color: var(--text-secondary);
/* Changed from --text-muted */
font-size: 0.75rem;
}
.error-msg {
margin-bottom: 16px;
padding: 10px;
background: rgba(239, 68, 68, 0.1);
color: var(--error-color);
/* Changed from --danger */
border-radius: 8px;
font-size: 0.85rem;
text-align: center;
}
.modal-actions {
margin-top: 24px;
}
.btn-primary.wide {
width: 100%;
justify-content: center;
}
.hidden {
display: none !important;
}
/* Menu Grid Container */
.menu-grid {
display: flex;
flex-direction: column;
flex: 1;
overflow: hidden;
gap: 1rem;
}
.week-section {
margin-bottom: 2rem;
}
.week-header {
margin-bottom: 1.5rem;
border-bottom: 1px solid var(--border-color);
padding-bottom: 1rem;
text-align: center;
}
.week-title {
font-size: 1.75rem;
font-weight: 700;
color: var(--text-primary);
}
.week-range {
color: var(--text-secondary);
font-size: 0.9rem;
margin-top: 0.25rem;
}
/* Full-viewport layout: header + scrollable content + footer */
#kantine-wrapper {
display: flex;
flex-direction: column;
height: 100vh;
height: 100dvh;
/* Dynamic viewport height for mobile browsers */
overflow: hidden;
}
.days-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
gap: 0.5rem;
flex: 1;
overflow-y: auto;
/* This is the scroll container at the window edge */
align-content: start;
padding: 0 2rem 2rem 2rem;
}
/* Card */
.menu-card {
background-color: var(--bg-card);
border-radius: 12px;
border: 1px solid var(--border-color);
box-shadow: var(--card-shadow);
overflow: clip;
/* Clips scrolling content behind sticky header */
transition: box-shadow 0.2s ease;
display: flex;
flex-direction: column;
}
/* Past Day Styling - Target specific elements so ordered items can remain visible AND preserve sticky context */
/* We MUST apply filter/opacity to children, not the parent .menu-card, or else position: sticky breaks */
/* Header keeps fully opaque background to hide scrolling items, only grayscales */
.menu-card.past-day .card-header {
filter: grayscale(0.8);
transition: filter 0.3s;
}
/* Items become semi-transparent */
.menu-card.past-day .menu-item:not(.ordered) {
opacity: 0.6;
filter: grayscale(0.8);
transition: opacity 0.3s, filter 0.3s;
}
.menu-card.past-day:hover .card-header {
filter: grayscale(0.4);
}
.menu-card.past-day:hover .menu-item:not(.ordered) {
opacity: 0.8;
filter: grayscale(0.4);
}
/* Past ordered items get no special frame or shadow, but remain visually distinct by staying fully opaque (via the :not(.ordered) selector above) */
.menu-item.today-ordered {
border: 2px solid #8b5cf6;
box-shadow: 0 0 30px rgba(139, 92, 246, 0.6);
border-radius: 8px;
padding: 1rem;
margin: 0;
display: flex;
flex-direction: column;
background: var(--bg-card);
position: relative;
z-index: 5;
animation: pulse-glow-strong 3s infinite;
}
@keyframes pulse-glow-strong {
0% {
box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}
50% {
box-shadow: 0 0 40px rgba(139, 92, 246, 0.8);
}
100% {
box-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}
}
.menu-card:hover {
box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}
.card-header {
padding: 1rem 1.25rem;
border-bottom: 1px solid var(--border-color);
display: flex;
justify-content: space-between;
align-items: baseline;
background-color: var(--bg-card);
/* Removed border-radius: 12px 12px 0 0;
.menu-card's overflow: clip will round the corners initially.
When sticky at the top, it will be square and perfectly hide scrolling content! */
/* Sticky within .container scroll area */
position: sticky;
top: 0;
z-index: 90;
}
.card-body {
padding: 1.25rem;
display: grid;
grid-template-columns: 1fr;
row-gap: 1.5rem;
align-content: start;
}
.day-name {
font-size: 1.125rem;
font-weight: 600;
}
.day-date {
font-size: 0.8rem;
font-weight: 400;
color: var(--text-secondary);
opacity: 0.75;
/* Visually subordinate to day-name */
}
.empty-state {
color: var(--text-secondary);
font-style: italic;
text-align: center;
padding: 1rem;
}
/* Menu Items */
.menu-item {
/* Spacing now handled by .card-body grid gap */
display: flex;
flex-direction: column;
/* Subtle separator between items */
border-bottom: 1px solid var(--border-color);
padding-bottom: 0.25rem;
}
.menu-item:last-child {
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
}
.item-header {
display: flex;
justify-content: space-between;
align-items: flex-start;
margin-bottom: 0.5rem;
gap: 1rem;
}
.item-name {
font-weight: 600;
color: var(--text-primary);
font-size: 0.95rem;
/* Slightly smaller to reduce visual competition with day header */
}
.item-price {
font-weight: 700;
color: var(--accent-color);
white-space: nowrap;
}
.item-desc {
font-size: 0.875rem;
color: var(--text-secondary);
line-height: 1.5;
/* Consistent with body line-height */
margin-bottom: 0.75rem;
white-space: pre-wrap;
}
.badges {
display: flex;
gap: 0.5rem;
margin-left: auto;
flex-wrap: wrap;
}
.item-status-row {
display: flex;
align-items: center;
gap: 0.5rem;
margin-bottom: 0.75rem;
flex-wrap: wrap;
}
.badge {
display: inline-flex;
align-items: center;
justify-content: center;
height: 24px;
font-size: 0.75rem;
padding: 0 10px;
border-radius: 6px;
/* Unified radius matching buttons and tag-badge-small */
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
line-height: normal;
white-space: nowrap;
}
.badge.available {
background-color: rgba(16, 185, 129, 0.1);
/* Emerald 500 / 10% */
color: var(--success-color);
border: 1px solid rgba(16, 185, 129, 0.2);
}
.badge.sold-out {
background-color: rgba(239, 68, 68, 0.1);
/* Red 500 / 10% */
color: var(--error-color);
border: 1px solid rgba(239, 68, 68, 0.2);
}
.badge.ordered {
background-color: rgba(139, 92, 246, 0.1);
/* Violet 500 / 10% */
color: #8b5cf6;
border: 1px solid rgba(139, 92, 246, 0.2);
gap: 4px;
}
.badge.ordered .material-icons-round {
font-size: 1rem;
}
/* Loading */
.loading-state {
text-align: center;
padding: 4rem;
color: var(--text-secondary);
}
.spinner {
width: 40px;
height: 40px;
border: 3px solid var(--border-color);
border-top-color: var(--accent-color);
border-radius: 50%;
margin: 0 auto 1rem;
animation: spin 1s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Footer */
.app-footer {
flex-shrink: 0;
text-align: center;
padding: 0.4rem 2rem;
color: var(--text-secondary);
font-size: 0.8rem;
border-top: 1px solid var(--border-color);
}
/* === Order / Cancel Buttons (inline in status row) === */
.btn-order {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 4px 10px;
border: none;
border-radius: 6px;
background: var(--success-color);
color: white;
font-size: 0.75rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
font-family: inherit;
}
.btn-order .material-icons-round {
font-size: 16px;
}
.btn-order:hover:not(:disabled) {
filter: brightness(1.15);
transform: translateY(-1px);
}
.btn-order:active:not(:disabled) {
transform: scale(0.97);
filter: brightness(0.95);
}
.btn-order:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.btn-order.loading {
pointer-events: none;
opacity: 0.6;
}
.btn-order-compact {
padding: 2px 4px;
gap: 0;
}
.btn-order-compact .material-icons-round {
font-size: 16px;
}
.btn-cancel {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 4px 6px;
border: none;
border-radius: 6px;
background: var(--error-color);
color: white;
font-size: 0.75rem;
cursor: pointer;
transition: all 0.2s ease;
font-family: inherit;
}
.btn-cancel .material-icons-round {
font-size: 16px;
}
.btn-cancel:hover:not(:disabled) {
filter: brightness(1.15);
transform: translateY(-1px);
}
.btn-cancel:active:not(:disabled) {
transform: scale(0.97);
filter: brightness(0.95);
}
.btn-cancel:disabled {
opacity: 0.5;
cursor: not-allowed;
}
/* Past days: hide action buttons */
.past-day .item-actions {
display: none;
}
/* Order count badge (for multi-orders) */
.order-count-badge {
display: inline-flex;
align-items: center;
justify-content: center;
background: rgba(255, 255, 255, 0.3);
color: white;
font-size: 0.65rem;
font-weight: 700;
min-width: 16px;
height: 16px;
padding: 0 4px;
border-radius: 8px;
margin-left: 4px;
line-height: 1;
}
/* === Toast Notifications === */
#toast-container {
position: fixed;
bottom: 20px;
right: 20px;
z-index: 10000;
display: flex;
flex-direction: column;
gap: 8px;
pointer-events: none;
}
.toast {
display: flex;
align-items: center;
gap: 8px;
padding: 10px 16px;
border-radius: 8px;
font-size: 0.85rem;
font-weight: 500;
font-family: 'Inter', sans-serif;
color: white;
backdrop-filter: blur(10px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
pointer-events: auto;
transform: translateX(120%);
opacity: 0;
transition: transform 0.3s ease, opacity 0.3s ease;
}
.toast.show {
transform: translateX(0);
opacity: 1;
}
.toast .material-icons-round {
font-size: 18px;
}
.toast-success {
background: rgba(5, 150, 105, 0.95);
}
.toast-error {
background: rgba(220, 38, 38, 0.95);
}
.toast-info {
background: rgba(59, 130, 246, 0.95);
}
/* === Mobile Responsiveness === */
/* 768px covers tablets (e.g. iPad Mini); 600px was too narrow-only */
@media (max-width: 768px) {
.header-content {
display: grid;
/* Ensure grid is active, prevents flex-only fallback */
grid-template-columns: 1fr;
gap: 1rem;
padding: 0.75rem;
}
.week-nav {
width: 100%;
justify-content: center;
}
.nav-pills {
width: 100%;
justify-content: space-between;
}
.nav-btn {
flex: 1;
justify-content: center;
padding: 0.5rem;
font-size: 0.85rem;
}
.days-grid {
display: grid;
/* Explicit grid declaration to prevent flex-context override */
grid-template-columns: 1fr;
}
.main-content {
padding: 1rem;
}
.week-title {
font-size: 1.5rem;
}
/* Adjust toast position for mobile */
.toast-container {
bottom: 1rem;
right: 1rem;
left: 1rem;
/* Center on mobile */
width: auto;
}
.menu-card {
margin-bottom: 1rem;
}
}
/* Tighter layout for high column counts (e.g., 5-day landscape) */
@media (min-width: 1024px) {
.card-body {
padding: 1rem 0.75rem;
}
.item-header {
gap: 0.5rem;
}
}
/* === Accessibility: Respect prefers-reduced-motion === */
@media (prefers-reduced-motion: reduce) {
/* Disable all decorative pulse/glow animations */
.menu-item.today-ordered,
.menu-item.flagged-sold-out,
.menu-item.flagged-available,
.menu-item.highlight-glow,
.nav-btn.new-week-available,
.update-icon,
#order-countdown.urgent {
animation: none;
}
/* Keep functional animations (modal slide, spinner) */
.toast {
transition: none;
}
}
/* === Focus Visibility (A11y: Keyboard Navigation) === */
:focus-visible {
outline: 2px solid var(--accent-color);
outline-offset: 2px;
border-radius: 4px;
}
/* === Flagging & Notification Styles === */
.btn-flag {
display: inline-flex;
align-items: center;
justify-content: center;
background: transparent;
border: 1px solid var(--text-secondary);
color: var(--text-secondary);
border-radius: 6px;
padding: 4px;
cursor: pointer;
transition: all 0.2s;
margin-right: 0.5rem;
width: 28px;
height: 28px;
}
.btn-flag:hover {
background: rgba(234, 179, 8, 0.1);
/* Yellow-500 / 10% */
color: #eab308;
border-color: #eab308;
}
.btn-flag.active {
background: rgba(234, 179, 8, 0.1);
color: #eab308;
border-color: #eab308;
}
.btn-flag:active {
transform: scale(0.97);
}
.btn-flag .material-icons-round {
font-size: 1.1rem;
}
/* Flagged & Sold Out (Yellow Glow) */
.menu-item.flagged-sold-out {
border: 1px solid #eab308;
box-shadow: 0 0 10px rgba(234, 179, 8, 0.2);
border-radius: 8px;
padding: 1rem;
margin: 0;
display: flex;
flex-direction: column;
background: var(--bg-card);
position: relative;
z-index: 5;
animation: yellow-pulse 3s infinite;
}
@keyframes yellow-pulse {
0% {
box-shadow: 0 0 8px rgba(234, 179, 8, 0.2);
}
50% {
box-shadow: 0 0 16px rgba(234, 179, 8, 0.5);
}
100% {
box-shadow: 0 0 8px rgba(234, 179, 8, 0.2);
}
}
/* Flagged & Available (Green Glow) */
.menu-item.flagged-available {
border: 2px solid var(--success-color);
box-shadow: 0 0 15px rgba(16, 185, 129, 0.3);
border-radius: 8px;
padding: 1rem;
margin: 0;
display: flex;
flex-direction: column;
background: var(--bg-card);
position: relative;
z-index: 5;
animation: green-pulse 3s infinite;
}
@keyframes green-pulse {
0% {
box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}
50% {
box-shadow: 0 0 20px rgba(16, 185, 129, 0.6);
}
100% {
box-shadow: 0 0 10px rgba(16, 185, 129, 0.3);
}
}
/* Day Header Badges */
.day-header-left {
display: flex;
align-items: center;
gap: 0.75rem;
}
.menu-code-badge {
font-size: 0.75rem;
font-weight: 700;
color: #8b5cf6;
/* Violet 500 */
background-color: rgba(139, 92, 246, 0.15);
border: 1px solid rgba(139, 92, 246, 0.3);
padding: 2px 6px;
border-radius: 6px;
line-height: normal;
display: inline-block;
}
/* Detailed Badge Colors */
.nav-badge.badge-violet {
background-color: #8b5cf6;
}
.nav-badge.badge-green {
background-color: var(--success-color);
}
.nav-badge.badge-red {
background-color: var(--error-color);
}
.nav-badge.badge-blue {
background-color: var(--accent-color);
}
/* Day Header Status Colors (User Request) */
.card-header.header-violet {
background-color: var(--bg-card);
background-image: linear-gradient(rgba(139, 92, 246, 0.15), rgba(139, 92, 246, 0.15));
border-bottom: 2px solid #8b5cf6;
}
.card-header.header-green {
background-color: var(--bg-card);
background-image: linear-gradient(rgba(16, 185, 129, 0.15), rgba(16, 185, 129, 0.15));
border-bottom: 2px solid var(--success-color);
}
.card-header.header-red {
background-color: var(--bg-card);
background-image: linear-gradient(rgba(239, 68, 68, 0.15), rgba(239, 68, 68, 0.15));
border-bottom: 2px solid var(--error-color);
}
.card-header.header-violet .day-name,
.card-header.header-green .day-name,
.card-header.header-red .day-name {
font-weight: 700;
color: var(--text-primary);
/* Ensure text remains standard color */
}
/* Update Icon */
.update-icon {
display: inline-flex;
align-items: center;
justify-content: center;
margin-left: 8px;
background-color: rgba(16, 185, 129, 0.2);
/* Green tint */
color: var(--success-color);
border-radius: 50%;
width: 24px;
height: 24px;
cursor: pointer;
font-size: 14px;
transition: all 0.2s;
text-decoration: none;
animation: pulse 2s infinite;
}
.update-icon:hover {
background-color: var(--success-color);
color: white;
transform: scale(1.1);
}
@keyframes pulse {
0% {
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4);
}
70% {
box-shadow: 0 0 0 6px rgba(16, 185, 129, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
}
}
/* Order Countdown */
#order-countdown {
background: rgba(255, 255, 255, 0.1);
padding: 0.25rem 0.75rem;
border-radius: 99px;
font-size: 0.85rem;
display: flex;
align-items: center;
gap: 0.5rem;
white-space: nowrap;
border: 1px solid var(--border-color);
}
#order-countdown span {
opacity: 0.7;
font-size: 0.75rem;
text-transform: uppercase;
letter-spacing: 0.5px;
}
#order-countdown.urgent {
background: rgba(239, 68, 68, 0.2);
border-color: rgba(239, 68, 68, 0.5);
color: #ef4444;
animation: pulse-red 2s infinite;
}
@keyframes pulse-red {
0% {
box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
}
70% {
box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
}
100% {
box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
}
}
/* Smart Highlights (Blue Glow - matches today-ordered/flagged pattern) */
.menu-item.highlight-glow {
border: 2px solid rgba(59, 130, 246, 0.7);
box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
border-radius: 8px;
padding: 1rem;
margin: 0;
display: flex;
flex-direction: column;
background: var(--bg-card);
position: relative;
z-index: 5;
animation: blue-pulse 3s infinite;
}
@keyframes blue-pulse {
0% {
box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}
50% {
box-shadow: 0 0 25px rgba(59, 130, 246, 0.6);
}
100% {
box-shadow: 0 0 15px rgba(59, 130, 246, 0.3);
}
}
/* Nav Badge with Count */
.nav-badge.has-highlights {
background-color: var(--bg-card);
/* Neutral background */
color: var(--text-primary);
border: 1px solid var(--border-color);
padding: 2px 6px;
}
.nav-badge .highlight-count {
color: #3b82f6;
/* Blue 500 */
font-weight: 700;
margin-left: 4px;
}
/* Tag Management Modal */
#tags-list {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 1rem;
min-height: 50px;
}
/* Tag badges styled consistently with .badge (verfügbar/ausverkauft) */
.tag-badge {
display: inline-flex;
align-items: center;
justify-content: center;
height: 24px;
font-size: 0.75rem;
padding: 0 10px;
border-radius: 4px;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
line-height: normal;
white-space: nowrap;
background-color: rgba(59, 130, 246, 0.1);
color: #3b82f6;
border: 1px solid rgba(59, 130, 246, 0.2);
gap: 4px;
}
.tag-remove {
cursor: pointer;
opacity: 0.7;
font-size: 1.1em;
line-height: 1;
transition: all 0.2s;
}
.tag-remove:hover {
opacity: 1;
color: #ef4444;
}
.input-group {
display: flex;
gap: 0.5rem;
}
.input-group input {
flex: 1;
padding: 0.75rem;
background: var(--bg-body);
border: 1px solid var(--border-color);
color: var(--text-primary);
border-radius: 8px;
font-family: inherit;
}
/* Add tag button - styled like .btn-order with nav-btn.active color */
#btn-add-tag {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 0.5rem 1rem;
border: none;
border-radius: 6px;
background: var(--accent-color);
color: white;
font-size: 0.8rem;
font-weight: 600;
cursor: pointer;
transition: all 0.2s ease;
font-family: inherit;
white-space: nowrap;
}
#btn-add-tag:hover {
filter: brightness(1.15);
transform: translateY(-1px);
}
.matched-tags {
display: flex;
flex-wrap: wrap;
gap: 6px;
margin-bottom: 8px;
/* Space between tags and title */
margin-top: -5px;
/* Pull closer to header */
}
.tag-badge-small {
display: inline-flex;
align-items: center;
font-size: 0.7rem;
padding: 2px 8px;
border-radius: 6px;
/* Unified with .badge and button border-radius */
background: rgba(59, 130, 246, 0.15);
color: #60a5fa;
border: 1px solid rgba(59, 130, 246, 0.3);
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.05em;
}
[data-theme="light"] .tag-badge-small {
background: rgba(37, 99, 235, 0.1);
color: #2563eb;
border: 1px solid rgba(37, 99, 235, 0.2);
}
/* Installer Changelog */
.changelog-container ul {
padding-left: 1.5rem;
margin: 0.5rem 0;
}
.changelog-container li {
margin-bottom: 0.4rem;
line-height: 1.5;
}
.changelog-container h3 {
margin-top: 1.5rem;
margin-bottom: 0.5rem;
font-size: 1.1em;
color: var(--accent-color);
}
/* === Version Menu === */
.version-tag {
cursor: pointer;
transition: opacity 0.2s ease, text-decoration 0.2s ease;
}
.version-tag:hover {
opacity: 1 !important;
text-decoration: underline;
}
.version-list {
list-style: none;
padding: 0;
margin: 0;
}
.version-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 10px 14px;
border-radius: 8px;
margin-bottom: 4px;
transition: background 0.2s;
}
.version-item:hover {
background: rgba(100, 116, 139, 0.08);
}
.version-item.current {
background: rgba(2, 154, 168, 0.1);
border: 1px solid rgba(2, 154, 168, 0.25);
}
[data-theme="dark"] .version-item:hover {
background: rgba(255, 255, 255, 0.05);
}
[data-theme="dark"] .version-item.current {
background: rgba(96, 165, 250, 0.12);
border: 1px solid rgba(96, 165, 250, 0.25);
}
.version-info {
display: flex;
align-items: center;
gap: 10px;
}
.badge-current {
font-size: 0.75rem;
font-weight: 600;
color: var(--success-color);
padding: 2px 8px;
border-radius: 4px;
background: rgba(5, 150, 105, 0.1);
}
.badge-new {
font-size: 0.75rem;
font-weight: 600;
color: #029aa8;
padding: 2px 8px;
border-radius: 4px;
background: rgba(2, 154, 168, 0.1);
}
[data-theme="dark"] .badge-new {
color: #60a5fa;
background: rgba(96, 165, 250, 0.12);
}
.install-link {
font-size: 0.8rem;
font-weight: 500;
padding: 4px 12px;
border-radius: 6px;
background: rgba(2, 154, 168, 0.1);
color: #029aa8;
text-decoration: none;
border: 1px solid rgba(2, 154, 168, 0.25);
transition: all 0.2s;
white-space: nowrap;
}
.install-link:hover {
background: rgba(2, 154, 168, 0.2);
border-color: rgba(2, 154, 168, 0.4);
}
[data-theme="dark"] .install-link {
color: #60a5fa;
background: rgba(96, 165, 250, 0.12);
border: 1px solid rgba(96, 165, 250, 0.25);
}
[data-theme="dark"] .install-link:hover {
background: rgba(96, 165, 250, 0.2);
border-color: rgba(96, 165, 250, 0.4);
}
.dev-toggle {
padding: 10px 14px;
border-radius: 8px;
background: rgba(100, 116, 139, 0.05);
border: 1px solid var(--border-color);
}
.dev-toggle input[type="checkbox"] {
accent-color: #029aa8;
width: 16px;
height: 16px;
}
[data-theme="dark"] .dev-toggle input[type="checkbox"] {
accent-color: #60a5fa;
}