/**
 * ThBlog - Blog Module - Blog Post Styles
 *
 * @author    THECON
 * @copyright THECON
 * @license   http://opensource.org/licenses/afl-3.0.php  Academic Free License (AFL 3.0)
 */

#content-wrapper {
    padding-bottom: 0;
}

.thblog-post-page {
    overflow-x: hidden;
}

.thblog-post-content img,
.thblog-post-content iframe,
.thblog-post-content video {
    max-width: 100%;
}

/* ========= Post Cover ========= */
.thblog-post-cover {
    border-radius: var(--th-border-radius);
    overflow: hidden;
}

.thblog-post-cover img {
    display: block;
    width: 100%;
    height: auto;
}

/* Date badge hidden - moved inline with meta */
.thblog-post-date {
    display: none;
}

/* Date inline */
.thblog-post-date-inline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: #6c757d;
    font-family: 'Inter', sans-serif;
}

.thblog-post-date-inline .material-icons {
    color: var(--th-color-main-green, #1EC3A4);
}

/* Post meta */
.thblog-post-meta {
    font-size: 14px;
    color: #6c757d;
    font-family: 'Inter', sans-serif;
}

.thblog-post-author,
.thblog-post-comments {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ========= Sidebar - match blog listing ========= */
.thblog-sidebar {
    gap: 20px;
}

.thblog-widget-title {
    font-family: 'Inter', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #777;
    border-bottom: 1px solid var(--th-color-light-grey, #D6D4D4);
    padding-bottom: 8px;
    margin-bottom: 12px;
}

.thblog-search-input {
    border: 1px solid var(--th-color-light-grey, #D6D4D4);
    border-radius: 4px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.thblog-search-input button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.thblog-search-input svg {
    flex-shrink: 0;
}

.thblog-search-input svg path {
    fill: var(--th-color-main-green, #1EC3A4);
}

.thblog-search-input input {
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    color: #777;
    min-width: 0;
    padding: 4px 0 !important;
    height: auto !important;
    line-height: 1.3;
    box-shadow: none !important;
    outline: none !important;
    border: none !important;
    background-color: transparent !important;
}

.thblog-search-input input:-webkit-autofill,
.thblog-search-input input:-webkit-autofill:hover,
.thblog-search-input input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #fff inset !important;
    -webkit-text-fill-color: inherit !important;
    background-color: #fff !important;
    transition: background-color 5000s ease-in-out 0s;
}

.thblog-latest-image {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
    border-radius: 4px;
    overflow: hidden;
}

.thblog-latest-title {
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #777;
    margin: 0;
    line-height: 1.3;
}

.thblog-latest-date {
    font-size: 12px;
    color: #777;
}

.thblog-latest-author {
    font-size: 12px;
    color: #6c757d;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.thblog-latest-item:hover .thblog-latest-title {
    color: var(--th-color-main-green, #1EC3A4);
}

.thblog-categories-list li {
    padding: 6px 0;
    border-bottom: 1px solid var(--th-color-light-grey, #D6D4D4);
}

.thblog-categories-list li a {
    color: #777;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    transition: color 0.3s;
}

.thblog-categories-list li a:hover,
.thblog-categories-list li a.active {
    color: var(--th-color-main-green, #1EC3A4);
}

/* Remove default widget borders from template */
.thblog-post-page .thblog-widget.border {
    border: none !important;
    padding: 0 !important;
}

/* ========= Post Content ========= */
.thblog-post-content {
    font-size: 16px;
    line-height: 1.7;
    color: var(--th-color-grey-dark);
}

.thblog-post-content h2,
.thblog-post-content h3,
.thblog-post-content h4 {
    font-family: var(--th-font-accent);
    color: var(--th-color-black);
    margin-top: 1.5em;
    margin-bottom: 0.75em;
}

.thblog-post-content p {
    margin-bottom: 1em;
}

.thblog-post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--th-border-radius);
}

/* ========= Share Buttons ========= */
.thblog-share-label {
    font-size: 14px;
    color: var(--th-color-grey-dark);
    font-family: var(--th-font-accent);
}

.thblog-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--th-color-bej);
    color: var(--th-color-black);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.thblog-share-btn:hover {
    border-color: var(--th-color-main-green, #1EC3A4);
    color: var(--th-color-main-green, #1EC3A4);
}

/* ========= Comments Section ========= */
.thblog-comments {
    border-top: 1px solid var(--th-color-bej);
    padding-top: 30px;
}

.thblog-comments-title {
    font-family: var(--th-font-accent);
    font-size: 24px;
    color: var(--th-color-black);
}

/* ========= Comment Form ========= */
.thblog-comment-form {
    background-color: var(--th-color-bej);
    padding: 20px;
    border-radius: var(--th-border-radius);
}

.thblog-comment-form textarea {
    resize: vertical;
    min-height: 100px;
}

/* ========= Comments List ========= */
.thblog-comments-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.thblog-comment {
    background-color: var(--th-color-white);
    border: 1px solid var(--th-color-bej);
    border-radius: var(--th-border-radius);
    padding: 20px;
}

.thblog-comment-author {
    font-family: var(--th-font-accent);
    color: var(--th-color-black);
}

.thblog-comment-date {
    font-size: 13px;
}

.thblog-comment-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--th-color-grey-dark);
}

/* ========= Admin Answer ========= */
.thblog-admin-answer {
    background-color: var(--th-color-bej);
    border-left: 3px solid var(--th-color-teal);
    padding: 15px;
    border-radius: 0 var(--th-border-radius) var(--th-border-radius) 0;
}

.thblog-admin-answer-header {
    font-family: var(--th-font-accent);
    font-size: 14px;
    color: var(--th-color-teal);
}

.thblog-admin-answer-content {
    font-size: 14px;
    line-height: 1.6;
    color: var(--th-color-grey-dark);
}

/* ========= Desktop / Mobile visibility ========= */
.thblog-mobile-only {
    display: none;
}

@media (max-width: 991.98px) {
    .thblog-desktop-only {
        display: none;
    }

    .thblog-mobile-only {
        display: block;
    }

    .thblog-sidebar {
        margin-bottom: 24px;
    }
}

/* ========= Categories dropdown (mobile) ========= */
.thblog-categories-dropdown {
    width: 100%;
    padding: 8px 12px;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    color: #777;
    border: 1px solid var(--th-color-light-grey, #D6D4D4);
    border-radius: 4px;
    background-color: #fff;
    appearance: auto;
    cursor: pointer;
}

.thblog-categories-dropdown:focus {
    outline: none;
    border-color: var(--th-color-main-green, #1EC3A4);
    transition: border-color 0.2s ease;
}