/**
 * Single Post Styles
 * Loaded only on is_singular()
 *
 * Includes: Post Meta, Comments, Post Tags, SEO Bottom Block
 *
 * @package MyChooz_Aesthetic
 */

/* ==========================================================================
   POST META (-30% emphasis)
   ========================================================================== */

.post-meta {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: nowrap;
    margin-bottom: 20px;
}

.post-meta-author {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* override: WP FSE blockGap generates gap on .wp-block-group */
.post-meta-author__text,
.post-meta-author__text.wp-block-group {
    display: flex;
    flex-direction: column;
    gap: 2px !important;
}

.post-meta-author__text .wp-block-post-author-name,
.post-meta-author__text .wp-block-post-date {
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

.post-meta-author img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
}

.post-meta-author a {
    color: #aaa;
    text-decoration: none;
    font-weight: 400;
    font-size: 12px;
}

.post-meta-author a:hover {
    color: var(--mca-text);
}

/* override: WP core post-date block styles */
.post-meta-author .wp-block-post-date,
.post-meta-author .wp-block-post-date time {
    font-size: 11px !important;
    font-weight: 400 !important;
    color: #aaa !important;
}

/* override inline font-weight: 500 on .wp-block-post-author-name */
.post-meta-author__text .wp-block-post-author-name {
    font-weight: 400 !important;
    font-size: 12px;
}

/* Post stats */
.post-meta-stats {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
    color: var(--mca-text);
}

.post-meta-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta-stats .stat-value {
    font-weight: 500;
    color: var(--mca-text);
}

.post-meta-stats svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    color: var(--mca-muted);
}

.post-meta-stats a {
    color: inherit;
    text-decoration: none;
}

.post-meta-stats a:hover .stat-value {
    color: var(--mca-text);
}

/* ==========================================================================
   COMMENTS
   ========================================================================== */

/* Base = .mca-sheet (style.css). Здесь только specifics. */
.comments-section {
    margin-top: 24px;
    padding: 20px;
}

.single main.mca-sheet {
    padding: 20px;
}

@media (max-width: 768px) {
    .comments-section,
    .single main.mca-sheet {
        padding: 16px;
    }
}

/* ==========================================================================
   POST TAGS (Island)
   ========================================================================== */

.post-tags {
    padding-top: 24px;
    border-top: 1px solid var(--mca-border);
    gap: 10px;
}

/* Hide if no tags */
.post-tags:not(:has(a)) {
    display: none;
}

.post-tags__icon {
    width: 16px;
    height: 16px;
    color: var(--mca-muted);
    flex-shrink: 0;
}

.post-tags__list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
}

.post-tags__list a {
    display: inline-flex;
    padding: 4px 10px;
    background: var(--mca-bg);
    border-radius: var(--mca-radius-sm);
    font-size: 12px;
    color: var(--mca-text);
    text-decoration: none;
    transition: all 150ms;
}

.post-tags__list a:hover {
    background: var(--mca-text);
    color: var(--mca-surface);
}

/* ==========================================================================
   SEO BOTTOM BLOCK
   ========================================================================== */

.seo-bottom {
    margin-top: 16px;
}

.seo-bottom__title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    text-align: center;
}

.seo-bottom__text {
    font-size: 14px;
    color: var(--mca-muted);
    text-align: center;
    line-height: 1.7;
}

.seo-bottom__text a {
    color: var(--mca-link);
    text-decoration: none;
}

.seo-bottom__text a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   LEGACY VIDEO FALLBACK (if PHP filter misses something)
   ========================================================================== */

.rhpb-video-wrapper,
.gs-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.rhpb-video-wrapper iframe,
.gs-video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ==========================================================================
   SINGLE RESPONSIVE
   ========================================================================== */

/* Mobile edge-to-edge handled by .mca-sheet in style.css */

@media (max-width: 480px) {
    .post-meta-stats {
        gap: 12px;
    }
}
