feat(auth-firebase): implement Phase 2 integration - Firebase Auth, Session Sync, Favorites Grid, and Firestore Newsletter

This commit is contained in:
2026-05-21 14:14:10 +02:00
parent 548c7605bc
commit 21833fa05b
15 changed files with 1532 additions and 40 deletions
+336
View File
@@ -1735,3 +1735,339 @@ body.nav-open { overflow: hidden; }
.feature-grid { grid-template-columns: 1fr; }
.coming-features { margin-bottom: 40px; }
}
/* ╔══════════════════════════════════════════════════════════════╗
║ PHASE 2: AUTHENTICATION, FAVORITES & NEWSLETTER STYLES ║
╚══════════════════════════════════════════════════════════════╝ */
/* ── Premium Heart Buttons ── */
.card__image {
position: relative;
display: block;
}
.btn-favorite {
position: absolute;
top: 1rem;
right: 1rem;
width: 38px;
height: 38px;
border-radius: 50%;
background: rgba(255, 255, 255, 0.7);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
border: 1px solid rgba(255, 255, 255, 0.3);
color: var(--muted);
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
z-index: 10;
box-shadow: 0 4px 12px rgba(0,0,0,0.08);
transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s var(--ease-overshoot), color 0.3s ease;
}
[data-theme="dark"] .btn-favorite {
background: rgba(36, 31, 33, 0.7);
border-color: rgba(255, 255, 255, 0.05);
}
.btn-favorite:hover {
transform: scale(1.1);
background: rgba(255, 255, 255, 0.95);
color: var(--ink);
}
[data-theme="dark"] .btn-favorite:hover {
background: rgba(36, 31, 33, 0.95);
}
.btn-favorite svg {
width: 18px;
height: 18px;
transition: stroke 0.3s ease, fill 0.3s ease;
fill: none;
stroke: var(--ink);
}
.btn-favorite.active {
background: var(--surface-2);
border-color: rgba(195, 166, 119, 0.4);
}
.btn-favorite.active svg {
fill: var(--color-accent-gold);
stroke: var(--color-accent-gold);
animation: heartPop 0.45s var(--ease-overshoot) both;
}
/* For larger recipe layout title heart button */
.recipe__title-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 1.5rem;
margin-bottom: 0.5rem;
width: 100%;
}
.btn-favorite--large {
position: static;
width: 52px;
height: 52px;
background: var(--surface-2);
border: 1px solid var(--stroke);
flex-shrink: 0;
}
.btn-favorite--large svg {
width: 24px;
height: 24px;
}
@keyframes heartPop {
0% { transform: scale(1); }
50% { transform: scale(1.35); }
100% { transform: scale(1); }
}
/* ── Guest Favoriting Prompt Modal ── */
.guest-modal-backdrop {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(11, 9, 10, 0.4);
backdrop-filter: blur(8px);
-webkit-backdrop-filter: blur(8px);
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
pointer-events: none;
transition: opacity 0.4s var(--ease-out-expo);
}
.guest-modal-backdrop.open {
opacity: 1;
pointer-events: auto;
}
.guest-modal-card {
background: var(--surface-2);
border: 1px solid var(--stroke);
box-shadow: var(--shadow);
border-radius: var(--radius);
width: 90%;
max-width: 440px;
padding: 2.5rem;
position: relative;
text-align: center;
transform: translateY(30px);
transition: transform 0.5s var(--ease-overshoot);
display: flex;
flex-direction: column;
align-items: center;
gap: 1.2rem;
}
.guest-modal-backdrop.open .guest-modal-card {
transform: translateY(0);
}
.guest-modal-close {
position: absolute;
top: 1rem;
right: 1.2rem;
background: none;
border: none;
font-size: 1.8rem;
color: var(--muted);
cursor: pointer;
transition: color 0.3s ease;
}
.guest-modal-close:hover {
color: var(--ink);
}
.guest-modal-icon {
font-size: 2.5rem;
line-height: 1;
}
.guest-modal-card h3 {
font-family: var(--font-serif-display);
font-size: 1.8rem;
margin: 0;
color: var(--ink);
}
.guest-modal-card p {
font-size: 0.95rem;
line-height: 1.6;
color: var(--muted);
margin: 0;
}
.guest-modal-actions {
display: flex;
flex-direction: column;
align-items: center;
gap: 1rem;
width: 100%;
margin-top: 0.5rem;
}
.guest-modal-actions .btn-reveal {
width: 100%;
justify-content: center;
}
.guest-modal-actions button {
background: none;
border: none;
font-family: var(--font-sans-clean);
font-size: 0.85rem;
color: var(--muted);
cursor: pointer;
}
/* ── Footer Newsletter ── */
.footer-newsletter {
padding-bottom: 2.5rem;
border-bottom: 1px solid var(--stroke);
display: grid;
grid-template-columns: 1fr;
gap: 1.5rem;
align-items: center;
margin-bottom: 1rem;
width: 100%;
}
@media (min-width: 768px) {
.footer-newsletter {
grid-template-columns: 1.2fr 1fr;
gap: 3rem;
}
}
.newsletter-content h3 {
font-family: var(--font-serif-display);
font-size: 1.75rem;
margin-bottom: 0.5rem;
color: var(--ink);
}
.newsletter-content p {
color: var(--muted);
font-size: 0.95rem;
line-height: 1.5;
margin: 0;
}
.newsletter-form {
display: flex;
flex-direction: column;
gap: 0.5rem;
position: relative;
}
.newsletter-input-group {
display: flex;
border-bottom: 2px solid var(--stroke);
padding: 0.5rem 0;
transition: border-color 0.3s ease;
position: relative;
align-items: center;
}
.newsletter-input-group:focus-within {
border-color: var(--color-accent-gold);
}
.newsletter-input-group input {
flex: 1;
background: none;
border: none;
font-family: var(--font-sans-clean);
font-size: 1rem;
color: var(--ink);
outline: none;
padding: 0.5rem 0;
}
.newsletter-input-group input::placeholder {
color: var(--color-text-muted);
opacity: 0.7;
}
.newsletter-input-group button {
background: none;
border: none;
color: var(--color-accent-gold);
font-size: 1.5rem;
cursor: pointer;
padding: 0 0.5rem;
display: flex;
align-items: center;
justify-content: center;
width: 32px;
height: 32px;
position: relative;
transition: transform 0.3s var(--ease-overshoot), color 0.3s ease;
}
.newsletter-input-group button:hover {
transform: translateX(4px);
}
.newsletter-input-group button .btn-success-check {
display: none;
color: #10b981;
font-size: 1.2rem;
}
.newsletter-form.success .newsletter-input-group button .btn-text {
display: none;
}
.newsletter-form.success .newsletter-input-group button .btn-success-check {
display: block;
}
.newsletter-form.success .newsletter-input-group button {
transform: none !important;
cursor: default;
}
.newsletter-form.success .newsletter-input-group {
border-color: #10b981;
}
.newsletter-feedback {
font-size: 0.85rem;
margin-top: 0.25rem;
min-height: 1.25rem;
transition: color 0.3s ease;
}
.newsletter-feedback.error {
color: #e02424;
}
.newsletter-feedback.success {
color: #10b981;
}
/* ── 22. PHASE 3: NUTRITION WIDGET ───────────────────────────── */
.nutrition-widget {
margin-top: 1.5rem;
margin-bottom: 2rem;
gap: 1.5rem;
}
.nutrition-item {
flex: 1 1 calc(25% - 1.5rem);
min-width: 120px;
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.nutrition-item__header {
display: flex;
justify-content: space-between;
align-items: baseline;
font-family: var(--font-sans-clean);
}
.nutrition-label {
font-size: 0.85rem;
font-weight: 600;
text-transform: uppercase;
letter-spacing: 0.1em;
color: var(--muted);
}
.nutrition-value {
font-family: var(--font-serif-display);
font-size: 1.2rem;
font-weight: 700;
color: var(--ink);
}
.nutrition-bar {
width: 100%;
height: 4px;
background-color: var(--ghost);
border-radius: 2px;
overflow: hidden;
position: relative;
}
.nutrition-fill {
height: 100%;
background-color: var(--accent);
border-radius: 2px;
transition: width 1.5s var(--ease-out-expo) 0.2s;
will-change: width;
}