453 lines
10 KiB
CSS
453 lines
10 KiB
CSS
/* Light theme variables */
|
|
:root {
|
|
/* Colors */
|
|
--primary-color: #9B4819;
|
|
--primary-color-dark: #7A3914;
|
|
--secondary-color: #D68C45;
|
|
--secondary-color-dark: #B37338;
|
|
--background-color: #FDF6EC;
|
|
--surface-color: #FFFFFF;
|
|
--text-color: #2C1810;
|
|
--text-color-light: #5C4037;
|
|
--border-color: #E8D5C4;
|
|
--error-color: #DC3545;
|
|
--error-color-dark: #BD2130;
|
|
--success-color: #28A745;
|
|
--link-color: #9B4819;
|
|
|
|
/* Spacing */
|
|
--spacing-xs: 0.25rem;
|
|
--spacing-sm: 0.5rem;
|
|
--spacing-md: 1rem;
|
|
--spacing-lg: 1.5rem;
|
|
--spacing-xl: 2rem;
|
|
--spacing-unit: 1rem;
|
|
--container-max-width: 1200px;
|
|
|
|
/* Typography */
|
|
--font-family: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, "Open Sans", sans-serif;
|
|
--font-size-sm: 0.875rem;
|
|
--font-size-md: 1rem;
|
|
--font-size-lg: 1.25rem;
|
|
--font-size-xl: 1.5rem;
|
|
--font-family-brand: "Sour Gummy", cursive;
|
|
--font-family-base: "Sour Gummy", system-ui, -apple-system, sans-serif;
|
|
--font-size-base: 1rem;
|
|
--line-height-base: 1.5;
|
|
|
|
/* Effects */
|
|
--shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
|
|
--shadow-md: 0 4px 6px rgba(0,0,0,0.1);
|
|
--radius-sm: 4px;
|
|
--radius-md: 8px;
|
|
--radius-lg: 12px;
|
|
--border-radius: 0.25rem;
|
|
--border-radius-lg: 0.5rem;
|
|
--transition-base: all 0.2s ease-in-out;
|
|
|
|
/* Recipe Card */
|
|
--recipe-card-bg: #ffffff;
|
|
--recipe-card-border: #E8D5C4;
|
|
--recipe-card-shadow: rgba(155, 72, 25, 0.1);
|
|
--recipe-card-title-color: #9B4819;
|
|
--recipe-card-text-color: #594D46;
|
|
|
|
/* Sidebar */
|
|
--sidebar-bg: #9B4819;
|
|
--sidebar-border: #B25F2C;
|
|
--sidebar-brand-color: #ffffff;
|
|
--sidebar-link-color: rgba(255, 255, 255, 0.9);
|
|
--sidebar-link-hover-color: #ffffff;
|
|
--sidebar-link-hover-bg: rgba(214, 140, 69, 0.2);
|
|
--sidebar-mobile-height: 60px;
|
|
--sidebar-desktop-width: 240px;
|
|
}
|
|
|
|
/* Dark theme variables */
|
|
[data-theme="dark"] {
|
|
--primary-color: #FF8B4C;
|
|
--primary-color-dark: #E67A3D;
|
|
--secondary-color: #FFB07F;
|
|
--secondary-color-dark: #E69E70;
|
|
--background-color: #1A1A1A;
|
|
--surface-color: #2D2D2D;
|
|
--text-color: #F5E6D3;
|
|
--text-color-light: #D4C3B3;
|
|
--border-color: #404040;
|
|
--error-color: #FF4D4D;
|
|
--error-color-dark: #E63939;
|
|
--success-color: #4CAF50;
|
|
--link-color: #FF8B4C;
|
|
--shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
|
|
--shadow-md: 0 4px 6px rgba(0,0,0,0.3);
|
|
--recipe-card-bg: #2D2D2D;
|
|
--recipe-card-border: #404040;
|
|
--recipe-card-shadow: rgba(0, 0, 0, 0.3);
|
|
--recipe-card-title-color: #FF8B4C;
|
|
--recipe-card-text-color: #D4C3B3;
|
|
--sidebar-bg: #2D2D2D;
|
|
--sidebar-border: #404040;
|
|
--sidebar-brand-color: #F5E6D3;
|
|
--sidebar-link-color: rgba(255, 255, 255, 0.9);
|
|
--sidebar-link-hover-color: #F5E6D3;
|
|
--sidebar-link-hover-bg: rgba(214, 140, 69, 0.2);
|
|
}
|
|
|
|
/* Reset and base styles */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: var(--font-family-base);
|
|
font-size: var(--font-size-base);
|
|
line-height: var(--line-height-base);
|
|
color: var(--text-color);
|
|
background-color: var(--background-color);
|
|
transition: background-color 0.3s ease, color 0.3s ease;
|
|
}
|
|
|
|
/* Layout */
|
|
.layout {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Sidebar */
|
|
.sidebar {
|
|
background-color: var(--sidebar-bg);
|
|
border-bottom: 1px solid var(--sidebar-border);
|
|
z-index: 1000;
|
|
}
|
|
|
|
.sidebar .sidebar-content {
|
|
padding: var(--spacing-unit);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.sidebar .brand a {
|
|
color: var(--sidebar-brand-color);
|
|
text-decoration: none;
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
font-family: var(--font-family-brand);
|
|
display: block;
|
|
padding: var(--spacing-unit) 0;
|
|
}
|
|
|
|
.sidebar .nav-links {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--spacing-unit);
|
|
}
|
|
|
|
.sidebar .nav-link {
|
|
color: var(--sidebar-link-color);
|
|
text-decoration: none;
|
|
padding: calc(var(--spacing-unit) * 0.5);
|
|
border-radius: var(--border-radius);
|
|
transition: var(--transition-base);
|
|
}
|
|
|
|
.sidebar .nav-link:hover {
|
|
color: var(--sidebar-link-hover-color);
|
|
background-color: var(--sidebar-link-hover-bg);
|
|
}
|
|
|
|
/* Main content */
|
|
.main-content {
|
|
flex: 1;
|
|
padding: var(--spacing-unit);
|
|
}
|
|
|
|
/* Recipe Cards */
|
|
.recipe-card {
|
|
background-color: var(--recipe-card-bg);
|
|
border: 1px solid var(--recipe-card-border);
|
|
border-radius: var(--border-radius-lg);
|
|
padding: calc(var(--spacing-unit) * 1.5);
|
|
margin-bottom: var(--spacing-unit);
|
|
box-shadow: 0 4px 6px var(--recipe-card-shadow);
|
|
transition: var(--transition-base);
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.recipe-card::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 4px;
|
|
background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
|
|
opacity: 0;
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
|
|
.recipe-card:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: 0 8px 12px var(--recipe-card-shadow);
|
|
}
|
|
|
|
.recipe-card:hover::before {
|
|
opacity: 1;
|
|
}
|
|
|
|
.recipe-card .card-title {
|
|
color: var(--recipe-card-title-color);
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
margin-bottom: var(--spacing-unit);
|
|
border-bottom: 1px solid rgba(44, 80, 44, 0.3);
|
|
padding-bottom: calc(var(--spacing-unit) * 0.5);
|
|
}
|
|
|
|
.recipe-card .card-text {
|
|
color: var(--recipe-card-text-color);
|
|
margin-bottom: calc(var(--spacing-unit) * 1.5);
|
|
font-size: 0.95rem;
|
|
line-height: 1.6;
|
|
}
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
padding: calc(var(--spacing-unit) * 0.5) var(--spacing-unit);
|
|
border-radius: var(--border-radius);
|
|
border: none;
|
|
cursor: pointer;
|
|
transition: var(--transition-base);
|
|
text-decoration: none;
|
|
display: inline-block;
|
|
margin-right: calc(var(--spacing-unit) * 0.5);
|
|
background-color: var(--primary-color);
|
|
color: white;
|
|
}
|
|
|
|
.btn:last-child {
|
|
margin-right: 0;
|
|
}
|
|
|
|
.btn:hover {
|
|
background-color: var(--primary-color-dark);
|
|
}
|
|
|
|
/* Recipe grid layout */
|
|
#recipe-list {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
gap: calc(var(--spacing-unit) * 1.5);
|
|
padding: var(--spacing-unit) 0;
|
|
}
|
|
|
|
#recipe-list .col-12 {
|
|
grid-column: 1 / -1;
|
|
text-align: center;
|
|
padding: calc(var(--spacing-unit) * 2);
|
|
}
|
|
|
|
/* Forms */
|
|
.form-control {
|
|
width: 100%;
|
|
padding: calc(var(--spacing-unit) * 0.5);
|
|
border: 1px solid var(--primary-color);
|
|
border-radius: var(--border-radius);
|
|
background-color: color-mix(in srgb, var(--background-color) 90%, black);
|
|
color: var(--text-color);
|
|
}
|
|
|
|
.form-control:focus {
|
|
outline: none;
|
|
border-color: var(--secondary-color);
|
|
}
|
|
|
|
/* Alerts */
|
|
.alert {
|
|
padding: var(--spacing-unit);
|
|
border-radius: var(--border-radius);
|
|
margin-bottom: var(--spacing-unit);
|
|
}
|
|
|
|
.alert-info {
|
|
background-color: color-mix(in srgb, var(--secondary-color) 20%, transparent);
|
|
border: 1px solid var(--secondary-color);
|
|
}
|
|
|
|
/* HTMX specific styles */
|
|
.htmx-indicator {
|
|
opacity: 0;
|
|
transition: opacity 200ms ease-in;
|
|
}
|
|
|
|
.htmx-request .htmx-indicator {
|
|
opacity: 1;
|
|
}
|
|
|
|
.htmx-request.htmx-indicator {
|
|
opacity: 1;
|
|
}
|
|
|
|
/* Back to Recipes Button */
|
|
.back-button {
|
|
position: fixed;
|
|
bottom: var(--spacing-unit);
|
|
left: var(--spacing-unit);
|
|
z-index: 1000;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.back-button {
|
|
left: calc(var(--sidebar-desktop-width) + var(--spacing-unit));
|
|
}
|
|
}
|
|
|
|
/* Recipe Detail Styles */
|
|
.recipe-detail {
|
|
max-width: 800px;
|
|
margin: 0 auto;
|
|
background: var(--recipe-card-bg);
|
|
border-radius: var(--border-radius-lg);
|
|
box-shadow: 0 4px 6px var(--recipe-card-shadow);
|
|
padding: var(--spacing-unit);
|
|
}
|
|
|
|
.recipe-detail h1 {
|
|
color: var(--recipe-card-title-color);
|
|
margin-bottom: var(--spacing-unit);
|
|
font-family: var(--font-family-brand);
|
|
}
|
|
|
|
.recipe-content {
|
|
max-height: calc(100vh - 400px);
|
|
overflow-y: auto;
|
|
padding: var(--spacing-unit);
|
|
background: color-mix(in srgb, var(--recipe-card-bg) 95%, var(--primary-color));
|
|
border-radius: var(--border-radius);
|
|
border: 1px solid var(--recipe-card-border);
|
|
}
|
|
|
|
.recipe-content::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
.recipe-content::-webkit-scrollbar-track {
|
|
background: color-mix(in srgb, var(--recipe-card-bg) 98%, var(--text-color));
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.recipe-content::-webkit-scrollbar-thumb {
|
|
background: var(--primary-color);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.recipe-content::-webkit-scrollbar-thumb:hover {
|
|
background: color-mix(in srgb, var(--primary-color) 90%, white);
|
|
}
|
|
|
|
.recipe-section {
|
|
margin-bottom: var(--spacing-unit);
|
|
}
|
|
|
|
.recipe-section h2 {
|
|
color: var(--recipe-card-title-color);
|
|
margin-bottom: calc(var(--spacing-unit) * 0.5);
|
|
font-size: 1.25rem;
|
|
font-family: var(--font-family-brand);
|
|
}
|
|
|
|
.recipe-section .ingredient-item,
|
|
.recipe-section .instruction-item {
|
|
padding: calc(var(--spacing-unit) * 0.5) 0;
|
|
border-bottom: 1px solid color-mix(in srgb, var(--recipe-card-border) 50%, transparent);
|
|
}
|
|
|
|
.recipe-section .instruction-item {
|
|
margin-bottom: calc(var(--spacing-unit) * 0.5);
|
|
}
|
|
|
|
.recipe-section .instruction-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* Theme toggle styles */
|
|
.theme-toggle {
|
|
position: fixed;
|
|
bottom: 1.5rem;
|
|
right: 1.5rem;
|
|
background: var(--surface-color);
|
|
border: 2px solid var(--border-color);
|
|
color: var(--text-color);
|
|
padding: 0.5rem;
|
|
border-radius: 50%;
|
|
width: 40px;
|
|
height: 40px;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
box-shadow: var(--shadow-sm);
|
|
z-index: 1000;
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.theme-toggle:hover {
|
|
transform: scale(1.1);
|
|
box-shadow: var(--shadow-md);
|
|
}
|
|
|
|
.theme-toggle svg {
|
|
width: 20px;
|
|
height: 20px;
|
|
fill: currentColor;
|
|
}
|
|
|
|
/* Media Queries */
|
|
@media (min-width: 768px) {
|
|
.layout {
|
|
flex-direction: row;
|
|
}
|
|
|
|
.sidebar {
|
|
width: var(--sidebar-desktop-width);
|
|
border-right: 1px solid var(--sidebar-border);
|
|
border-bottom: none;
|
|
height: 100vh;
|
|
left: 0;
|
|
top: 0;
|
|
}
|
|
|
|
.sidebar .sidebar-content {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
height: 100%;
|
|
}
|
|
|
|
.sidebar .brand a {
|
|
margin-bottom: calc(var(--spacing-unit) * 2);
|
|
}
|
|
|
|
.sidebar .nav-links {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
width: 100%;
|
|
}
|
|
|
|
.sidebar .nav-link {
|
|
width: 100%;
|
|
padding: var(--spacing-unit);
|
|
}
|
|
|
|
.main-content {
|
|
padding: calc(var(--spacing-unit) * 2);
|
|
}
|
|
|
|
.recipe-content {
|
|
max-height: calc(100vh - 200px);
|
|
}
|
|
}
|