/* ========================================================================== */
/* PISTON TRIBE - SINGLE TOPIC STYLES                                         */
/* Organized for clarity & performance.                                       */
/* ========================================================================== */




/* -------------------------------------------------------------------------- */
/* 1. TOPIC HEADER & BREADCRUMBS                                              */
/* -------------------------------------------------------------------------- */

.pt-breadcrumb-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.pt-breadcrumb-nav a {
    color: #888;
    text-decoration: none;
    transition: color 0.2s;
}
.pt-breadcrumb-nav a:hover { color: #d00; }
.pt-breadcrumb-nav .pt-sep { color: #ccc; }

/* Title & Status Row */
.pt-topic-title-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}
.pt-main-title {
    font-size: 2.2rem;
    font-weight: 900;
    margin: 0;
    line-height: 1.1;
    color: #000;
    letter-spacing: -0.5px;
    text-align: left;    /* 🏆 Force Left Alignment */
}
.pt-pin-icon { margin-right: 10px; font-size: 1.5rem; }





/* -------------------------------------------------------------------------- */
/* 2. DISCUSSION CONTROL CARD (ACTIONS & MOD TOOLS)                           */
/* -------------------------------------------------------------------------- */

.pt-discussion-control-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 40px;
    overflow: hidden;
}
.pt-card-row {
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Main Actions Row */
.pt-main-actions {
    background: #fff;
    display: flex;
    flex-wrap: nowrap;
}
.pt-btn-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 8px; 
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: 1px solid transparent;
}

