400 lines
No EOL
6.9 KiB
CSS
400 lines
No EOL
6.9 KiB
CSS
:root {
|
|
/* Røsstad Palette */
|
|
--color-forest: #1a472a;
|
|
--color-sea: #0f2b3e;
|
|
--color-moss: #88a090;
|
|
--color-bg-light: #f4f7f5;
|
|
--color-bg-dark: #121212;
|
|
--color-text-light: #ffffff;
|
|
--color-text-dark: #333333;
|
|
--glass-bg: rgba(255, 255, 255, 0.1);
|
|
--glass-border: rgba(255, 255, 255, 0.2);
|
|
--shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
font-family: 'Outfit', 'Segoe UI', sans-serif;
|
|
background-color: var(--color-bg-light);
|
|
color: var(--color-text-dark);
|
|
transition: background-color 0.3s, color 0.3s;
|
|
overflow: hidden;
|
|
/* Prevent body scroll, handle in containers */
|
|
}
|
|
|
|
body.dark-mode {
|
|
background-color: var(--color-bg-dark);
|
|
color: var(--color-text-light);
|
|
}
|
|
|
|
/* Glassmorphism Utilities */
|
|
.glass {
|
|
background: var(--glass-bg);
|
|
backdrop-filter: blur(10px);
|
|
-webkit-backdrop-filter: blur(10px);
|
|
border: 1px solid var(--glass-border);
|
|
}
|
|
|
|
.glass-panel {
|
|
background: rgba(255, 255, 255, 0.05);
|
|
/* Slightly more opaque */
|
|
backdrop-filter: blur(16px);
|
|
-webkit-backdrop-filter: blur(16px);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
box-shadow: var(--shadow);
|
|
border-radius: 16px;
|
|
}
|
|
|
|
/* Navigation */
|
|
.top-nav {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 1rem 2rem;
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
z-index: 1000;
|
|
}
|
|
|
|
.nav-brand {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
color: var(--color-forest);
|
|
}
|
|
|
|
body.dark-mode .nav-brand {
|
|
color: var(--color-moss);
|
|
}
|
|
|
|
.nav-tabs {
|
|
display: flex;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.nav-btn {
|
|
background: none;
|
|
border: none;
|
|
padding: 0.5rem 1rem;
|
|
font-size: 1rem;
|
|
cursor: pointer;
|
|
color: inherit;
|
|
border-radius: 8px;
|
|
transition: background 0.2s;
|
|
}
|
|
|
|
.nav-btn.active {
|
|
background: var(--color-forest);
|
|
color: white;
|
|
}
|
|
|
|
.nav-controls {
|
|
display: flex;
|
|
gap: 1rem;
|
|
align-items: center;
|
|
}
|
|
|
|
.icon-btn {
|
|
background: none;
|
|
border: none;
|
|
font-size: 1.2rem;
|
|
cursor: pointer;
|
|
color: inherit;
|
|
}
|
|
|
|
.text-btn {
|
|
background: none;
|
|
border: 1px solid currentColor;
|
|
padding: 0.4rem 0.8rem;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
color: inherit;
|
|
}
|
|
|
|
/* Main Content */
|
|
#main-content {
|
|
margin-top: 80px;
|
|
/* Space for nav */
|
|
height: calc(100vh - 80px);
|
|
position: relative;
|
|
}
|
|
|
|
.tab-content {
|
|
display: none;
|
|
height: 100%;
|
|
width: 100%;
|
|
}
|
|
|
|
.tab-content.active {
|
|
display: block;
|
|
}
|
|
|
|
/* Tree View */
|
|
#tree-container {
|
|
width: 100%;
|
|
height: 100%;
|
|
overflow: auto;
|
|
position: relative;
|
|
background: radial-gradient(circle at center, rgba(26, 71, 42, 0.1) 0%, transparent 70%);
|
|
}
|
|
|
|
#relationship-lines {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
pointer-events: none;
|
|
/* Let clicks pass through to cards */
|
|
}
|
|
|
|
#family-cards-container {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
.family-card {
|
|
position: absolute;
|
|
width: 220px;
|
|
height: 100px;
|
|
background: var(--glass-bg);
|
|
backdrop-filter: blur(8px);
|
|
border: 1px solid var(--color-moss);
|
|
border-radius: 12px;
|
|
padding: 10px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: pointer;
|
|
transition: transform 0.2s, box-shadow 0.2s;
|
|
color: inherit;
|
|
}
|
|
|
|
.family-card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
background: rgba(255, 255, 255, 0.15);
|
|
}
|
|
|
|
.card-avatar {
|
|
font-size: 2rem;
|
|
margin-bottom: 5px;
|
|
}
|
|
|
|
.card-name {
|
|
font-weight: 600;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.card-dates {
|
|
font-size: 0.8rem;
|
|
opacity: 0.8;
|
|
}
|
|
|
|
/* FAB */
|
|
.fab {
|
|
position: fixed;
|
|
bottom: 2rem;
|
|
right: 2rem;
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: 50%;
|
|
background: var(--color-forest);
|
|
color: white;
|
|
border: none;
|
|
font-size: 2rem;
|
|
cursor: pointer;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: transform 0.2s;
|
|
}
|
|
|
|
.fab:hover {
|
|
transform: scale(1.1);
|
|
}
|
|
|
|
/* Map */
|
|
#map {
|
|
width: 100%;
|
|
height: 100%;
|
|
}
|
|
|
|
/* History */
|
|
.history-container {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
padding: 2rem;
|
|
overflow-y: auto;
|
|
height: 100%;
|
|
}
|
|
|
|
#history-list {
|
|
list-style: none;
|
|
padding: 0;
|
|
border-left: 2px solid var(--color-moss);
|
|
}
|
|
|
|
.history-item {
|
|
margin-bottom: 1.5rem;
|
|
padding-left: 1.5rem;
|
|
position: relative;
|
|
}
|
|
|
|
.history-item::before {
|
|
content: '';
|
|
position: absolute;
|
|
left: -6px;
|
|
top: 6px;
|
|
width: 10px;
|
|
height: 10px;
|
|
background: var(--color-forest);
|
|
border-radius: 50%;
|
|
}
|
|
|
|
.history-year {
|
|
font-weight: bold;
|
|
color: var(--color-moss);
|
|
margin-right: 0.5rem;
|
|
}
|
|
|
|
/* Modals */
|
|
.modal {
|
|
display: none;
|
|
/* Hidden by default */
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
background: rgba(0, 0, 0, 0.6);
|
|
backdrop-filter: blur(4px);
|
|
z-index: 2000;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
.modal-content {
|
|
width: 90%;
|
|
max-width: 500px;
|
|
padding: 2rem;
|
|
position: relative;
|
|
max-height: 90vh;
|
|
overflow-y: auto;
|
|
}
|
|
|
|
.close-modal {
|
|
position: absolute;
|
|
top: 1rem;
|
|
right: 1rem;
|
|
font-size: 1.5rem;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Forms */
|
|
.form-group {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
.form-row {
|
|
display: flex;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.form-row .form-group {
|
|
flex: 1;
|
|
}
|
|
|
|
label {
|
|
display: block;
|
|
margin-bottom: 0.5rem;
|
|
font-size: 0.9rem;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
input,
|
|
select,
|
|
textarea {
|
|
width: 100%;
|
|
padding: 0.8rem;
|
|
border-radius: 8px;
|
|
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
background: rgba(0, 0, 0, 0.2);
|
|
color: inherit;
|
|
font-family: inherit;
|
|
box-sizing: border-box;
|
|
/* Fix padding issues */
|
|
}
|
|
|
|
input:focus,
|
|
select:focus,
|
|
textarea:focus {
|
|
outline: none;
|
|
border-color: var(--color-moss);
|
|
background: rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.primary-btn {
|
|
width: 100%;
|
|
padding: 1rem;
|
|
background: var(--color-forest);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 8px;
|
|
font-size: 1rem;
|
|
cursor: pointer;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
.primary-btn:hover {
|
|
background: #235c38;
|
|
}
|
|
|
|
.error-msg {
|
|
color: #ff6b6b;
|
|
margin-top: 1rem;
|
|
text-align: center;
|
|
}
|
|
|
|
/* Radio Group */
|
|
.radio-group {
|
|
display: flex;
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.radio-label {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
cursor: pointer;
|
|
}
|
|
|
|
input[type="radio"] {
|
|
width: auto;
|
|
margin: 0;
|
|
}
|
|
|
|
/* Pan and Zoom Styles */
|
|
#tree-tab {
|
|
overflow: hidden; /* Hide scrollbars, we use custom pan */
|
|
position: relative;
|
|
cursor: grab;
|
|
}
|
|
|
|
#tree-tab:active {
|
|
cursor: grabbing;
|
|
}
|
|
|
|
#tree-container {
|
|
transform-origin: 0 0; /* Zoom from top-left */
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
/* Ensure it has size */
|
|
min-width: 100%;
|
|
min-height: 100%;
|
|
} |