/**
 * Webinew Footer Signature
 * Styles for the Webinew design signature widget in footer
 */

:root {
    --webinew-footer-signature-bg: transparent;
    --webinew-footer-signature-color: inherit;
    --webinew-footer-signature-min-height: 40px;
}

.webinew-footer-signature {
    width: 100%;
    flex-basis: 100%;
    box-sizing: border-box;
    background-color: var(--webinew-footer-signature-bg, transparent);
    min-height: var(--webinew-footer-signature-min-height, 40px);
    display: flex;
    align-items: center;
    font-size: 13px;
    line-height: 1.6;
    color: var(--webinew-footer-signature-color, inherit);
    font-family: inherit;
    clear: both;
    direction: rtl;
    margin: 0;
    padding: 0;
}

.webinew-footer-signature__inner {
    width: 100%;
    max-width: 1320px;
    min-height: inherit;
    margin: 0 auto;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    box-sizing: border-box;
}

.webinew-footer-signature__copyright {
    text-align: right;
    color: inherit;
    flex: 1 1 auto;
}

.webinew-footer-signature__credit {
    text-align: left;
    white-space: nowrap;
    color: inherit;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

/* دکمه دایره‌ای بازگشت به بالا */
a.webinew-footer-signature__scroll-top,
.webinew-footer-signature__scroll-top {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    max-width: 34px !important;
    min-height: 34px !important;
    max-height: 34px !important;
    border-radius: 50% !important;
    background-color: var(--webinew-fs-scroll-top-bg, var(--e-global-color-primary, #d00018)) !important;
    color: var(--webinew-fs-scroll-top-color, #ffffff) !important;
    border: none !important;
    outline: none !important;
    cursor: pointer !important;
    padding: 0 !important;
    margin: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease, background-color 0.2s ease, opacity 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2) !important;
    flex-shrink: 0 !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
}

.webinew-footer-signature__scroll-top svg {
    display: block !important;
    width: 16px !important;
    height: 16px !important;
    stroke: var(--webinew-fs-scroll-top-color, #ffffff) !important;
    stroke-width: 2.5 !important;
    fill: none !important;
    transition: transform 0.25s ease !important;
    margin: 0 auto !important;
}

.webinew-footer-signature__scroll-top:hover {
    transform: translateY(-3px) scale(1.08) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3) !important;
    opacity: 0.95 !important;
    color: var(--webinew-fs-scroll-top-color, #ffffff) !important;
}

.webinew-footer-signature__scroll-top:hover svg {
    transform: translateY(-2px) !important;
    stroke: var(--webinew-fs-scroll-top-color, #ffffff) !important;
}

.webinew-footer-signature__scroll-top:active {
    transform: translateY(0) scale(0.96) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) !important;
}

.webinew-footer-signature__prefix {
    color: inherit;
    display: inline;
}

.webinew-footer-signature__link {
    color: inherit;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease, color 0.2s ease;
    display: inline;
}

.webinew-footer-signature__text,
.webinew-footer-signature__link--plain {
    color: inherit;
    text-decoration: none;
    font-weight: 500;
    display: inline;
}

.webinew-footer-signature__link:hover,
.webinew-footer-signature__link:focus {
    opacity: 0.8;
    color: inherit;
}

/* Fallback when no standard footer element is discovered in DOM */
.webinew-footer-signature--fallback {
    position: relative;
    width: 100%;
}

/* Mobile & Tablet responsiveness */
@media (max-width: 767px) {
    .webinew-footer-signature__inner {
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        padding: 12px 16px;
    }

    .webinew-footer-signature__copyright,
    .webinew-footer-signature__credit {
        width: 100%;
        text-align: center;
    }

    .webinew-footer-signature__credit {
        white-space: normal;
    }
}