/* Button Colors */
.pt-btn-black { 
    background: #000; 
    color: #fff !important; 
    border: 1px solid #000; 
}
.pt-btn-black:hover { 
    background: #333; 
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.pt-btn-white { 
    background: #fff; 
    color: #444 !important; 
    border: 1px solid #e0e0e0; 
}
.pt-btn-white:hover { 
    border-color: #bbb;
    background: #fcfcfc;
    color: #000 !important;
}

/* Push 'New Topic' to right on Desktop */
@media (min-width: 769px) {
    .pt-main-actions .pt-btn-white:last-child { margin-left: auto; }
}

/* Bookmark / Save Button Logic */
.pt-bookmark-toggle svg {
    color: #ccc; 
    transition: color 0.2s, fill 0.2s;
}
.pt-bookmark-toggle:hover svg { color: #fbc02d; }

/* FIX: Prevent Focus from looking Saved unless actually Saved */
.pt-bookmark-toggle:focus,
.pt-bookmark-toggle:active {
    background: #fff;       
    border-color: #e0e0e0;  
    color: #444 !important; 
    box-shadow: none !important;
    outline: none !important;
}

/* Saved (Active) State */
.pt-bookmark-toggle.is-active { 
    background: #fffdf0 !important; 
    border-color: #fbc02d !important; 
    color: #856404 !important; 
}
.pt-bookmark-toggle.is-active:focus,
.pt-bookmark-toggle.is-active:active {
    background: #fffdf0 !important;
    border-color: #fbc02d !important;
    color: #856404 !important;
}
.pt-bookmark-toggle.is-active svg {
    color: #fbc02d; 
    fill: #fbc02d; 
}

/* Moderator Zone */
.pt-mod-zone {
    background: #f9f9f9; 
    border-top: 1px solid #eee;
    justify-content: space-between; 
}
.pt-mod-label {
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #999;
    letter-spacing: 0.8px;
}
.pt-mod-btn-group { display: flex; gap: 10px; }
.pt-btn-mod {
    padding: 8px 16px !important;
    font-size: 0.75rem !important;
    border-radius: 6px;
}

/* Mod Buttons: Pin/Unpin (Red Border) */
.pt-mod-btn-group .pt-btn-white {
    background: #fff;
    color: #D00 !important; 
    border: 1px solid #D00;
    box-shadow: 0 1px 2px rgba(221, 0, 0, 0.05);
}
.pt-mod-btn-group .pt-btn-white:hover {
    background: #fff5f5;
    border-color: #a00;   
    color: #a00 !important;
    box-shadow: 0 4px 10px rgba(221, 0, 0, 0.08);
}

/* Mod Buttons: Delete (Red Fill) */
.pt-btn-red {
    background: #d00;
    color: #fff !important;
    border: 1px solid #d00;
}
.pt-btn-red:hover { 
    background: #b30000;
    border-color: #b30000;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* -------------------------------------------------------------------------- */
/* 3. POST & REPLY LAYOUT (GRID SYSTEM)                                       */
/* -------------------------------------------------------------------------- */

.pt-post-header {
    display: grid;
    grid-template-columns: 220px 1fr;
    background: #000;
    color: #fff;
    padding: 15px 20px;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
}
.pt-forum-post-row {
    display: grid;
    grid-template-columns: 220px 1fr; 
    grid-template-rows: auto 1fr;       
    background: #fff;
    border-bottom: 10px solid #f0f0f0;
}

/* Column 1: Author (Spans 2 Rows) */
.pt-author-col {
    grid-column: 1;
    grid-row: 1 / span 2;
    background: #f9f9f9;
    padding: 25px 20px;
    border-right: 1px solid #eee;
}

/* Column 2 Row 1: Meta Bar */
.pt-post-meta {
    grid-column: 2;
    grid-row: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
    padding: 15px 30px;
    font-size: 0.8rem;
    color: #999;
}
.pt-meta-info { flex-grow: 1; }
.pt-main-meta { flex-wrap: nowrap; }
.pt-meta-date-block { margin-right: 5px; }
.pt-meta-views-block { margin-right: auto; }
.pt-meta-edit-block { margin-left: auto; }

.pt-desktop-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto; 
}
.pt-badge-container { display: block; }

/* Column 2 Row 2: Content */
.pt-content-col {
    grid-column: 2;
    grid-row: 2;
    padding: 30px;
    position: relative;
}
.pt-post-body {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #222;
    min-height: 150px;
}

/* -------------------------------------------------------------------------- */
/* 4. AUTHOR PROFILE ELEMENTS                                                 */
/* -------------------------------------------------------------------------- */

.pt-author-name { font-weight: 800; color: #000; font-size: 1.1rem; }
.pt-author-role { font-size: 0.7rem; font-weight: 700; color: #888; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 15px; }
.pt-avatar { margin-bottom: 15px; }
.pt-avatar img { border-radius: 50%; }

.pt-verified-badge { 
    background: #f7d82f; 
    color: #000; 
    font-size: 0.6rem;
    font-weight: 800;
    text-transform: uppercase; 
    padding: 3px 5px;
    display: inline-block; 
    margin-bottom: 10px;
    line-height: 1;
    border-radius: 3px;
}
.pt-garage { margin-top: 15px; border-top: 1px solid #ddd; padding-top: 10px; font-size: 0.75rem; color: #444; }
.pt-garage-label {
    display: block;
    font-size: 0.65rem;
    text-transform: uppercase;
    color: #999;
    font-weight: 700;
    margin-bottom: 2px;
}
.pt-garage-car {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}
.pt-project-car .pt-garage-label { color: #d00; }
.pt-project-car .pt-garage-car { font-size: 0.9rem; color: #000; }

.pt-signature { margin-top: 50px; padding-top: 20px; border-top: 1px dashed #ddd; color: #888; font-size: 0.85rem; font-style: italic; }

/* Author Actions Block */
.pt-author-actions-block {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pt-follow-link, button.pt-follow-link {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    width: 100%;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    text-decoration: none !important;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s ease;
    background-color: #fff;
    border: 1px solid #d00;
    color: #d00;
}
.pt-follow-link:hover, button.pt-follow-link:hover {
    background-color: #d00;
    color: #fff;
}
.pt-follow-link.following, button.pt-follow-link.following {
    background-color: #b6b6b6;
    border-color: #b6b6b6;
    color: #fff;
}
.pt-follow-link.following:hover, button.pt-follow-link.following:hover {
    background-color: #fff;
    border-color: #d00;
    color: #d00;
}
.pt-msg-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    border-radius: 4px;
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    text-decoration: none !important;
    background-color: #f5f5f5;
    color: #666 !important;
    border: 1px solid #ededed;
    transition: all 0.2s;
}
.pt-msg-btn:hover {
    background-color: #e0e0e0;
    color: #000 !important;
}

/* Rank & Badges */
.pt-author-meta-block {
    width: 100%; /* Ensures it fills the 220px sidebar */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px;
    border-top: 1px solid rgba(0,0,0,0.05); 
    margin-top: 12px; 
    padding-top: 12px;
}
.pt-rep-row, .pt-rank-row {
    display: flex;
    align-items: center;
    gap: 6px; 
    position: relative; 
    cursor: default; 
}
.pt-rank-label {
    font-size: 0.7rem;
    font-weight: 900; 
    text-transform: uppercase;
    color: #000; 
    letter-spacing: 0.5px;
}
.pt-rep-val {
    color: #d00; 
    font-weight: 900;
    font-size: 0.8rem;
    letter-spacing: -0.2px;
}
.pt-tier-badge {
    background-color: #333; 
    color: #fff !important; 
    margin: 0 !important;
    padding: 2px 8px !important;
    font-size: 0.65rem !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.15);
    border-radius: 4px;
}

/* --- TOOLTIP VIEWPORT & CENTERING FIX --- */
.pt-tooltip-trigger {
    position: relative; /* Anchor for the popup */
}

.pt-tooltip-popup {
    visibility: hidden;
    opacity: 0;
    width: 220px;
    background-color: #000;
    color: #fff;
    padding: 12px;
    position: absolute;
    z-index: 10000; /* Ensure it stays above everything */
    left: 50%;
    transform: translateX(-50%); /* This is the best way to center */
    pointer-events: none;
    font-size: 0.75rem;
    line-height: 1.4;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    white-space: normal;
}

/* Tooltip Arrow Base */
.pt-tooltip-popup::after {
    content: "";
    position: absolute;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
}

/* Position: TOP (Show above the info) */
.pt-tooltip-popup.position-top {
    bottom: 125%;
    top: auto;
    margin-bottom: 10px;
}
.pt-tooltip-popup.position-top::after {
    top: 100%;
    border-color: #111 transparent transparent transparent;
}

/* Position: BOTTOM (Show below the info) */
.pt-tooltip-popup.position-bottom {
    top: 125%;
    bottom: auto;
    margin-top: 10px;
}
.pt-tooltip-popup.position-bottom::after {
    bottom: 100%;
    border-color: transparent transparent #111 transparent;
}

/* Hover State */
.pt-tooltip-trigger:hover .pt-tooltip-popup {
    visibility: visible;
    opacity: 1;
}

/* Mobile Tweak: Ensure it doesn't bleed off screen edges */
@media (max-width: 480px) {
    .pt-tooltip-popup {
        width: 180px; /* Narrower for small phones */
    }
}

/* -------------------------------------------------------------------------- */
/* 5. FOOTER ELEMENTS (Signature, Voting)                                     */
/* -------------------------------------------------------------------------- */

.pt-post-footer-row {
    display: flex;
    justify-content: space-between;
    align-items: center; 
    width: 100%;
    border-top: 1px dashed #eee; 
    margin-top: 20px;
    padding-top: 15px;
}
.pt-signature-area {
    width: 70%;
    overflow: hidden; 
}
.pt-signature-area .pt-signature {
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
    font-size: 0.85rem;
    color: #888;
    line-height: 1.4;
}
.pt-vote-col {
    width: 30%;
    display: flex;
    justify-content: flex-end; 
}
.pt-vote-widget {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border-radius: 6px;
    padding: 4px 6px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    gap: 8px; 
}
.pt-vote-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #ccc; 
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.pt-vote-btn svg { width: 22px; height: 22px; display: block; }
.pt-vote-btn:hover { background-color: #f5f5f5; color: #666; }
.pt-vote-btn.up.active { color: #ff4500; background-color: #fff0eb; }
.pt-vote-btn.down.active { color: #7193ff; background-color: #ebf0ff; }
.pt-score {
    font-weight: 700;
    font-size: 0.95rem;
    color: #333;
    min-width: 15px;
    text-align: center;
    line-height: 1;
}

/* -------------------------------------------------------------------------- */
/* 6. PARTS & MEDIA                                                           */
/* -------------------------------------------------------------------------- */

/* ========================================================================== */
/* 6. PARTS & MEDIA (Post-it Style Consolidated)                              */
/* ========================================================================== */

.pt-parts-box {
    margin-top: 40px !important;
    background-color: #fffdf5 !important; /* Post-it Yellow */
    border: 1px solid #f2e9c0 !important; 
    border-top: 3px solid #000 !important;
    padding: 30px !important;
    border-radius: 4px;
}

.pt-parts-box h4 {
    margin: 0 0 25px 0 !important;
    font-size: 1rem !important;
    font-weight: 800 !important;
    text-transform: uppercase;
    color: #000;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    padding-bottom: 15px;
}

.pt-parts-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 20px !important;
    justify-content: flex-start; 
}

/* Consolidated Card Logic */
.pt-part-card {
    width: calc(33.333% - 14px) !important; 
    min-width: 200px; 
    background: transparent !important; /* Blends with Post-it background */
    border: 1px solid #e8deb0 !important;
    padding: 15px !important;
    text-align: center;
    transition: all 0.2s ease;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: auto; 
}

.pt-part-card:hover {
    background: #fff !important; /* Pop to white on hover */
    border-color: #d00 !important;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.pt-part-card img.pt-part-img {
    height: 120px !important;        
    width: 100% !important;
    object-fit: contain !important;
    background-color: transparent !important;
    mix-blend-mode: multiply; /* Removes white boxes from product shots */
    margin: 0 auto 15px auto !important;
    display: block;
}

.pt-part-title {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
    margin-bottom: 8px;
    color: #000;
    font-weight: 700;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pt-part-price {
    color: #d00 !important;
    font-weight: 800 !important;
    display: block;
    margin-bottom: 10px;
}

/* Meta & Action Links */
.pt-part-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; 
    padding-top: 10px;
    width: 100%;
    gap: 10px;
}

.pt-part-verified {
    font-size: 0.65rem;
    color: #fff;
    background-color: #009715;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 3px;
}

.pt-part-action-link {
    font-size: 0.7rem;
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    transition: all 0.2s;
}

.pt-part-action-link.write-review { color: #d00; border-bottom: 1px solid rgba(221, 0, 0, 0.2); }
.pt-part-action-link.view-part { color: #999; }
.pt-part-action-link.view-part:hover { color: #d00; }

/* Dynamic Grid Adjustments */
.pt-parts-grid .pt-part-card:only-child {
    width: 100% !important;
    max-width: 100% !important;
    flex-direction: row !important;
    align-items: center !important;
    text-align: left !important;
}

.pt-parts-grid .pt-part-card:only-child img.pt-part-img {
    width: 120px !important; 
    margin: 0 25px 0 0 !important; 
}

.pt-parts-grid .pt-part-card:first-child:nth-last-child(2),
.pt-parts-grid .pt-part-card:first-child:nth-last-child(2) ~ .pt-part-card {
    width: calc(50% - 10px) !important; 
}

/* Media Grid & Attachments */
.pt-post-media-grid {
    display: flex !important;
    flex-wrap: nowrap !important; 
    overflow-x: auto !important;    
    -webkit-overflow-scrolling: touch; 
    padding-bottom: 12px;           
    scrollbar-width: thin;          
}

.pt-post-media-grid .pt-review-media-item { flex: 0 0 auto !important; }

.pt-reply-attachment {
    margin-top: 15px;
    border-top: 1px solid #eee;
    padding-top: 10px;
}

.pt-attachment-label {
    display: block;
    font-size: 0.7rem;
    color: #999;
    margin-bottom: 5px;
    font-weight: 700;
    text-transform: uppercase;
}

/* -------------------------------------------------------------------------- */
/* 7. MILESTONE TIMELINE                                                      */
/* -------------------------------------------------------------------------- */

.pt-milestone-timeline {
    background: #fff;
    border: 1px solid #eee;
    border-top: 4px solid #000;
    padding: 20px 0 20px 20px; 
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    overflow: hidden; 
}
.pt-milestone-timeline h4 {
    margin: 0 20px 15px 0 !important; 
    font-size: 0.8rem !important;
    text-transform: uppercase;
    font-weight: 900 !important;
    letter-spacing: 1px;
    border-bottom: 2px solid #000;
    padding-bottom: 15px;
    color: #000;
}
.pt-milestone-timeline ul {
    list-style: none;
    margin: 0;
    padding: 0 20px 15px 0; 
    display: flex;
    flex-wrap: nowrap !important; 
    gap: 15px;
    overflow-x: auto; 
    -webkit-overflow-scrolling: touch; 
    scrollbar-width: thin; 
}
.pt-timeline-link {
    display: flex;
    flex-direction: column;
    flex: 0 0 auto; 
    width: 150px;    
    background: transparent;
    padding: 12px 15px;
    border: 1px solid #ddd; 
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 100%; 
}
.pt-timeline-link:hover {
    background-color: #fff;
    border-color: #000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.pt-ms-date {
    font-size: 0.6rem;
    color: #000;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 6px;
    opacity: 0.5;
}
.pt-ms-label {
    font-size: 0.85rem;
    font-weight: 800;
    color: #000;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.pt-timeline-link:hover .pt-ms-date,
.pt-timeline-link:hover .pt-ms-label { color: #000; }

/* -------------------------------------------------------------------------- */
/* 8. SOLVED / SOLUTION STYLES                                                */
/* -------------------------------------------------------------------------- */


.pt-solution-badge {
    display: inline-block;
    background-color: #009715;
    color: #fff;
    font-weight: 800;
    font-size: 10px;        
    padding: 4px 10px;      
    border-radius: 2px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.pt-btn-solve, .pt-btn-mark-solved {
    display: inline-block;
    font-size: 0.7rem;        
    font-weight: 700;        
    color: #fff !important; 
    background: #d00;        
    border: 1px solid #d00; 
    padding: 4px 10px;      
    border-radius: 3px;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    opacity: 0.9;              
    transition: opacity 0.2s ease;
}
.pt-btn-solve:hover, .pt-btn-mark-solved:hover { opacity: 0.6; text-decoration: none; }

/* -------------------------------------------------------------------------- */
/* 9. REPLY FORM & GATE                                                       */
/* -------------------------------------------------------------------------- */

.pt-reply-section { background: #fff; padding: 20px; margin-top: 20px; }
.pt-reply-title { margin-bottom: 20px; text-transform: uppercase; font-weight: 800; }
.pt-gate-box { background: #f9f9f9; padding: 40px; text-align: center; border: 1px solid #eee; }

.pt-reply-wrapper {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    overflow: hidden;
    margin-bottom: 20px;
}
.pt-reply-toolbar {
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    padding: 8px 10px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.pt-reply-toolbar button {
    background: transparent;
    border: 1px solid transparent;
    cursor: pointer;
    font-size: 14px;
    padding: 4px 8px;
    border-radius: 3px;
    color: #333;
    font-weight: 600;
}
.pt-reply-toolbar button:hover { background: #e0e0e0; border-color: #ccc; }
.pt-vertical-sep { width: 1px; height: 20px; background: #ccc; margin: 0 8px; }
.pt-reply-wrapper textarea#comment {
    border: none !important;
    box-shadow: none !important;
    padding: 15px;
    width: 100%;
    outline: none;
    min-height: 150px;
    resize: vertical;
}
.pt-reply-wrapper textarea#comment:focus { background: #fff; }

/* -------------------------------------------------------------------------- */
/* 10. MOBILE RESPONSIVE OVERRIDES                                            */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
    /* Main Layout Stacking */
    .pt-forum-post-row {
        display: flex;
        flex-direction: column;
        border-bottom: 20px solid #f4f4f4;
        border-top: 1px solid #e0e0e0;
    }

    /* Author Column Reorganization */
    .pt-author-col {
        order: 1;
        background: #f9f9f9;
        padding: 15px 20px;
        border-bottom: none;
        border-right: none;
        text-align: left;
        display: grid;
        grid-template-columns: 125px 1fr; 
        column-gap: 15px;
        align-items: start;
        padding-bottom: 15px;
    }
    
    .pt-author-col .pt-avatar { grid-row: 1; grid-column: 1; margin: 0; }
    .pt-author-col .pt-avatar img { width: 60px; height: 60px; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
    
    .pt-author-col .pt-author-name {
        grid-row: 1;
        grid-column: 2; 
        font-size: 1.1rem;
        margin: 0 0 4px 0;
        align-self: center;
        line-height: 1.2;
    }
    
    .pt-author-col .pt-verified-badge {
        grid-row: 1;
        grid-column: 2;
        align-self: end;
        justify-self: start;
        margin: 28px 0 0 0 !important;
        font-size: 0.6rem;
        padding: 3px 6px;
    }

    /* Action Buttons (Stacked Left) */
    .pt-author-actions-block {
        grid-row: 3;
        grid-column: 1 / -1;
        display: grid !important; /* Changed from flex to grid for strict 50/50 sizing */
        grid-template-columns: 1fr 1fr; /* Forces two equal columns */
        gap: 10px;
        margin: 15px 0 !important;
        padding: 0 !important;
        border: none !important;
        width: 100%;
        max-width: 100%; /* Ensures it stays within the author column bounds */
        box-sizing: border-box;
    }
    
    .pt-follow-link, .pt-msg-btn {
        width: 100% !important; /* Fill its 50% grid cell */
        justify-content: center;
        text-align: center;
        margin: 0 !important;
        padding: 12px 5px !important; /* Slightly taller for better touch target */
        box-sizing: border-box;
    }

    /* If only one button is present (e.g., just Message), make it full width */
    .pt-author-actions-block:not(:has(button + button)) {
        grid-template-columns: 1fr;
    }

    /* Meta Block (Rep/Rank - Stacked Right) */
    .pt-author-col .pt-author-meta-block {
        grid-row: 2;
        grid-column: 1 / -1 !important; /* Forces span across both grid columns */
        width: 100% !important; 
        max-width: 100%;
        box-sizing: border-box; 
        display: flex !important;
        flex-direction: row !important; /* Keep items side-by-side on mobile */
        justify-content: space-around !important; /* Space stats evenly across full width */
        align-items: center;
        background: rgba(0,0,0,0.04); 
        padding: 12px 15px !important;
        border-radius: 6px;
        border: none !important;
        margin: 15px 0 !important; /* Added margin for vertical breathing room */
    }

    /* Content & Meta Reordering */
    .pt-post-meta {
        order: 2;
        display: flex;
        flex-direction: column-reverse;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        text-align: left !important;
        gap: 8px;
        padding: 15px;
        background: #ffffff;
        border-bottom: 1px solid #eee;
        width: 100%;
        box-sizing: border-box;
    }
    .pt-content-col {
        order: 3;
        padding: 25px 20px;
        background: #fff;
        text-align: left;
    }

    /* Footer & Actions Layout */
    .pt-post-footer-row { flex-direction: row; align-items: center; gap: 10px; justify-content: space-between; }
    .pt-signature-area { width: 60%; text-align: left; padding-right: 5px; }
    .pt-vote-col { width: 40%; justify-content: flex-end; }
    
    .pt-main-actions {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        grid-template-columns: none; /* Override previous grid settings */
        grid-template-areas: none;   /* Override previous grid areas */
    }
  
    /* Buttons: Default to 50% width, but grow to 100% if alone on a row */
    .pt-main-actions .pt-btn-action {
        flex: 1 1 calc(50% - 6px) !important; /* 50% width minus half the gap */
        margin: 0 !important;
        justify-content: center;
        text-align: center;
        min-width: 120px; /* Prevent squashing on very small screens */
    }
  
    .pt-btn-black { grid-area: reply; justify-content: center; }
    .pt-bookmark-toggle { grid-area: save; justify-content: center; }
    .pt-main-actions .pt-btn-white:last-child { grid-area: create; justify-content: center; margin-left: 0; }
  
    /* 🏆 FIX: For Logged Out Users (No Save Button) -> Force 50/50 Split */
    body:not(.logged-in) .pt-main-actions {
        grid-template-areas: "reply create" !important;
    }

    .pt-mod-zone { align-items: center; text-align: center; }
    .pt-mod-btn-group { flex-direction: row; width: 100%; }
    .pt-mod-btn-group form { flex: 1; }
    .pt-btn-mod { width: 100%; justify-content: center; }

    /* Meta Details */
    .pt-main-meta { display: grid !important; grid-template-columns: 1fr auto; gap: 5px 10px; padding-right: 15px; align-items: center; }
    .pt-main-meta .pt-meta-date-block { grid-column: 1; grid-row: 2; }
    .pt-main-meta .pt-meta-views-block { grid-column: 1 / -1; grid-row: 1; width: 100%; margin-bottom: 5px; }
    .pt-main-meta .pt-meta-edit-block { grid-column: 2; grid-row: 2; }

    .pt-comment-meta { display: flex !important; flex-direction: column !important; align-items: flex-start !important; gap: 10px; position: relative !important; padding-right: 15px !important; }
    .pt-comment-meta .pt-desktop-actions {
        order: -1;
        position: relative !important; width: 100%;
        display: flex; justify-content: space-between; align-items: center;
        margin-bottom: 5px; border-bottom: 1px dashed #eee; padding-bottom: 8px;
    }
    .pt-comment-meta .pt-meta-info { order: 2; width: 100%; font-size: 0.75rem; }

    /* Hide Desktop Elements */
    .pt-author-role, .pt-author-stats, .pt-garage, .pt-author-links { display: none; }
    .pt-topic-top-bar { justify-content: center; }
    .pt-main-title { font-size: 1.6rem !important; text-align: center; }
    .pt-topic-toolbar { flex-direction: column-reverse; }
    .pt-desktop-only-text { display: none; }
}





/* =========================================================
   1. BACKGROUND COLORS (Post-it Style & Solution)
   ========================================================= */

/* Main Topic: Warm "Post-it" Yellow */
.pt-main-topic-card {
    background-color: #fffdf5 !important; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.03) !important;
}

/* Ensure inner containers are transparent */
.pt-main-topic-card .pt-author-col,
.pt-main-topic-card .pt-content-col,
.pt-main-topic-card .pt-post-meta {
    background-color: transparent !important;
    border-color: rgba(0,0,0,0.05) !important;
}

/* Solution: Washed Green */
.pt-solution-card {
    background-color: #f0fdf4 !important; 
    border: 2px solid #bbf7d0 !important; 
    box-shadow: 0 0 15px rgba(22, 163, 74, 0.1) !important;
    border-radius: 8px;
    margin-bottom: 20px;
}

.pt-solution-card .pt-author-col,
.pt-solution-card .pt-content-col,
.pt-solution-card .pt-post-meta {
    background-color: transparent !important;
    border-color: rgba(0,0,0,0.05) !important;
}



/* =========================================================
   2. DESKTOP ACTION RESTORATION (As per Screenshot)
   ========================================================= */

.pt-desktop-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.pt-btn-mark-solved, .pt-btn-solve {
    background: #d00 !important;
    color: #fff !important;
    font-size: 0.75rem !important;
    font-weight: 800 !important;
    padding: 10px 18px !important;
    border-radius: 6px !important;
    text-transform: uppercase !important;
    text-decoration: none !important;
    line-height: 1;
}

.pt-delete-reply-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: #fff !important;
    border: 1px solid #ddd !important;
    border-radius: 6px !important;
    width: 40px;
    height: 40px;
    color: #d00 !important;
    cursor: pointer;
}

/* =========================================================
   3. MOBILE LAYOUT OVERRIDES 
   ========================================================= */
@media (max-width: 768px) {

    /* Full Width Parts Grid */
    .pt-parts-grid {
        display: block !important;
    }
    .pt-part-card {
        width: 100% !important;
        margin-bottom: 15px;
        min-width: 0 !important;
    }

    /* Author Column Grid Layout */
    .pt-author-col {
        display: grid !important;
        grid-template-columns: 60px 1fr !important;
        grid-template-rows: auto auto auto auto !important; 
        padding: 20px !important;
        align-items: center !important;
    }

    /* 1. Avatar */
    .pt-author-col .pt-avatar {
        grid-row: 1;
        grid-column: 1;
        margin: 0 !important;
        width: 60px;
        height: 60px;
    }
    .pt-author-col .pt-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 50%;
    }

    /* 2. Name */
    .pt-author-name {
        grid-row: 1;
        grid-column: 2;
        align-self: center;
        margin: 0 !important;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }
    
    .pt-verified-badge {
        margin: 4px 0 0 0 !important;
        align-self: flex-start;
        display: inline-block;
    }

    /* 3. Stats Block (Full Width) */
    .pt-author-meta-block {
        grid-row: 2;
        grid-column: 1 / -1; 
        width: 100% !important; 
        box-sizing: border-box; 
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between; 
        align-items: center;
        background: rgba(0,0,0,0.04); 
        padding: 12px 15px !important;
        border-radius: 6px;
        border: none !important;
        margin: 0 !important;
    }
    
    .pt-rep-row, .pt-rank-row {
        flex-direction: column; 
        align-items: center;
        gap: 2px;
        font-size: 0.75rem;
     	flex: 1;
        text-align: center;
        display: flex;
    }
    .pt-rank-label { 
        font-size: 0.6rem; 
        opacity: 0.7; 
        font-weight: 700;
        text-transform: uppercase;
    }

    /* 4. Action Buttons (Full Width) */
    .pt-author-actions-block {
        grid-row: 3;
        grid-column: 1 / -1;
        display: flex !important;
        flex-direction: row !important; /* Side by side on mobile */
        gap: 10px;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        width: 100%;
    }
    
    .pt-follow-link, .pt-msg-btn {
        flex: 1; 
        justify-content: center;
        text-align: center;
        margin: 0 !important;
        padding: 10px !important;
    }

    /* 5. Author Links (Horizontal Scroll) */
    .pt-author-links {
        grid-row: 4;
        grid-column: 1 / -1;
        display: flex !important;
        flex-direction: row !important; 
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        gap: 8px !important; 
        border-top: 1px dashed #ccc;
        padding-top: 15px;
        margin: 0 !important;
        scrollbar-width: none; /* Hide scrollbar Firefox */
    }
    
    .pt-author-links::-webkit-scrollbar { display: none; } /* Hide scrollbar Chrome/Safari */
    
    .pt-author-links a {
        display: inline-block;
        flex: 0 0 auto; /* Prevent shrinking */
        padding: 8px 12px;
        background: #fff;
        border: 1px solid #eee;
        border-radius: 20px;
        font-size: 0.75rem;
        white-space: nowrap;
        color: #000;
        text-decoration: none;
    }
}




/* ========================================= */
/* SINGLE TOPIC - AUTHOR META HELP ICONS     */
/* ========================================= */

/* 1. The Circle Icon Style */
.pt-help-icon {
    display: inline-flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 18px !important;
    height: 18px !important;
    border-radius: 50% !important;
    background: #f0f0f0 !important;
    color: #666 !important;
    font-size: 0.7rem !important;
    font-weight: bold !important;
    cursor: help !important;
    position: relative !important;
    line-height: 1 !important;
    margin-left: 4px;
    transition: background 0.2s, color 0.2s;
    border: none !important;
}

.pt-help-icon:hover {
    background: #e0e0e0 !important;
    color: #333 !important;
}

/* 2. Safety Fix: Ensure the trigger wrapper is invisible and doesn't stretch */
.pt-tooltip-trigger {
    display: inline-flex !important;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    margin: 0 !important;
    width: auto !important;
    height: auto !important;
    box-shadow: none !important;
    vertical-align: middle;
    line-height: 1;
}


/* 3. Ensure the actual HTML popup is styled correctly */
.pt-tooltip-popup {
    background-color: #000 !important;
    color: #fff !important;
    border-radius: 4px;
    padding: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5) !important;
}


/* =========================================================
   STATUS PILLS & BADGES (Updated)
   ========================================================= */

/* Base Pill Style */
.pt-status-pill {
    display: inline-flex;
    align-items: center;
    background: #f4f4f4;
    padding: 4px 10px;
    border-radius: 4px; /* More rectangular like a tag */
    gap: 6px;
    flex-shrink: 0;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    vertical-align: middle;
    line-height: 1;
}

/* Post Type: Project (Blue) */
.pt-type-project {
    background-color: #eef2ff;
    color: #4338ca;
    border-color: #c7d2fe;
}

/* Post Type: Q&A (Orange) */
.pt-type-question {
    background-color: #fffaf0; 
    color: #c05621;
    border-color: #feebc8;
}

/* Post Type: Discussion (Grey) */
.pt-type-discussion {
    background-color: #f7fafc;
    color: #4a5568;
    border-color: #edf2f7;
}

/* Specific Project Status Colors (Keep existing dot logic) */
.pt-status-wrenching .pt-indicator-dot { background: #ff9800; }
.pt-status-tuning .pt-indicator-dot { background: #2196f3; }
.pt-status-track .pt-indicator-dot { background: #4caf50; }

/* Mobile Tweak: Horizontal Scroll for Badges */
@media (max-width: 768px) {

    /* 1. Container: Stack Title & Badges Vertically */
    .pt-topic-title-row {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        width: 100%;
        overflow: hidden; /* Safety: Prevents parent container scrollbars */
    }

    /* 2. Title: Full Width */
        .pt-main-title {
        width: 100%;
        font-size: 1.6rem !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        text-align: left;
    }

    /* 3. Badges Container: Horizontal Scroll Logic */
    .pt-header-badges {
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important; /* Force single line */
        width: 100% !important;
        
        /* 🏆 SCROLL LOCKS: Enable X, Disable Y */
        overflow-x: auto !important;
        overflow-y: hidden !important; 
        
        /* Spacing */
        gap: 10px !important; /* Explicit space between pills */
        padding-right: 20px;  /* Breathing room at end of scroll */
        padding-bottom: 5px;  /* Tiny buffer for scrollbar */
        
        /* Physics */
        -webkit-overflow-scrolling: touch;
        white-space: nowrap !important;
        
        /* Hide Scrollbars */
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    
    .pt-header-badges::-webkit-scrollbar { 
        display: none; /* Chrome/Safari */
    }

    /* 4. Pills: Prevent Shrinking */
    .pt-status-pill {
        flex: 0 0 auto !important; /* Don't shrink */
        white-space: nowrap !important;
    }
}





/* --- Load More Button Styling --- */
#pt-load-more-comments {
    display: inline-block;
    padding: 12px 30px;
    background-color: #fff;
    color: #000;
    border: 1px solid #e0e0e0;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

#pt-load-more-comments:hover {
    background-color: #f9f9f9;
    border-color: #000;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}


/* Scroll to Top Button */
#pt-scroll-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: #000;
    color: #fff;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    border: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

#pt-scroll-top.is-visible {
    opacity: 1;
    visibility: visible;
}

#pt-scroll-top:hover {
    background: #333;
    transform: translateY(-3px);
}









/* Fix Edit Modal Layout (Override Center Align) */
#pt-edit-reply-modal .pt-modal-box {
    text-align: left;
    max-width: 650px; /* Give the editor more room */
}

#pt-edit-reply-modal .pt-modal-title {
    text-align: left;
}

#pt-edit-reply-modal textarea {
    min-height: 200px;
    margin-top: 10px;
}












