/**
 * WP Content Chunker - Frontend Styles
 * Author: Shohel
 * Version: 1.7.0 — Mobile-first
 */

.wcc-content-wrapper {
    position: relative;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.wcc-chunk {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0;
    box-sizing: border-box;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

.wcc-chunk.wcc-hidden,
.wcc-next-post-wrap.wcc-hidden {
    display: none !important;
}

/* ========== Button ========== */
.wcc-button-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: center;
    margin: 1.75rem 0 1.5rem;
    padding: 0.35rem 0;
    clear: both;
    box-sizing: border-box;
}

.wcc-continue-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-height: 48px; /* mobile touch target */
    padding: 0.95rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
    text-decoration: none !important;
    text-align: center;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.wcc-continue-btn:hover,
.wcc-continue-btn:focus {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.2);
    outline: none;
    text-decoration: none !important;
}

.wcc-continue-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.wcc-continue-btn:not(.wcc-next-post-btn)::after {
    content: "→";
    font-size: 1.2em;
    font-weight: 700;
    transition: transform 0.2s ease;
    line-height: 1;
}

.wcc-continue-btn:not(.wcc-next-post-btn):hover::after {
    transform: translateX(5px);
}

.wcc-next-post-btn {
    font-weight: 700;
}

/* ========== Ads ========== */
.wcc-ad {
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: center;
    margin: 1.25rem 0;
    clear: both;
    overflow: hidden;
    box-sizing: border-box;
}

.wcc-ad-1,
.wcc-ad-2 {
    margin-top: 1.25rem;
    margin-bottom: 1.25rem;
}

.wcc-ad img,
.wcc-ad iframe,
.wcc-ad ins {
    max-width: 100% !important;
    height: auto;
}

.wcc-chunk + .wcc-button-wrap {
    margin-top: 2rem;
}

/* ========== Animations ========== */
.wcc-content-wrapper[data-animation="fade"] .wcc-chunk.wcc-animate {
    animation: wccFadeIn 0.5s ease forwards;
}

@keyframes wccFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.wcc-content-wrapper[data-animation="slide"] .wcc-chunk.wcc-animate {
    animation: wccSlideDown 0.45s ease forwards;
}

@keyframes wccSlideDown {
    from {
        opacity: 0;
        transform: translateY(-16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wcc-content-wrapper[data-animation="zoom"] .wcc-chunk.wcc-animate {
    animation: wccZoomIn 0.4s ease forwards;
}

@keyframes wccZoomIn {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========== Mobile-first tweaks ========== */
@media (max-width: 768px) {
    .wcc-button-wrap {
        margin: 1.5rem 0 1.25rem;
        padding: 0.25rem 0;
    }

    .wcc-continue-btn {
        min-height: 50px;
        padding: 1rem 1.1rem;
        font-size: 1.02rem;
        border-radius: 12px;
        gap: 0.45rem;
    }

    .wcc-ad {
        margin: 1.1rem 0;
    }

    .wcc-chunk + .wcc-button-wrap {
        margin-top: 1.75rem;
    }
}

@media (max-width: 480px) {
    .wcc-continue-btn {
        min-height: 52px;
        padding: 1.05rem 1rem;
        font-size: 1rem;
        border-radius: 12px;
    }

    .wcc-button-wrap {
        margin: 1.35rem 0 1.1rem;
    }
}

/* Prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    .wcc-continue-btn {
        transition: none;
    }
    .wcc-content-wrapper[data-animation] .wcc-chunk.wcc-animate {
        animation: none;
    }
}
