/**
 * TT Post Content Styles
 *
 * @package TT_Flux_Addon
 * @since 1.0.0
 */

/* Post Content Container */
.tt-post-content {
    width: 100%;
}

/* Featured Image */
.tt-post-content__featured-image {
    margin-bottom: 24px;
}

.tt-post-content__featured-image img {
    height: auto;
    border-radius: inherit;
}

/* Content Body — minimal resets so WP post styles render cleanly */
.tt-post-content__body {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.tt-post-content__body img {
    max-width: 100%;
    height: auto;
}

.tt-post-content__body p {
    margin-bottom: 1.5em;
}

.tt-post-content__body h1,
.tt-post-content__body h2,
.tt-post-content__body h3,
.tt-post-content__body h4,
.tt-post-content__body h5,
.tt-post-content__body h6 {
    margin-top: 1.2em;
    margin-bottom: 0.6em;
    line-height: 1.3;
}

.tt-post-content__body ul,
.tt-post-content__body ol {
    margin-bottom: 1.5em;
    padding-left: 1.5em;
}

.tt-post-content__body blockquote {
    margin: 1.5em 0;
    padding: 0.8em 1.2em;
    border-left: 4px solid currentColor;
    opacity: 0.85;
}

.tt-post-content__body pre {
    margin-bottom: 1.5em;
    padding: 1em;
    overflow-x: auto;
    background: #f5f5f5;
    border-radius: 4px;
}

.tt-post-content__body table {
    width: 100%;
    margin-bottom: 1.5em;
    border-collapse: collapse;
}

.tt-post-content__body table th,
.tt-post-content__body table td {
    padding: 0.5em;
    border: 1px solid #ddd;
}

/* Editor Placeholder */
.tt-post-content--placeholder {
    padding: 24px;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    background: #f9fafb;
}

.tt-post-content__editor-notice {
    display: flex;
    align-items: center;
    font-size: 14px;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

/* Pages Container */
.tt-post-content__pages {
    position: relative;
}

/* Individual Page */
.tt-post-content__page {
    display: none;
}

.tt-post-content__page--active {
    display: block;
}

/* Inherit body styles for page content */
.tt-post-content__page p {
    margin-bottom: 1.5em;
}

.tt-post-content__page h1,
.tt-post-content__page h2,
.tt-post-content__page h3,
.tt-post-content__page h4,
.tt-post-content__page h5,
.tt-post-content__page h6 {
    margin-top: 1.2em;
    margin-bottom: 0.6em;
    line-height: 1.3;
}

.tt-post-content__page img {
    max-width: 100%;
    height: auto;
}

/* Pagination Navigation Bar */
.tt-post-content__pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 14px;
    user-select: none;
}

/* Previous / Next Buttons */
.tt-post-content__pagination-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: #fff;
    color: #374151;
    font-size: inherit;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.tt-post-content__pagination-btn:hover:not(:disabled) {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.tt-post-content__pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Page Number Container */
.tt-post-content__pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Individual Page Number */
.tt-post-content__pagination-page {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #6b7280;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tt-post-content__pagination-page:hover {
    background: #f3f4f6;
    color: #374151;
}

.tt-post-content__pagination-page--active {
    color: #4f46e5;
    border-color: #4f46e5;
    background: #eef2ff;
    font-weight: 600;
    cursor: default;
}
