/* =====================================================================
   DONATION POPUP – right-docked slide-out panel
   ===================================================================== */

@keyframes panelSlideIn {
    from {
        opacity: 0;
        transform: translateX(-12px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Wrapper – anchored to right edge, vertically centred */
.popup-dock {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: row;
    align-items: stretch;
}

/* ── Vertical tab ──────────────────────────────────────────────────── */
.popup-dock__tab {
    order: 1;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background: linear-gradient(180deg, #535225 0%, #535225 100%);
    color: #fff;
    border: none;
    border-radius: 0 8px 8px 0;
    padding: 1rem 0.5rem;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    box-shadow: -3px 2px 12px rgba(0, 0, 0, 0.22);
    transition: background 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}

.popup-dock__tab:hover {
    background: linear-gradient(180deg, #535225 0%, #535225 100%);
    box-shadow: 6px 2px 22px rgba(0, 0, 0, 0.32);
}

/* Keep emoji upright inside vertical text */
.popup-dock__tab-icon {
    writing-mode: horizontal-tb;
    font-size: 1.3rem;
}

/* Only show the active language in the tab */
.popup-dock__tab-text .lang-de {
    display: inline;
}

.popup-dock__tab-text .lang-ar {
    display: none;
}

html[data-lang="ar"] .popup-dock__tab-text .lang-de {
    display: none;
}

html[data-lang="ar"] .popup-dock__tab-text .lang-ar {
    display: inline;
}

/* ── Sliding panel ─────────────────────────────────────────────────── */
.popup-dock__panel {
    order: 2;
    width: 0;
    overflow: hidden;
    opacity: 0;
    transition: width 380ms cubic-bezier(0.22, 1, 0.36, 1),
        opacity 280ms ease;
}

.popup-dock.is-open .popup-dock__panel {
    width: 40vw;
    opacity: 1;
}

/* Inner card – fixed width so content never reflows during animation */
.popup-dock__panel-inner {
    width: 40vw;
    background: #fff;
    border-radius: 0 12px 12px 0;
    box-shadow: 8px 0 32px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    position: relative;
    animation: panelSlideIn 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Close button */
.popup-dock__close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 1.8rem;
    height: 1.8rem;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    z-index: 1;
    transition: background 0.15s;
}

.popup-dock__close:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Building photo */
.popup-dock__img {
    width: 100%;
    height: 110px;
    object-fit: cover;
    display: block;
}

/* Text area */
.popup-dock__content {
    padding: 0.75rem 1rem 1rem;
}

.popup-dock__title {
    margin: 0 0 0.4rem;
    font-size: 1.3rem;
    color: #7a1010;
    line-height: 1.35;
}

.popup-dock__text {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
    color: #333;
    line-height: 1.55;
}

/* Timer bar */
.popup-dock__timer-wrap {
    height: 3px;
    background: #f0e0e0;
    border-radius: 999px;
    margin-bottom: 1rem;
    overflow: hidden;
}

.popup-dock__timer-bar {
    height: 100%;
    width: 100%;
    background: linear-gradient(90deg, #f59e0b, #d11a1b);
    border-radius: 999px;
}

/* CTA button */
.popup-dock__cta {
    display: block;
    text-align: center;
    background: linear-gradient(135deg, #d11a1b 0%, #9f1213 100%);
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.5rem 1rem;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(209, 26, 27, 0.35);
    transition: opacity 0.2s;
}

.popup-dock__cta:hover {
    opacity: 0.88;
}

/* ── Arabic RTL adjustments ──────────────────────────────────────────── */
html[data-lang="ar"] .popup-dock__title,
html[data-lang="ar"] .popup-dock__text {
    text-align: right;
    direction: rtl;
}

/* ── Mobile: cap panel width ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .popup-dock.is-open .popup-dock__panel {
        width: 90vw;
    }

    .popup-dock__panel-inner {
        width: 90vw;
    }
}