/*
 * Saeed Shokouh - article rights notice and PDF control.
 * Scoped to avoid changing the approved Single Post architecture.
 */

.ss-article-rights {
    width: 100%;
    margin: 0 0 26px;
    padding: 13px 15px;

    display: flex;
    align-items: flex-start;
    gap: 10px;

    direction: rtl;
    text-align: right;

    border: 1px solid rgba(62, 28, 210, 0.14);
    border-right: 3px solid #3E1CD2;
    border-radius: 13px;
    background: rgba(247, 245, 255, 0.9);

    color: #575267;
    box-sizing: border-box;
}

.ss-article-rights__mark {
    width: 24px;
    height: 24px;
    flex: 0 0 24px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;
    background: #3E1CD2;
    color: #ffffff;
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
}

.ss-article-rights p {
    margin: 0 !important;
    color: inherit !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    line-height: 1.95 !important;
}

.ss-article-pdf-action {
    width: 100%;
    margin: 34px 0 8px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    direction: rtl;
}

.ss-article-pdf-download {
    min-height: 60px;
    padding: 4px 8px 4px 15px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;

    border: 1px solid rgba(213, 29, 42, 0.16);
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(45, 35, 38, 0.06);

    color: #343037 !important;
    text-decoration: none !important;

    transition:
        transform 0.25s ease,
        border-color 0.25s ease,
        box-shadow 0.25s ease;
}

.ss-article-pdf-icon {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    display: block;
    overflow: visible;
}

.ss-article-pdf-download__text {
    color: #343037;
    font-family: inherit;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.7;
    white-space: nowrap;
}

.ss-article-pdf-count {
    display: inline-flex;
    align-items: baseline;
    gap: 4px;
    color: #77717c;
    font-family: inherit;
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.5;
    white-space: nowrap;
}

.ss-article-pdf-count strong {
    color: #4c4650;
    font-size: 12.5px;
    font-weight: 800;
}

.ss-article-pdf-icon .ss-pdf-floaty {
    transform-box: fill-box;
    transform-origin: center;
    animation: ss-pdf-float 3s ease-in-out infinite;
}

.ss-article-pdf-icon .ss-pdf-badge {
    transform-box: fill-box;
    transform-origin: center;
    animation: ss-pdf-badge-pulse 2.4s ease-in-out infinite;
}

.ss-article-pdf-icon .ss-pdf-sparkle {
    transform-box: fill-box;
    transform-origin: center;
    animation: ss-pdf-sparkle 1.5s ease-in-out infinite;
}

.ss-article-pdf-icon .ss-pdf-sparkle--b {
    animation-delay: 0.5s;
}

@keyframes ss-pdf-float {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}

@keyframes ss-pdf-badge-pulse {
    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }
}

@keyframes ss-pdf-sparkle {
    0%,
    100% {
        opacity: 0.25;
        transform: scale(0.8);
    }

    50% {
        opacity: 1;
        transform: scale(1.15);
    }
}

@media (min-width: 1025px) and (hover: hover) {
    .ss-article-pdf-download:hover {
        transform: translateY(-2px);
        border-color: rgba(213, 29, 42, 0.34);
        box-shadow: 0 11px 25px rgba(213, 29, 42, 0.1);
    }
}

@media (max-width: 767px) {
    .ss-article-rights {
        margin-bottom: 21px;
        padding: 11px 12px;
    }

    .ss-article-rights p {
        font-size: 12px !important;
    }

    .ss-article-pdf-action {
        margin-top: 28px;
    }

    .ss-article-pdf-download {
        width: auto;
        min-height: 56px;
        padding: 3px 7px 3px 12px;
        justify-content: flex-start;
    }

    .ss-article-pdf-icon {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
    }

    .ss-article-pdf-download__text {
        font-size: 12.5px;
        white-space: normal;
    }

    .ss-article-pdf-count {
        font-size: 11px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ss-article-pdf-icon .ss-pdf-floaty,
    .ss-article-pdf-icon .ss-pdf-badge,
    .ss-article-pdf-icon .ss-pdf-sparkle {
        animation: none !important;
    }

    .ss-article-pdf-download {
        transition: none !important;
    }
}
