Files
Aberwyn/Aberwyn/wwwroot/css/site.css
Elias Jansson 8ebbb803e8
All checks were successful
continuous-integration/drone/push Build is passing
Meal rating and some fixes to meals
2025-07-07 15:22:12 +02:00

468 lines
9.6 KiB
CSS
Raw Blame History

/* ==========================================================================
HEADER LEWEL DESIGN (utan meny)
========================================================================== */
.top-bar {
display: flex;
justify-content: space-between;
align-items: flex-end;
background: linear-gradient(to right, #1F2C3C, #2E3C4F);
padding: 0 16px 0;
border-bottom: 2px solid #394B5A;
position: sticky;
top: 0;
z-index: 1000;
box-shadow: 0 2px 8px rgba(0,0,0,0.4);
height: 54px;
}
.header-left {
display: flex;
align-items: flex-end;
height: 100%;
}
.family-header {
display: flex;
align-items: baseline;
margin: 0;
padding: 0;
line-height: 1;
font-size: 2em;
letter-spacing: -0.5px;
font-family: 'Segoe UI', sans-serif;
font-weight: 600;
text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}
.family-header span {
margin: 0;
padding: 0;
display: inline-block;
line-height: 1;
}
.initial {
font-weight: 700;
font-size: 1.4em;
}
.name {
font-size: 0.45em;
color: #f7f7f7;
opacity: 0.95;
}
.initial.L {
color: #ff3333;
}
.initial.E {
color: #ff9900;
}
.initial.W {
color: #ffd700;
}
.initial.E2 {
color: #00cc66;
}
.initial.L2 {
color: #3399ff;
}
.auth-links {
position: relative;
}
.auth-menu {
position: relative;
}
.auth-icon-button {
background: none;
border: none;
color: #ffffff;
font-size: 20px;
cursor: pointer;
padding: 6px;
transition: opacity 0.2s;
}
.auth-icon-button:hover {
opacity: 0.85;
}
.auth-dropdown {
position: absolute;
top: 36px;
right: 0;
background-color: #ffffff;
border-radius: 6px;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
min-width: 160px;
display: none;
flex-direction: column;
z-index: 1001;
}
.auth-dropdown a i {
margin-right: 6px;
}
.auth-dropdown a {
padding: 8px 12px;
color: #1F2C3C;
text-decoration: none;
font-size: 13px;
border-bottom: 1px solid #eee;
}
.auth-dropdown a:last-child {
border-bottom: none;
}
.auth-dropdown a:hover {
background-color: #f0f0f0;
}
.auth-menu.open .auth-dropdown {
display: flex;
}
/* ==========================================================================
LAYOUT <20> OMBYGGD STRUKTUR
========================================================================== */
body {
background-color: #1F2C3C;
color: #D0DCE4;
font-family: 'Segoe UI', sans-serif;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
min-height: 100vh;
font-size: 15px;
line-height: 1.5;
}
.page-content {
display: flex;
flex-direction: column;
flex-grow: 1;
background-color: #223344;
width: 100%; /* force full width */
max-width: unset;
position: relative;
z-index: 0;
overflow: visible !important;
}
.main-panel {
flex: 1;
background: linear-gradient(to bottom right, #f9fafb, #e2e8f0);
border-radius: 0 0 10px 10px;
overflow: visible;
padding: 0px;
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
display: flex;
flex-direction: column;
gap: 16px;
color: #2C3E50;
font-size: 16px;
line-height: 1.7;
margin-top: 0;
position: static !important;
z-index: auto !important;
}
/* ==========================================================================
NAVIGATIONSLISTA <20> KOMPAKT STIL
========================================================================== */
/*.sidebar {
width: 155px;
background-color: #f9f9f9;
border-radius: 8px;
padding: 4px;
box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}
.nav-list {
list-style: none;
padding: 0;
margin: 0;
display: flex;
flex-direction: column;
gap: 0;
}
.nav-list a {
text-decoration: none;
color: #1F2C3C;
font-weight: 500;
display: flex;
align-items: center;
gap: 6px;
padding: 4px 6px;
border-radius: 4px;
font-size: 13px;
transition: background-color 0.2s;
line-height: 1.3;
}
.nav-list a:hover {
background-color: #e0e0e0;
}
.nav-list i {
font-size: 0.9em;
width: 14px;
text-align: center;
}
*/
.main-nav {
position: sticky;
top: 54px;
left: 0;
right: 0;
z-index: 1000;
background-color: #f3f4f6;
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
padding: 5px 8px;
font-size: 13px;
overflow-x: auto;
overflow-y: visible;
overflow: visible !important;
-webkit-overflow-scrolling: touch;
}
@media (min-width: 769px) {
.nav-list-horizontal {
overflow: visible;
}
}
.nav-list-horizontal {
display: flex;
flex-wrap: nowrap;
gap: 5px;
margin: 5px 0 0 0;
padding: 0;
list-style: none;
white-space: nowrap;
position: relative;
z-index: 1;
overflow-y: visible;
-webkit-overflow-scrolling: touch;
}
.nav-list-horizontal > li {
position: relative;
}
.nav-list-horizontal li a {
text-decoration: none;
color: #1F2C3C;
padding: 0px 5px;
border-radius: 4px;
font-weight: 500;
font-size: 14px;
display: flex;
align-items: center;
gap: 5px;
transition: background-color 0.2s;
}
.nav-list-horizontal li a:hover {
background-color: #e5e7eb;
}
/* ==========================================================================
RESPONSIVT
========================================================================== */
/* ==========================================================================
Dropdown
========================================================================== */
.dropdown {
position: relative;
}
.dropdown-toggle {
font-family: inherit;
font-size: 14px;
font-weight: 500;
color: #1F2C3C;
padding: 0px 5px;
border: none;
background: none;
display: flex;
align-items: center;
gap: 5px;
cursor: pointer;
border-radius: 4px;
transition: background-color 0.2s;
height: 100%; /* viktigt för vertikal alignment */
user-select: none;
touch-action: manipulation;
-webkit-tap-highlight-color: transparent;
}
.dropdown-toggle:hover {
background-color: #e5e7eb;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
transform: translateY(4px);
background-color: #ffffff;
border: 1px solid #ccc;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
border-radius: 8px;
display: none;
flex-direction: column;
min-width: 180px;
z-index: 1001;
padding: 4px 0;
font-size: 14px;
max-width: 90vw;
}
.dropdown.open .dropdown-menu {
display: flex;
}
.dropdown-menu li {
list-style: none;
}
.dropdown-menu li a {
padding: 8px 12px;
font-size: 13px;
color: #1F2C3C;
text-decoration: none;
display: block;
}
.dropdown-menu li a:hover {
background-color: #f0f0f0;
}
@media (max-width: 768px) {
html, body {
overflow-x: hidden;
overscroll-behavior-x: contain;
}
.main-panel {
position: relative !important;
z-index: 1 !important;
}
.main-nav {
position: sticky;
top: 0;
z-index: 1000;
overflow-x: auto;
overflow-y: visible;
-webkit-overflow-scrolling: touch;
background-color: #f3f4f6;
padding: 5px 8px;
box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.nav-list-horizontal {
display: flex;
overflow-x: auto;
overflow-y: hidden;
white-space: nowrap;
-webkit-overflow-scrolling: touch;
padding: 0;
margin: 0;
gap: 5px;
list-style: none;
}
.dropdown-menu {
position: fixed !important;
right: 12px;
background-color: #ffffff;
border: 1px solid #ccc;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.25);
border-radius: 8px;
display: none;
flex-direction: column;
padding: 4px 0;
font-size: 14px;
z-index: 99999;
width: max-content;
max-width: 90vw;
min-width: 160px; /* valfritt, för att undvika att det blir för smalt */
}
.dropdown.open .dropdown-menu {
display: flex !important;
}
.dropdown,
.auth-menu,
.auth-links {
position: relative;
z-index: 99998;
}
.dropdown-menu li {
list-style: none;
}
.dropdown-menu li a {
padding: 8px 12px;
color: #1F2C3C;
text-decoration: none;
font-size: 13px;
}
.dropdown-menu li a:hover {
background-color: #f0f0f0;
}
}
.btn-lewel {
background-color: #3399ff; /* blå accent */
color: white;
border: none;
padding: 0.5rem 1.2rem;
border-radius: 6px;
font-size: 1rem;
font-weight: 500;
text-decoration: none;
display: inline-block;
cursor: pointer;
transition: background-color 0.2s ease;
}
.btn-lewel:hover {
background-color: #2389e0;
}
.btn-lewel-outline {
background-color: transparent;
color: #3399ff;
border: 2px solid #3399ff;
padding: 0.5rem 1.2rem;
border-radius: 6px;
font-size: 1rem;
font-weight: 500;
text-decoration: none;
display: inline-block;
cursor: pointer;
transition: background-color 0.2s ease, color 0.2s ease;
}
.btn-lewel-outline:hover {
background-color: #e0f0ff;
color: #1F2C3C;
}