/**
 * WOCOO News — Feed Integration Styles
 * 
 * Styles for news feed cards to match watch page design
 * Dark action bar, centered stats, inline comments
 * 
 * @package WOCOO_News
 * @since 2.12.0
 * @updated 2.16.0 - Fixed inline comment input styling to match watch page
 */

/* ============================================================
   CLICKABLE TITLES
   ============================================================ */

.news-post .post-title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;
}

.news-post .post-title a:hover {
    color: #4CAF50;
}

/* ============================================================
   VERDICT & TRUST DISPLAY - Centered with dividers
   ============================================================ */

.fc-verified-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f9f9f9;
    border-top: 1px solid #eee;
}

.fc-status-col {
    flex: 1;
    padding-right: 16px;
    border-right: 1px solid #ddd;
}

.fc-verdict-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-right: 1px solid #ddd;
    text-align: center;
}

.fc-verdict-row,
.fc-trust-row {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.fc-verdict-label,
.fc-trust-label {
    color: #666;
    font-weight: 500;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fc-verdict-text {
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.fc-trust-value {
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.fc-trust-row {
    margin-top: 4px;
}

/* Verdict colors */
.verdict-green, .fc-verdict-text.verdict-green { color: #4CAF50; }
.verdict-orange, .fc-verdict-text.verdict-orange { color: #FF9800; }
.verdict-red, .fc-verdict-text.verdict-red { color: #F44336; }
.verdict-gray, .fc-verdict-text.verdict-gray { color: #9E9E9E; }

/* View button column */
.fc-verify-btn {
    flex-shrink: 0;
    margin-left: 16px;
}

/* ============================================================
   STATS ROW - Right aligned like watch page
   "YOU LIKED THIS" on left | ❤️ 1 | 💬 0 on right
   ============================================================ */

.news-post .stats-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    font-size: 14px;
    color: #666;
    border-top: 1px solid #eee;
}

.news-post .stats-row .stats-left {
    display: flex;
    align-items: center;
}

.news-post .stats-row .liked-text {
    color: #333;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-post .stats-row .stats-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-post .stats-row .like-stat,
.news-post .stats-row .comment-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.news-post .stats-row .like-stat svg {
    width: 16px;
    height: 16px;
    fill: #E91E63;
    stroke: none;
}

.news-post .stats-row .comment-stat svg {
    width: 16px;
    height: 16px;
    stroke: #666;
    fill: none;
}

.news-post .stats-row .stats-divider {
    color: #ddd;
    margin: 0 4px;
}

/* ============================================================
   FEED ACTION BUTTONS - Light grey like watch page
   ============================================================ */

.feed-action-buttons,
.news-post .feed-action-buttons {
    display: flex !important;
    background: #f5f5f5 !important;
    border-radius: 0 0 12px 12px !important;
    overflow: hidden !important;
    border-top: 1px solid #eee !important;
}

.feed-action-btn,
.news-post .feed-action-btn {
    flex: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px !important;
    background: transparent !important;
    border: none !important;
    border-right: 1px solid #e0e0e0 !important;
    color: #666 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.feed-action-btn:last-child,
.news-post .feed-action-btn:last-child {
    border-right: none !important;
}

.feed-action-btn:hover,
.news-post .feed-action-btn:hover {
    background: #eee !important;
}

.feed-action-btn.liked,
.news-post .feed-action-btn.liked {
    color: #E91E63 !important;
}

.feed-action-btn.liked svg,
.news-post .feed-action-btn.liked svg {
    fill: #E91E63 !important;
    stroke: #E91E63 !important;
}

.feed-action-btn svg,
.news-post .feed-action-btn svg {
    width: 22px !important;
    height: 22px !important;
    transition: transform 0.2s ease !important;
}

.feed-action-btn:hover svg,
.news-post .feed-action-btn:hover svg {
    transform: scale(1.15) !important;
}

.feed-action-btn:active svg,
.news-post .feed-action-btn:active svg {
    transform: scale(0.95) !important;
}

.feed-action-btn:disabled,
.news-post .feed-action-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* ============================================================
   INLINE COMMENTS SECTION (expandable in feed)
   ============================================================ */

.news-post .inline-comments {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    background: #fff;
}

.news-post .inline-comments.open {
    max-height: 600px;
}

.news-post .inline-comments-inner {
    padding: 0;
}

/* ============================================================
   INLINE COMMENT INPUT ROW - Match watch page exactly
   Grey background container with avatar outside input wrapper
   ============================================================ */

/* Outer container - light grey background */
.news-post .inline-comment-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: #fafafa;
    border-top: 1px solid #eee;
}

/* User avatar - outside the input wrapper */
.news-post .inline-comment-row .comment-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #e0e0e0;
}

/* Input wrapper - white background with thin border */
.news-post .inline-comment-row .comment-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    transition: border-color 0.2s;
}

/* Focus state - thin green border ONLY on the wrapper */
.news-post .inline-comment-row .comment-input-wrapper:focus-within {
    border-color: #4CAF50;
}

/* Text input */
.news-post .inline-comment-row .comment-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 15px;
    background: transparent !important;
    padding: 8px 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.news-post .inline-comment-row .comment-input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.news-post .inline-comment-row .comment-input::placeholder {
    color: #999;
}

/* Send button - perfectly round orange with paper airplane icon */
.news-post .inline-comment-row .comment-submit-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border: none;
    background: #FF9800;
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.news-post .inline-comment-row .comment-submit-btn:hover {
    background: #F57C00;
}

.news-post .inline-comment-row .comment-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.news-post .inline-comment-row .comment-submit-btn svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* Login prompt in inline comments */
.news-post .inline-comment-row.login-prompt-row {
    justify-content: center;
    padding: 20px;
}

.news-post .inline-comments .login-prompt {
    text-align: center;
    padding: 20px;
    background: #fafafa;
    color: #666;
    border-top: 1px solid #eee;
}

.news-post .inline-comments .login-prompt a {
    color: #4CAF50;
    font-weight: 600;
    text-decoration: none;
}

/* ============================================================
   LEGACY COMMENT INPUT STYLES (for backwards compatibility)
   These override the old structure where avatar was inside wrapper
   ============================================================ */

/* Old structure: avatar inside wrapper - fix it */
.news-post .comment-input-wrapper {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 24px;
    padding: 4px 4px 4px 16px;
    transition: border-color 0.2s;
}

.news-post .comment-input-wrapper:focus-within {
    border-color: #4CAF50;
    box-shadow: none;
}

.news-post .comment-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
    background: #ddd;
    margin-right: 10px;
}

.news-post .comment-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-size: 14px;
    background: transparent !important;
    padding: 8px 0;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.news-post .comment-input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

.news-post .comment-input::placeholder {
    color: #999;
}

.news-post .comment-submit-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    background: #FF9800;
    border: none;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    flex-shrink: 0;
    padding: 0;
}

.news-post .comment-submit-btn:hover {
    background: #F57C00;
}

.news-post .comment-submit-btn svg {
    width: 18px;
    height: 18px;
    fill: currentColor;
}

/* Comments list */
.news-post .comments-list {
    margin-top: 0;
    padding: 0 20px 20px;
    max-height: 300px;
    overflow-y: auto;
}

.news-post .comment-item {
    display: flex;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.news-post .comment-item:last-child {
    border-bottom: none;
}

.news-post .comment-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: #e0e0e0;
}

.news-post .comment-content {
    flex: 1;
}

.news-post .comment-author {
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.news-post .comment-text {
    font-size: 14px;
    color: #555;
    margin-top: 2px;
    line-height: 1.4;
}

.news-post .comment-time {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

.news-post .no-comments,
.news-post .loading-comments {
    text-align: center;
    color: #999;
    padding: 20px;
    font-size: 14px;
}

/* ============================================================
   TOAST NOTIFICATION
   ============================================================ */

.wocoo-feed-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 14px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

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

@media (max-width: 480px) {
    .feed-action-btn {
        padding: 14px !important;
    }
    
    .feed-action-btn svg {
        width: 20px !important;
        height: 20px !important;
    }
    
    .news-post .stats-row {
        font-size: 12px;
        flex-wrap: wrap;
        gap: 6px;
    }
    
    .news-post .inline-comment-row {
        padding: 12px 16px;
        gap: 10px;
    }
    
    .news-post .inline-comment-row .comment-avatar {
        width: 36px;
        height: 36px;
    }
    
    .news-post .inline-comment-row .comment-submit-btn {
        width: 36px;
        height: 36px;
        min-width: 36px;
        min-height: 36px;
    }
    
    /* Verdict area responsive */
    .fc-verified-section {
        padding: 10px 12px;
    }
    
    .fc-status-col {
        padding-right: 10px;
    }
    
    .fc-verdict-col {
        padding: 0 10px;
    }
    
    .fc-verdict-text {
        font-size: 18px;
    }
    
    .fc-trust-value {
        font-size: 14px;
    }
    
    .fc-verdict-label,
    .fc-trust-label {
        font-size: 10px;
    }
}