Files
Bratonien-Adventskalender/adventskalender/2025/css/popup.css

266 lines
5.7 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* ============================================================
Bratonien Adventskalender 2025 Popup Design
Bandbreitenoptimiert, hell & festlich
Layouts: Standard, 3-Part (Story+Media), Recipe (Text+Bild)
============================================================ */
/* === Overlay === */
#popup-overlay {
position: fixed;
inset: 0;
background: rgba(247, 243, 232, 0.88);
backdrop-filter: blur(6px) brightness(1.05);
-webkit-backdrop-filter: blur(6px) brightness(1.05);
display: none;
align-items: center;
justify-content: center;
z-index: 9999;
}
#popup-overlay.active {
display: flex;
animation: fadeIn 0.3s ease;
}
/* === Popup-Box === */
#popup-box {
background: linear-gradient(
180deg,
color-mix(in srgb, var(--ci-creamwhite) 80%, white),
color-mix(in srgb, var(--ci-gold) 15%, #fff9e6)
);
border: 2px solid var(--ci-gold);
border-radius: 16px;
box-shadow:
0 0 25px color-mix(in srgb, var(--ci-gold) 40%, transparent),
inset 0 0 10px rgba(255, 255, 255, 0.4);
width: min(90vw, 1800px);
max-height: 90vh;
overflow-y: auto;
overflow-x: hidden;
padding: clamp(1.5rem, 2vw, 3rem);
color: #333;
text-align: center;
position: relative;
backdrop-filter: blur(3px);
transition: width 0.3s ease, padding 0.3s ease;
animation: popIn 0.35s ease;
box-sizing: border-box;
}
/* === Grundlayout für Inhalte === */
#popup-content {
margin-top: 1rem;
font-family: "Bratonien2025", cursive;
font-size: clamp(1rem, 1.2vw, 1.5rem);
line-height: 1.6;
display: flex;
flex-direction: column;
align-items: center;
gap: clamp(1rem, 2vw, 2.5rem);
}
/* ============================================================
DREITEILIGES POPUP-LAYOUT (Titel / Story / Inhalt)
============================================================ */
.popup-day.popup-3part {
display: flex;
flex-direction: column;
gap: clamp(1rem, 2vw, 2.5rem);
width: 100%;
max-width: 1200px;
margin: 0 auto;
text-align: left;
}
/* --- Titelzeile --- */
.popup-header {
text-align: center;
border-bottom: 2px solid var(--ci-gold);
padding-bottom: 0.5rem;
}
.popup-header h2 {
font-size: clamp(1.5rem, 2vw, 2.5rem);
color: var(--ci-darkgreen);
margin: 0;
}
/* --- Hauptbereich mit zwei Spalten --- */
.popup-body {
display: grid;
grid-template-columns: 1fr 1fr;
gap: clamp(1rem, 2vw, 2rem);
align-items: start;
}
.popup-body .story {
max-width: 70ch;
line-height: 1.6;
color: #333;
}
.popup-body .addon {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
}
/* === Medien im 3-Part Layout === */
.popup-3part .popup-body .addon video,
.popup-3part .popup-body .addon img {
width: 100%;
max-width: clamp(300px, 40vw, 700px);
height: auto;
border-radius: 10px;
object-fit: contain;
box-shadow: 0 0 12px rgba(0, 0, 0, 0.25);
background: #000;
}
/* --- Mobile Ansicht: einspaltig --- */
@media (max-width: 900px) {
.popup-body {
grid-template-columns: 1fr;
}
.popup-day.popup-3part {
text-align: center;
}
.popup-body .addon {
margin-top: 1rem;
}
.popup-3part .popup-body .addon video,
.popup-3part .popup-body .addon img {
max-width: 100%;
width: 100%;
}
}
/* ============================================================
REZEPT-LAYOUT (Text mit umflossenem Bild)
============================================================ */
.popup-recipe .popup-body {
display: block;
column-count: 2;
column-gap: clamp(1.5rem, 3vw, 3rem);
text-align: justify;
}
.popup-recipe .popup-body img.recipe-image {
float: left;
width: clamp(240px, 30%, 380px);
margin: 0 1.5rem 1rem 0;
border-radius: 10px;
box-shadow: 0 0 8px rgba(0,0,0,0.15);
shape-outside: inset(0 round 10px);
}
.popup-recipe .popup-body h3 {
column-span: all;
font-size: clamp(1.2rem, 1.6vw, 1.8rem);
color: var(--ci-darkgreen);
margin: 1rem 0 0.5rem 0;
}
.popup-recipe .popup-body ul,
.popup-recipe .popup-body ol {
margin: 0 0 1rem 1.5rem;
padding: 0;
line-height: 1.6;
}
.popup-recipe .popup-body li {
break-inside: avoid;
}
/* --- Mobile Ansicht: Rezept einspaltig --- */
@media (max-width: 900px) {
.popup-recipe .popup-body {
column-count: 1;
}
.popup-recipe .popup-body img.recipe-image {
float: none;
display: block;
margin: 0 auto 1rem auto;
width: 100%;
max-width: 500px;
}
}
/* ============================================================
Allgemeine Gestaltung & Animationen
============================================================ */
/* Titel & Text */
#popup-content h2 {
font-size: clamp(1.4rem, 2vw, 2.6rem);
color: var(--ci-darkgreen);
margin-bottom: 1rem;
}
#popup-content p {
font-size: clamp(1rem, 1.1vw, 1.4rem);
line-height: 1.6;
color: #333;
max-width: 65ch;
}
/* Medien allgemein */
#popup-content video,
#popup-content img {
max-width: 100%;
height: auto;
display: block;
border-radius: 8px;
background: #000;
object-fit: contain;
}
/* Close-Button */
#popup-close {
position: absolute;
top: 12px;
right: 16px;
background: transparent;
border: none;
font-size: clamp(1.8rem, 2vw, 2.4rem);
color: var(--ci-gold);
cursor: pointer;
transition: transform 0.2s ease, color 0.2s ease;
z-index: 10;
}
#popup-close:hover {
transform: scale(1.2);
color: color-mix(in srgb, var(--ci-blue) 35%, var(--ci-gold));
}
/* Animationen */
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}
@keyframes popIn {
0% { transform: scale(0.9); opacity: 0; }
100% { transform: scale(1); opacity: 1; }
}
/* Geräteübergreifende Anpassung */
@media (max-height: 600px) {
#popup-box {
max-height: 85vh;
padding: 1rem;
}
}
@media (prefers-reduced-motion: reduce) {
* {
animation-duration: 0s !important;
transition: none !important;
}
}