/**
 * JSTZ Ads Pro - Frontend Styles
 */
.jstz-ad-wrapper {
    margin: 20px auto;
    text-align: center;
    clear: both;
    position: relative;
    max-width: 100%;
}

/* Site-Wide Zones */
.jstz-top-header-ad-zone {
    width: 100%;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 8px 0;
    text-align: center;
    position: relative;
    z-index: 9999;
}

.jstz-main-header-ad-zone {
    width: 100%;
    max-width: 1068px;
    margin: 18px auto;
    padding: 0 10px;
    box-sizing: border-box;
    text-align: center;
    clear: both;
    position: relative;
    z-index: 10;
}

.jstz-header-banner-ad-zone {
    display: inline-block;
    max-width: 100%;
    text-align: center;
}

.td-header-ad-wrap .jstz-ad-banner img,
.td-header-sp-rec .jstz-ad-banner img {
    max-height: 114px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.jstz-footer-ad-zone {
    width: 100%;
    margin: 20px auto;
    text-align: center;
    clear: both;
}

.jstz-sidebar-ad-zone,
.jstz-sidebar-widget-wrap {
    width: 100%;
    margin: 15px auto;
    text-align: center;
    clear: both;
}

.jstz-sidebar-ad-zone .jstz-ad-banner img,
.jstz-sidebar-widget-wrap .jstz-ad-banner img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* In-Article Zones */
.jstz-placement-before-content {
    margin-bottom: 24px;
}

.jstz-placement-paragraph {
    margin: 28px auto;
    display: block;
    clear: both;
}

.jstz-placement-after-content {
    margin-top: 24px;
}

/* Banner Styling */
.jstz-ad-banner {
    display: inline-block;
    max-width: 100%;
}

.jstz-ad-banner img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: opacity 0.2s ease-in-out;
}

.jstz-ad-banner img:hover {
    opacity: 0.95;
}

.jstz-ad-code {
    display: inline-block;
    max-width: 100%;
    overflow: hidden;
}

/* Sticky Top Bar */
.jstz-sticky-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 999999;
    padding: 8px 45px 8px 15px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Sticky Bottom Bar */
.jstz-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.12);
    z-index: 999999;
    padding: 10px 45px 10px 15px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Close Button for Sticky Bars */
.jstz-sticky-close {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: #334155;
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    font-size: 16px;
    font-weight: bold;
    line-height: 24px;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
}

.jstz-sticky-close:hover {
    background: #0f172a;
}

.jstz-sticky-content {
    max-width: 100%;
    text-align: center;
}

.jstz-sticky-content .jstz-ad-wrapper {
    margin: 0 !important;
}

@media (max-width: 768px) {
    .jstz-sticky-bar,
    .jstz-sticky-top-bar {
        padding: 6px 36px 6px 8px;
    }
}
