/* زاوية الإعلان المصغر + أيقونة الدعم */
.floating-corner-stack {
    position: fixed;
    right: 10px;
    bottom: 85px;
    z-index: 10510001;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
    font-family: 'Tajawal', system-ui, sans-serif;
}

html[dir='ltr'] .floating-corner-stack {
    right: auto;
    left: 10px;
}

.floating-corner-stack > * {
    pointer-events: auto;
}

/* أيقونة الدعم */
.floating-support-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 50px;
    color: #ffffff;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.floating-support-btn:hover {
    transform: scale(1.05);
    color: #ffffff;
}

.floating-support-btn__avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 1px 15px -3px rgba(0, 0, 0, 0.85);
}

.floating-support-btn__name {
    font-weight: 700;
    font-size: 12px;
    line-height: 1.2;
    text-shadow: 0 1px 10px #ab2e5b;
    margin-top: 2px;
    text-align: center;
    white-space: nowrap;
}

/* الإعلان المصغر — ~75% من بصمة زاوية الدعم (~160px → 120px) */
.mini-ad-popup {
    position: relative;
    width: 120px;
    display: none;
    opacity: 0;
    transform: translateY(8px) scale(0.96);
    transition:
        opacity 0.35s ease,
        transform 0.35s ease;
}

.mini-ad-popup--visible {
    display: block;
    opacity: 1;
    transform: translateY(0) scale(1);
}

.mini-ad-popup__close {
    position: absolute;
    top: -6px;
    left: 25px;
    z-index: 2;
    width: 22px;
    height: 22px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.72);
    color: #fff;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}

html[dir='ltr'] .mini-ad-popup__close {
    left: auto;
    right: -6px;
}

.mini-ad-popup__close:hover {
    background: rgba(0, 0, 0, 0.9);
}

.mini-ad-popup__link {
    display: block;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
    background: #fff;
    line-height: 0;
    width: fit-content;
}

.mini-ad-popup__img {
    display: block;
    height: 120px;
    width: 90px;
    object-fit: cover;
}

.mini-ad-popup__title {
    display: block;
    padding: 6px 8px;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.35;
    color: #1f2937;
    text-align: center;
    background: #fff;
    max-height: 2.7em;
    overflow: hidden;
}

@media (min-width: 769px) {
    .floating-corner-stack {
        bottom: 24px;
    }

    .mini-ad-popup {
        width: 135px;
    }

    .mini-ad-popup__img {
        width: 135px;
        height: 101px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .mini-ad-popup {
        transition: none;
    }
}
