/* WP Essen Rezepte – Mobile-first moderner Look 2025 */

/* ── Pull-to-Refresh ─────────────────────────────────── */
.er-ptr {
    height: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    opacity: 0;
    transition: height 0.25s ease, opacity 0.25s ease;
    color: #aaa;
    font-size: 13px;
}

.er-ptr-icon {
    width: 22px;
    height: 22px;
    border: 2.5px solid #ccc;
    border-top-color: transparent;
    border-radius: 50%;
    flex-shrink: 0;
    transition: transform 0.15s ease, border-color 0.2s ease;
}

.er-ptr--ready .er-ptr-icon {
    border-color: #0f766e;
    border-top-color: transparent;
}

.er-ptr--ready {
    color: #0f766e;
}

.er-ptr--refreshing .er-ptr-icon {
    border-color: #0f766e;
    border-top-color: transparent;
    animation: er-spin 0.7s linear infinite;
}

@keyframes er-spin {
    to { transform: rotate(360deg); }
}

.er-wrapper h3 { color: #fff; }

.er-wrapper {
    max-width: 720px;
    margin: 1em auto 5em;
    padding: 5px;
    font-family: 'Didact Gothic', Arial;
}

/* Header */
.er-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.er-title { font-size: 18px; font-weight: 700; }

.er-add-btn {
    background: #333;
    border: none;
    color: #fff;
    border-radius: 999px;
    width: 100px;
    height: 40px;
    font-size: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    cursor: pointer;
}

/* Cards */
.er-card {
    background: #29292c;
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
    color: #fff;
}

/* Selects */
.er-select {
    width: 100%;
    height: 100%;
    min-height: 41px;
    padding: 10px;
    border-radius: 7px;
    border: 0.5px solid #747474;
    margin-bottom: 8px;
    background: transparent;
}

/* Video Container */
.er-video {
    aspect-ratio: 16 / 9;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #000;
}

/* Facebook 16:9
   iPadOS rendert Facebooks Cross-Origin-iframe unzuverlässig, wenn es in
   einem 0px hohen padding-top-Container absolut positioniert wird. Deshalb
   bleibt Facebook im normalen aspect-ratio-Flow. */
.er-video--facebook {
    aspect-ratio: 16 / 9;
    height: auto;
    overflow: visible;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.er-video--facebook iframe {
    display: block;
    position: static;
    border-radius: 10px; /* da overflow:visible den Container-radius nicht clippt */
}

.er-video--facebook-pwa {
    aspect-ratio: auto;
    padding-top: 0;
    height: auto;
    max-width: none;
    overflow: visible;
}

.er-video--facebook-pwa iframe {
    display: block;
    position: static;
    width: 100%;
    height: 100%;
}

.er-video--facebook-pwa-portrait {
    aspect-ratio: auto;
    padding-top: 0;
}

/* TikTok & Facebook Reels: Hochformat 9:16 – padding-top Trick */
.er-video--tiktok,
.er-video--portrait {
    aspect-ratio: unset;
    padding-top: 177.78%;
    height: 0;
}

/* Instagram: eigener Container ohne Höhen-/Overflow-Einschränkung */
.er-instagram-container {
    width: 100%;
    border-radius: 10px;
    overflow: visible;
}

.er-video iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 10px;
}

.er-instagram-container iframe{
	height: 520px;
}

/* TikTok & Reels: iframe absolut positionieren */
.er-video--tiktok iframe,
.er-video--portrait iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Beschreibung */
.er-desc {
    white-space: pre-wrap;
    margin-top: 8px;
    line-height: 1.3;
    font-size: 20px;
}

/* Thumbnail */
.er-thumb {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}

/* Play-Button Overlay */
.er-play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.er-play-button {
    pointer-events: auto;
    background: rgba(0, 0, 0, 0.45);
    padding: 12px;
    border-radius: 50%;
    color: #fff;
    border: none;
    cursor: pointer;
}

/* Facebook Fallback-Link */
.er-fb-link {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 12px;
    background: #1877f2;
    color: #fff;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    width: fit-content;
}

.er-fb-link:hover { background: #0d65d8; color: #fff; }

/* Modal */
.er-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
}

.er-modal.open { display: flex; }

.er-modal-bg {
    position: absolute;
    inset: 0;
    background: rgb(0 0 0 / 83%);
    backdrop-filter: blur(4px);
}

.er-modal-card {
    position: relative;
    z-index: 2;
    background: #fff;
    border-radius: 14px;
    max-width: 680px;
    width: 100%;
    padding: 16px;
}

/* Formular */
.er-field { margin-bottom: 10px; }

.er-input {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #e9e9ee;
    box-sizing: border-box;
}

.er-submit {
    background: #0f766e;
    color: #fff;
    border: none;
    padding: 10px 14px;
    border-radius: 10px;
    cursor: pointer;
}

.er-hint { font-size: 12px; color: #666; }

/* Desktop */
@media (min-width: 900px) {
    .er-wrapper { padding: 24px; }
    .er-title { font-size: 20px; }
}
