/* PRB Blog Enhancements v2.0 - All 5 Elements
 * Modern, clean, responsive design matching PRB IT Global's aesthetic
 * Handles: Tags, Share Buttons, Related Posts, Reply Count, Comment Form
 * Injects missing elements on ALB posts via JS
 */

/* =============================================
   1. TAGS SECTION - Pill Style
   ============================================= */
.prb-tags-section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.prb-tags-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: #333;
    text-transform: uppercase;
    margin-right: 4px;
}

.prb-tag-pill {
    display: inline-block;
    padding: 4px 12px;
    background: #f4f4f4;
    color: #555 !important;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    text-decoration: none !important;
    border-radius: 20px;
    transition: all 0.2s ease;
    border: 1px solid #e0e0e0;
}

.prb-tag-pill:hover {
    background: #333;
    color: #fff !important;
    border-color: #333;
    text-decoration: none !important;
}

/* =============================================
   INJECTED FOOTER CONTAINER
   ============================================= */
.prb-injected-footer {
    max-width: 800px;
    margin: 40px auto 0;
    padding: 0 20px;
}

/* =============================================
   2. SHARE SECTION
   ============================================= */
.prb-share-section {
    margin: 40px 0 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.prb-share-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin: 0 0 16px;
    text-transform: none;
}

.prb-share-buttons {
    display: flex;
    gap: 0;
}

.prb-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 44px;
    border: 1px solid #e0e0e0;
    color: #888 !important;
    text-decoration: none !important;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
    background: #fff;
}

.prb-share-btn:first-child {
    border-radius: 3px 0 0 3px;
}

.prb-share-btn:last-child {
    border-radius: 0 3px 3px 0;
}

.prb-share-btn + .prb-share-btn {
    border-left: none;
}

.prb-share-btn:hover {
    background: #333;
    color: #fff !important;
    border-color: #333;
    text-decoration: none !important;
}

.prb-share-btn svg {
    width: 18px;
    height: 18px;
}

/* =============================================
   3. RELATED POSTS SECTION
   ============================================= */
.prb-related-section {
    margin: 40px 0 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.prb-related-title {
    font-size: 14px;
    font-weight: 700;
    color: #333;
    margin: 0 0 20px;
}

.prb-related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.prb-related-item {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: #333 !important;
    padding: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.prb-related-item:hover {
    background: #f8f8f8;
    text-decoration: none !important;
}

.prb-related-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 50%;
    flex-shrink: 0;
}

.prb-related-item-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
    color: #333;
}

/* =============================================
   4. REPLY COUNT BADGE
   ============================================= */
.prb-reply-count-section {
    margin: 50px 0 30px;
    text-align: center;
    position: relative;
}

.prb-reply-divider {
    position: absolute;
    top: 28px;
    left: 0;
    right: 0;
    height: 1px;
    background: #eee;
    z-index: 0;
}

.prb-reply-count-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    background: #000;
    color: #fff;
    border-radius: 50%;
    position: relative;
    z-index: 1;
    margin-bottom: 8px;
}

.prb-reply-number {
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    color: #fff;
}

.prb-reply-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #333;
    text-transform: uppercase;
}

/* =============================================
   5. COMMENT FORM
   ============================================= */
.prb-comment-section {
    margin: 30px 0 40px;
}

.prb-comment-title {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    margin: 0 0 8px;
}

.prb-comment-subtitle {
    font-size: 13px;
    color: #888;
    margin: 0 0 20px;
    line-height: 1.5;
}

.prb-logged-in {
    font-size: 13px;
    color: #666;
    margin-bottom: 12px;
}

.prb-logged-in a {
    color: #333;
    font-weight: 600;
    text-decoration: none;
}

.prb-logged-in a:hover {
    text-decoration: underline;
}

.prb-required-note {
    font-size: 12px;
    color: #999;
    margin-bottom: 16px;
}

.prb-required-note .required {
    color: #e74c3c;
}

.prb-comment-form {
    margin-top: 16px;
}

.prb-textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    min-height: 120px;
    transition: border-color 0.2s ease;
    background: #fafafa;
    box-sizing: border-box;
}

.prb-textarea:focus {
    border-color: #333;
    outline: none;
    background: #fff;
}

.prb-comment-fields {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.prb-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: #fafafa;
    box-sizing: border-box;
}

.prb-input:focus {
    border-color: #333;
    outline: none;
    background: #fff;
}

.prb-submit-btn {
    display: inline-block;
    margin-top: 16px;
    padding: 14px 32px;
    background: #000 !important;
    color: #fff !important;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none !important;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.prb-submit-btn:hover {
    background: #444 !important;
}

/* Also style Enfold's native comment form for consistency */
#respond .comment-form input[type="text"],
#respond .comment-form input[type="email"],
#respond .comment-form input[type="url"],
#respond .comment-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s ease;
    background: #fafafa;
    box-sizing: border-box;
}

#respond .comment-form input:focus,
#respond .comment-form textarea:focus {
    border-color: #333;
    outline: none;
    background: #fff;
}

#respond .comment-form .submit {
    background: #000 !important;
    color: #fff !important;
    border: none !important;
    padding: 14px 32px !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    text-transform: uppercase !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
}

#respond .comment-form .submit:hover {
    background: #444 !important;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */
@media (max-width: 768px) {
    .prb-tags-section {
        gap: 6px;
    }

    .prb-tag-pill {
        padding: 3px 10px;
        font-size: 10px;
    }

    .prb-related-grid {
        grid-template-columns: 1fr;
    }

    .prb-comment-fields {
        grid-template-columns: 1fr;
    }

    .prb-share-btn {
        width: 44px;
        height: 40px;
    }

    .prb-injected-footer {
        padding: 0 16px;
    }

    .prb-reply-count-badge {
        width: 48px;
        height: 48px;
    }

    .prb-reply-number {
        font-size: 18px;
    }

    .prb-comment-title {
        font-size: 20px;
    }
}

/* =============================================
   PREVENT DUPLICATES WITH ENFOLD NATIVE
   ============================================= */
.av-share-box ~ .prb-injected-footer .prb-share-section {
    display: none;
}

.relatedposts ~ .prb-injected-footer .prb-related-section,
.related_posts ~ .prb-injected-footer .prb-related-section {
    display: none;
}

#respond ~ .prb-injected-footer .prb-comment-section {
    display: none;
}
