/* === FACEBOOK-STYLE BLOG INTERACTIONS - Complete Redesign === */

/* Facebook Color Palette */
:root {
    --fb-blue: #1877f2;
    --fb-blue-dark: #166fe5;
    --fb-red: #f02849;
    --fb-green: #42b72a;
    --fb-yellow: #f7b928;
    --fb-gray: #65676b;
    --fb-light-gray: #f0f2f5;
    --fb-border: #dddfe2;
    --fb-white: #ffffff;
    --fb-black: #1c1e21;
    --fb-hover: #e4e6eb;
    --fb-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    --fb-shadow-medium: 0 2px 12px rgba(0, 0, 0, 0.15);
    --fb-border-radius: 8px;
    --fb-border-radius-round: 50px;
    --fb-transition: 200ms cubic-bezier(0.08, 0.52, 0.52, 1);
}

/* Facebook-style Like Section */
.like-section {
    margin: 16px 0;
    padding: 0 16px;
    background: var(--fb-white);
    border-radius: var(--fb-border-radius);
    box-shadow: var(--fb-shadow);
}

.like-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--fb-light-gray);
    border: none;
    border-radius: var(--fb-border-radius-round);
    color: var(--fb-gray);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--fb-transition);
    position: relative;
    overflow: hidden;
    min-height: 36px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.like-btn:hover {
    background: var(--fb-hover);
    transform: scale(1.05);
}

.like-btn.liked {
    background: var(--fb-blue);
    color: var(--fb-white);
    animation: fbLikeAnimation 0.3s ease-out;
}

@keyframes fbLikeAnimation {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* Facebook-style Heart Icon */
.like-btn i {
    font-size: 16px;
    transition: var(--fb-transition);
}

.like-btn.liked i {
    animation: fbHeartBeat 0.3s ease-in-out;
}

@keyframes fbHeartBeat {
    0% { transform: scale(1); }
    50% { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Facebook-style Comments Section */
.comments-section {
    margin: 16px 0;
    background: var(--fb-white);
    border-radius: var(--fb-border-radius);
    box-shadow: var(--fb-shadow);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

.comments-header {
    padding: 16px;
    border-bottom: 1px solid var(--fb-border);
}

.comments-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    color: var(--fb-black);
    display: flex;
    align-items: center;
    gap: 8px;
}

.comments-header h3 i {
    color: var(--fb-gray);
}

/* Facebook-style Comment Form */
.comment-form-wrapper {
    padding: 16px;
    border-bottom: 1px solid var(--fb-border);
}

.comment-form {
    background: transparent;
    padding: 0;
    box-shadow: none;
}

.comment-form .form-row {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-form .form-group {
    flex: 1;
    margin-bottom: 0;
}

.comment-form label {
    font-size: 13px;
    font-weight: 600;
    color: var(--fb-gray);
    margin-bottom: 4px;
    text-transform: uppercase;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 12px;
    background: var(--fb-light-gray);
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-border-radius-round);
    font-size: 15px;
    color: var(--fb-black);
    transition: var(--fb-transition);
    font-family: inherit;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--fb-blue);
    background: var(--fb-white);
    box-shadow: 0 0 0 2px rgba(24, 119, 242, 0.2);
}

.comment-form textarea {
    min-height: 80px;
    resize: vertical;
    border-radius: var(--fb-border-radius);
}

/* Facebook-style Submit Button */
.comment-form .submit-btn {
    width: 100%;
    padding: 12px;
    background: var(--fb-blue);
    color: var(--fb-white);
    border: none;
    border-radius: var(--fb-border-radius-round);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--fb-transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.comment-form .submit-btn:hover {
    background: var(--fb-blue-dark);
    transform: scale(1.02);
}

.comment-form .submit-btn:active {
    transform: scale(0.98);
}

.comment-form .submit-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Facebook-style Character Counter */
.character-count {
    text-align: right;
    font-size: 13px;
    color: var(--fb-gray);
    margin-top: 4px;
}

.character-count.warning {
    color: var(--fb-yellow);
}

.character-count.error {
    color: var(--fb-red);
}

/* Facebook-style Error Messages */
.error-message {
    font-size: 13px;
    color: var(--fb-red);
    margin-top: 4px;
    display: none;
}

.error-message.show {
    display: block;
}

/* Facebook-style Comments List */
.comments-container {
    background: transparent;
    box-shadow: none;
}

.comments-list {
    padding: 0;
}

.comment {
    padding: 16px;
    border-bottom: 1px solid var(--fb-border);
    transition: var(--fb-transition);
}

.comment:hover {
    background: var(--fb-light-gray);
}

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

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--fb-blue) 0%, var(--fb-blue-dark) 100%);
    color: var(--fb-white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
}

.comment-author {
    font-size: 15px;
    font-weight: 600;
    color: var(--fb-blue);
}

.comment-date {
    font-size: 13px;
    color: var(--fb-gray);
}

.comment-content {
    font-size: 15px;
    line-height: 1.5;
    color: var(--fb-black);
    margin-bottom: 12px;
}

.comment-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Facebook-style Comment Like Button */
.comment-like-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-border-radius-round);
    color: var(--fb-gray);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--fb-transition);
}

