Roesstad/style.css

389 lines
12 KiB
CSS

/* --- VARIABLER (Røsstad Premium) --- */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&display=swap');
:root {
/* Palette: Deep Forest Green / Blue-Green Mix */
--primary-dark: #0f2f24; /* Deepest Forest */
--primary-main: #134e4a; /* Røsstad Green/Teal */
--primary-light: #2dd4bf; /* Bright Teal Highlight */
--accent-gold: #d97706; /* Bronze/Gold */
--accent-red: #be123c; /* Deep Berry (for errors/females) */
--bg-color: #f0fdf4; /* Soft Mist Green */
--glass-bg: rgba(255, 255, 255, 0.7);
--glass-border: rgba(255, 255, 255, 0.5);
--text-main: #1e293b; /* Slate 800 */
--text-muted: #64748b; /* Slate 500 */
--male-color: #0ea5e9; /* Sky Blue */
--female-color: #be123c; /* Rose */
--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
--shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}
body {
margin: 0;
font-family: 'Outfit', sans-serif;
background-color: var(--bg-color);
color: var(--text-main);
height: 100vh;
overflow: hidden;
background-image:
radial-gradient(at 0% 0%, rgba(19, 78, 74, 0.1) 0px, transparent 50%),
radial-gradient(at 100% 100%, rgba(217, 119, 6, 0.1) 0px, transparent 50%);
}
/* --- HJELPEKLASSER --- */
.hidden { display: none !important; }
.full-width { width: 100%; }
/* --- LOGIN SIDE STIL --- */
body.login-page {
display: flex; justify-content: center; align-items: center;
background: linear-gradient(135deg, #0f2f24 0%, #134e4a 100%);
position: relative;
}
body.login-page::before {
content: '';
position: absolute;
width: 100%; height: 100%;
background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.login-box {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
padding: 3.5rem;
border-radius: 1.5rem;
text-align: center;
color: white;
border: 1px solid rgba(255,255,255,0.2);
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
width: 100%;
max-width: 420px;
position: relative;
z-index: 10;
}
.logo-icon {
font-size: 4.5rem;
color: var(--primary-light);
margin-bottom: 1.5rem;
filter: drop-shadow(0 0 15px rgba(45, 212, 191, 0.4));
}
.login-box h2 {
font-weight: 700;
letter-spacing: -0.5px;
margin-bottom: 0.5rem;
}
.login-input {
background: rgba(255,255,255,0.95);
border: none;
padding: 1rem;
border-radius: 0.75rem;
width: 100%;
box-sizing: border-box;
font-family: inherit;
transition: all 0.2s;
}
.login-input:focus {
outline: none;
box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.5);
}
.error-msg {
margin-top: 1rem;
color: #fda4af;
font-size: 0.9rem;
min-height: 1.2em;
font-weight: 500;
}
/* --- HEADER (Hovedside) --- */
header {
background: rgba(255, 255, 255, 0.8);
backdrop-filter: blur(10px);
-webkit-backdrop-filter: blur(10px);
border-bottom: 1px solid rgba(0,0,0,0.05);
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
position: sticky; top: 0; z-index: 100;
}
.brand {
font-size: 1.4rem;
font-weight: 700;
color: var(--primary-dark);
display: flex; align-items: center; gap: 0.75rem;
}
.brand i { color: var(--primary-main); }
.nav-tabs {
display: flex; gap: 0.5rem;
background: rgba(0,0,0,0.05);
padding: 0.3rem;
border-radius: 0.75rem;
}
.nav-tab {
padding: 0.5rem 1.2rem;
border-radius: 0.5rem;
border: none;
background: transparent;
color: var(--text-muted);
font-weight: 600;
cursor: pointer;
transition: all 0.2s;
font-family: inherit;
}
.nav-tab.active {
background: white;
color: var(--primary-dark);
box-shadow: var(--shadow-sm);
}
.nav-tab:hover:not(.active) {
color: var(--primary-main);
background: rgba(255,255,255,0.5);
}
.controls {
display: flex; align-items: center; gap: 1rem;
}
.controls button.icon-btn {
background: none; border: none; color: var(--text-muted);
font-size: 1.5rem; cursor: pointer; transition: color 0.2s;
display: flex; align-items: center; justify-content: center;
}
.controls button.icon-btn:hover { color: var(--primary-main); transform: scale(1.1); }
/* --- KNAPPER --- */
.btn-primary {
background: linear-gradient(135deg, var(--primary-main), var(--primary-dark));
color: white; border: none; padding: 0.8rem 1.5rem;
border-radius: 0.75rem; font-weight: 600; cursor: pointer;
transition: all 0.2s;
box-shadow: 0 4px 6px -1px rgba(19, 78, 74, 0.3);
}
.btn-primary:hover {
transform: translateY(-1px);
box-shadow: 0 6px 8px -1px rgba(19, 78, 74, 0.4);
}
.btn-outline {
font-size: 0.9rem !important;
border: 1px solid var(--primary-main) !important;
color: var(--primary-main) !important;
background: transparent;
padding: 0.4rem 1rem; border-radius: 0.5rem;
font-weight: 600; cursor: pointer;
}
.btn-outline:hover {
background: var(--primary-main);
color: white !important;
}
/* --- MAIN CONTENT AREAS --- */
#app-container {
display: flex; height: 100vh; flex-direction: column;
}
main {
flex: 1; overflow: hidden; position: relative;
}
/* --- TREET (GRID LAYOUT) --- */
#tree-view {
display: flex; justify-content: center; align-items: center;
padding: 3rem;
overflow: auto;
cursor: grab;
}
#tree-view:active { cursor: grabbing; }
.tree-grid {
display: flex; flex-direction: column; align-items: center;
gap: 5rem; transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.row-parents, .row-focus, .row-children {
display: flex; justify-content: center; align-items: center;
position: relative;
}
.row-parents { gap: 4rem; }
.row-focus { gap: 3rem; }
.row-children { gap: 2rem; flex-wrap: wrap; }
/* --- KORT --- */
.card {
background: rgba(255, 255, 255, 0.9);
backdrop-filter: blur(8px);
width: 200px; min-height: 130px;
border-radius: 1rem;
border: 1px solid white;
box-shadow: var(--shadow-md);
padding: 1.2rem;
display: flex; flex-direction: column; align-items: center;
position: relative; cursor: pointer; transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.card:hover {
transform: translateY(-5px) scale(1.02);
box-shadow: var(--shadow-lg);
border-color: var(--primary-light);
}
.card.focus {
border: 2px solid var(--primary-main);
background: white;
transform: scale(1.15);
z-index: 10;
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 0 0 4px rgba(45, 212, 191, 0.2);
}
.card h3 { margin: 0.75rem 0 0.25rem 0; font-size: 1rem; text-align: center; font-weight: 700; color: var(--text-main); }
.card p { margin: 0; font-size: 0.8rem; color: var(--text-muted); font-family: 'Outfit', monospace; font-weight: 500; }
.card .info-badge {
font-size: 0.7rem; color: var(--primary-dark);
background: var(--primary-light);
background: rgba(45, 212, 191, 0.2);
padding: 2px 8px; border-radius: 12px; margin-top: 8px; font-weight: 600;
}
.card-icon {
font-size: 1.8rem; padding: 10px; border-radius: 50%;
box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
}
.male .card-icon { color: var(--male-color); background: #e0f2fe; }
.female .card-icon { color: var(--female-color); background: #ffe4e6; }
/* --- PLUSS-KNAPPER --- */
.slot-container {
display: flex; flex-direction: column; align-items: center; gap: 0.75rem;
}
.slot-label {
font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px;
font-weight: 700; color: var(--text-muted); opacity: 0.7;
}
.btn-add-slot {
width: 48px; height: 48px; border-radius: 50%;
border: 2px dashed #cbd5e1; background: rgba(255,255,255,0.4);
color: #94a3b8; display: flex; justify-content: center; align-items: center;
cursor: pointer; font-size: 1.4rem; transition: all 0.2s;
}
.btn-add-slot:hover {
border-color: var(--primary-main); color: var(--primary-main);
background: white; transform: rotate(90deg);
}
.focus-actions {
position: absolute; width: 100%; height: 100%; pointer-events: none;
}
.btn-mini-add {
pointer-events: auto; position: absolute;
width: 32px; height: 32px;
background: var(--primary-main);
color: white; border-radius: 50%; border: none;
display: flex; justify-content: center; align-items: center;
cursor: pointer; box-shadow: 0 4px 6px rgba(0,0,0,0.2); z-index: 20;
transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.btn-mini-add:hover { background: var(--primary-dark); transform: scale(1.2); }
.add-child { bottom: -16px; left: 50%; transform: translateX(-50%); }
.add-partner { top: 50%; right: -16px; transform: translateY(-50%); }
/* --- MODAL --- */
.modal-overlay {
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
background: rgba(15, 47, 36, 0.6); backdrop-filter: blur(4px);
display: flex; justify-content: center; align-items: center; z-index: 3000;
opacity: 0; animation: fadeIn 0.2s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }
.modal {
background: white; width: 90%; max-width: 550px;
border-radius: 1.5rem; padding: 2rem;
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
transform: scale(0.95); animation: popIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
@keyframes popIn { to { transform: scale(1); } }
.modal-header {
display: flex; justify-content: space-between; align-items: center;
border-bottom: 1px solid var(--glass-border); padding-bottom: 1.5rem; margin-bottom: 1.5rem;
}
.modal-header h3 { margin: 0; font-size: 1.5rem; color: var(--primary-dark); }
.toggle-group {
display: flex; background: #f1f5f9; padding: 5px; border-radius: 10px; margin-bottom: 1.5rem;
}
.toggle-btn {
flex: 1; padding: 10px; border: none; background: transparent;
cursor: pointer; border-radius: 8px; font-weight: 600; color: var(--text-muted);
transition: all 0.2s;
}
.toggle-btn.active {
background: white; color: var(--primary-main);
box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--text-main); }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }
input, select, textarea {
width: 100%; padding: 0.8rem;
border: 1px solid #cbd5e1; border-radius: 0.75rem;
font-size: 1rem; font-family: inherit;
transition: border 0.2s; box-sizing: border-box;
}
input:focus, select:focus, textarea:focus {
outline: none; border-color: var(--primary-main);
box-shadow: 0 0 0 3px rgba(19, 78, 74, 0.1);
}
.person-select-list {
max-height: 200px; overflow-y: auto;
border: 1px solid #cbd5e1; border-radius: 0.75rem;
}
.person-option {
padding: 0.8rem; border-bottom: 1px solid #f1f5f9; cursor: pointer;
display: flex; justify-content: space-between; transition: background 0.1s;
}
.person-option:hover { background: #f8fafc; }
.person-option.selected {
background: #f0fdf4; border-left: 4px solid var(--primary-main);
}
/* --- KART OG TIDSLINJE (Placeholder) --- */
#map-view, #timeline-view {
width: 100%; height: 100%;
}
#map-container {
width: 100%; height: 100%;
background: #e2e8f0; /* Placeholder grå */
}
/* Timeline specific */
.timeline-container {
max-width: 800px; margin: 0 auto; padding: 3rem 1rem;
}
.timeline-item {
position: relative; padding-left: 2rem; margin-bottom: 2rem; border-left: 2px solid var(--primary-light);
}
.timeline-item::before {
content: ''; position: absolute; left: -6px; top: 0;
width: 10px; height: 10px; border-radius: 50%; background: var(--primary-main);
}
.timeline-date { font-size: 0.85rem; color: var(--primary-main); font-weight: 700; }
.timeline-content { background: white; padding: 1rem; border-radius: 0.5rem; box-shadow: var(--shadow-sm); margin-top: 0.5rem; }