/**
 * Sticky Footer Ads Pro
 * Frontend stylesheet.
 */

/*
 * ---------------------------------------------------------
 * Main sticky footer
 * ---------------------------------------------------------
 */

#sfap-sticky-footer {
    position: fixed;

    left: 0;
    right: 0;
    bottom: 0;

    width: 100%;

    z-index: 999999;

    display: none;

    box-sizing: border-box;

    background: #ffffff;

    text-align: center;

    /*
     * The height is controlled by CSS custom properties
     * calculated by frontend.js.
     */
    height: var(--sfap-footer-height, 60px);

    min-height: 0;

    /*
     * Prevent an AdSense creative from increasing the
     * height of the sticky wrapper.
     */
    overflow: hidden;

    /*
     * iPhone / iPad bottom safe area.
     */
    padding-bottom: env(safe-area-inset-bottom, 0px);

    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);

    box-sizing: border-box;
}


/*
 * Device has not been detected yet.
 */

#sfap-sticky-footer.sfap-device-pending {
    visibility: hidden;
}


/*
 * Device has been detected and is allowed.
 */

#sfap-sticky-footer.sfap-device-active {
    display: block;

    visibility: visible;
}


/*
 * Device has been detected but is not allowed.
 */

#sfap-sticky-footer.sfap-device-hidden {
    display: none;

    visibility: hidden;
}


/*
 * ---------------------------------------------------------
 * Ad shell
 * ---------------------------------------------------------
 */

#sfap-sticky-footer .sfap-ad-shell {
    position: relative;

    width: 100%;

    height: 100%;

    max-width: 100%;

    margin: 0 auto;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    box-sizing: border-box;
}


/*
 * Actual ad container.
 */

#sfap-sticky-footer .sfap-ad-container {
    position: relative;

    width: 100%;

    max-width: 100%;

    height: 100%;

    max-height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

    overflow: hidden;

    box-sizing: border-box;
}


/*
 * AdSense element.
 */

#sfap-sticky-footer .adsbygoogle {
    display: block !important;

    width: 100% !important;

    max-width: 100% !important;

    margin: 0 auto !important;

    box-sizing: border-box;
}


/*
 * ---------------------------------------------------------
 * Mobile
 * ---------------------------------------------------------
 */

@media (max-width: 767px) {

    #sfap-sticky-footer {
        /*
         * JS may overwrite this value.
         *
         * Fallback:
         */
        --sfap-footer-height: min(60px, 12vh);

        padding-left: 0;
        padding-right: 0;
    }

}


/*
 * ---------------------------------------------------------
 * Tablet
 * ---------------------------------------------------------
 */

@media (min-width: 768px) and (max-width: 1024px) {

    #sfap-sticky-footer {
        --sfap-footer-height: min(80px, 12vh);
    }

}


/*
 * ---------------------------------------------------------
 * Desktop
 * ---------------------------------------------------------
 */

@media (min-width: 1025px) {

    #sfap-sticky-footer {
        --sfap-footer-height: min(90px, 12vh);
    }

}


/*
 * ---------------------------------------------------------
 * Very small phones
 * ---------------------------------------------------------
 */

@media (max-width: 360px) {

    #sfap-sticky-footer {
        --sfap-footer-height: min(55px, 12vh);
    }

}


/*
 * ---------------------------------------------------------
 * Landscape mobile
 * ---------------------------------------------------------
 */

@media (max-width: 767px) and (orientation: landscape) {

    #sfap-sticky-footer {
        --sfap-footer-height: min(50px, 15vh);
    }

}


/*
 * ---------------------------------------------------------
 * Debug panel
 * ---------------------------------------------------------
 */

#sfap-debug-panel {
    position: fixed;

    left: 10px;

    bottom: calc(
        var(--sfap-footer-height, 60px)
        + 10px
    );

    z-index: 2147483647;

    width: auto;

    max-width: 280px;

    padding: 12px 14px;

    background: #111111;

    color: #ffffff;

    font-family: Arial, Helvetica, sans-serif;

    font-size: 13px;

    line-height: 1.6;

    text-align: left;

    border: 2px solid #ffffff;

    border-radius: 7px;

    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.45);

    pointer-events: none;

    box-sizing: border-box;
}


/*
 * Debug title.
 */

#sfap-debug-panel .sfap-debug-title {
    margin-bottom: 5px;

    padding-bottom: 5px;

    border-bottom: 1px solid rgba(255, 255, 255, 0.35);

    font-weight: bold;

    font-size: 14px;
}


/*
 * Debug values.
 */

#sfap-debug-panel span {
    font-weight: bold;

    color: #00ffff;
}


/*
 * ---------------------------------------------------------
 * Reduced motion
 * ---------------------------------------------------------
 */

@media (prefers-reduced-motion: reduce) {

    #sfap-sticky-footer {
        transition: none !important;
    }

}