.comment-like-btn:hover {
    background: var(--fb-light-gray);
    border-color: var(--fb-gray);
}

.comment-like-btn.liked {
    background: var(--fb-light-gray);
    border-color: var(--fb-blue);
    color: var(--fb-blue);
}

.comment-like-btn.liked:hover {
    background: var(--fb-hover);
}

.comment-like-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.comment-like-btn i {
    font-size: 14px;
}

.comment-like-count {
    font-weight: 500;
}

/* Facebook-style Reply Button */
.reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: transparent;
    border: 1px solid var(--fb-border);
    border-radius: var(--fb-border-radius-round);
    color: var(--fb-gray);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--fb-transition);
    text-decoration: none;
}

.reply-btn:hover {
    background: var(--fb-light-gray);
    border-color: var(--fb-gray);
}

/* Facebook-style Notifications */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: var(--fb-white);
    border-radius: var(--fb-border-radius);
    box-shadow: var(--fb-shadow-medium);
    padding: 16px;
    max-width: 320px;
    z-index: 9999;
    animation: fbSlideInRight 0.3s ease-out;
    border-left: 4px solid var(--fb-blue);
}

.notification-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.notification-message {
    flex: 1;
    font-size: 14px;
    color: var(--fb-black);
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--fb-gray);
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: var(--fb-transition);
}

.notification-close:hover {
    background: var(--fb-light-gray);
    color: var(--fb-black);
}

.notification-success {
    border-left-color: var(--fb-green);
}

.notification-error {
    border-left-color: var(--fb-red);
}

.notification-info {
    border-left-color: var(--fb-blue);
}

@keyframes fbSlideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Facebook-style Mobile Responsive */
@media (max-width: 768px) {
    .comments-section {
        margin: 12px 0;
        padding: 16px;
        border-radius: 0;
        box-shadow: none;
    }
    
    .comment-form-wrapper {
        padding: 16px;
    }
    
    .comment-form .form-row {
        flex-direction: column;
        gap: 8px;
    }
    
    .comment {
        padding: 16px 12px;
    }
    
    .comment-header {
        gap: 8px;
    }
    
    .comment-actions {
        gap: 6px;
    }
    
    .comment-like-btn,
    .reply-btn {
        padding: 8px 12px;
        font-size: 14px;
    }
    
    .notification {
        left: 16px;
        right: 16px;
        max-width: none;
    }
}

/* Facebook Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --fb-white: #242526;
        --fb-light-gray: #3a3b3c;
        --fb-border: #3e4042;
        --fb-black: #e4e6eb;
        --fb-hover: #4e4f50;
    }
    
    .comments-section {
        background: var(--fb-white);
    }
    
    .comment-form input,
    .comment-form textarea {
        background: var(--fb-light-gray);
        border-color: var(--fb-border);
        color: var(--fb-black);
    }
    
    .comment-form input:focus,
    .comment-form textarea:focus {
        border-color: var(--fb-blue);
        background: var(--fb-white);
    }
    
    .comment {
        border-bottom-color: var(--fb-border);
    }
    
    .comment:hover {
        background: var(--fb-hover);
    }
    
    .comment-content {
        color: var(--fb-black);
    }
    
    .comment-like-btn,
    .reply-btn {
        border-color: var(--fb-border);
        color: var(--fb-black);
    }
    
    .comment-like-btn:hover,
    .reply-btn:hover {
        background: var(--fb-hover);
        border-color: var(--fb-gray);
    }
    
    .notification {
        background: var(--fb-white);
        color: var(--fb-black);
    }
}

/* Facebook-style Accessibility */
.like-btn:focus-visible,
.comment-like-btn:focus-visible,
.reply-btn:focus-visible,
.comment-form button:focus-visible {
    outline: 2px solid var(--fb-blue);
    outline-offset: 2px;
}

/* Facebook-style Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .like-btn,
    .comment-like-btn,
    .reply-btn,
    .notification {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
}

/* Facebook-style High Contrast */
@media (prefers-contrast: high) {
    .like-btn,
    .comment-like-btn,
    .reply-btn {
        border-width: 2px;
    }
    
    .notification {
        border-left-width: 6px;
    }
}