/* Twitter-style Feedback System */

/* Home page feedback widgets (simple counters) */
.feedback-widget.home-widget {
    margin: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.feedback-widget.home-widget .feedback-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.feedback-widget.home-widget .like-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid #e1e8ed;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    color: #657786;
}

.feedback-widget.home-widget .like-btn:hover {
    background: #f7f9fa;
    border-color: #e1406c;
    color: #e1406c;
}

.feedback-widget.home-widget .like-btn svg {
    transition: fill 0.2s ease;
}

.feedback-widget.home-widget .like-btn:hover svg {
    fill: #e1406c;
}

/* Liked state for home widget */
.feedback-widget.home-widget .like-btn.liked {
    background: #fdf2f8;
    border-color: #e1406c;
    color: #e1406c;
    cursor: not-allowed;
}

.feedback-widget.home-widget .like-btn.liked svg {
    fill: #e1406c;
}

.feedback-widget.home-widget .like-btn:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.feedback-widget.home-widget .comment-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #657786;
    font-size: 0.875rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem 0.75rem;
    border-radius: 20px;
    transition: all 0.2s ease;
}

.feedback-widget.home-widget .comment-indicator:hover {
    background: #f7f9fa;
    color: #1da1f2;
}

.feedback-widget.home-widget .comment-indicator svg {
    color: inherit;
}

/* Subpage feedback widgets (detailed view) */
.feedback-widget.subpage-widget {
    margin-top: 0;
    padding: 1.5rem;
    background: white;
    border-radius: 16px;
    border: 1px solid #e1e8ed;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.feedback-widget.subpage-widget .feedback-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #e1e8ed;
}

.feedback-widget.subpage-widget .stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #657786;
    font-size: 0.875rem;
    font-weight: 500;
}

.feedback-widget.subpage-widget .stat-item svg {
    color: #657786;
}

.feedback-widget.subpage-widget .interaction-section {
    margin-bottom: 1.5rem;
}

.feedback-widget.subpage-widget .like-btn-subpage {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border: 1px solid #e1e8ed;
    border-radius: 20px;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 600;
    color: #14171a;
}

.feedback-widget.subpage-widget .like-btn-subpage:hover {
    background: #f7f9fa;
    border-color: #e1406c;
    color: #e1406c;
}

.feedback-widget.subpage-widget .like-btn-subpage svg {
    transition: fill 0.2s ease;
}

.feedback-widget.subpage-widget .like-btn-subpage:hover svg {
    fill: #e1406c;
}

/* Liked state for subpage widget */
.feedback-widget.subpage-widget .like-btn-subpage.liked {
    background: #fdf2f8;
    border-color: #e1406c;
    color: #e1406c;
    cursor: not-allowed;
}

.feedback-widget.subpage-widget .like-btn-subpage.liked svg {
    fill: #e1406c;
}

.feedback-widget.subpage-widget .like-btn-subpage:disabled {
    opacity: 0.8;
    cursor: not-allowed;
}

.feedback-widget.subpage-widget .comment-section {
    margin-top: 1.5rem;
}

.feedback-widget.subpage-widget .comment-form {
    margin-bottom: 1.5rem;
}

.feedback-widget.subpage-widget .comment-input {
    width: 100%;
    min-height: 80px;
    padding: 1rem;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    background: white;
    color: #14171a;
    font-size: 1rem;
    font-family: inherit;
    line-height: 1.5;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.feedback-widget.subpage-widget .comment-input:focus {
    outline: none;
    border-color: #1da1f2;
    box-shadow: 0 0 0 2px rgba(29, 161, 242, 0.2);
}

.feedback-widget.subpage-widget .comment-input::placeholder {
    color: #657786;
}

.feedback-widget.subpage-widget .comment-submit-btn {
    margin-top: 0.75rem;
    padding: 0.75rem 1.5rem;
    background: #1da1f2;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.feedback-widget.subpage-widget .comment-submit-btn:hover {
    background: #1a91da;
}

.feedback-widget.subpage-widget .comment-submit-btn:disabled {
    background: #aab8c2;
    cursor: not-allowed;
}

.feedback-widget.subpage-widget .comments-list {
    margin-top: 1rem;
}

.feedback-widget.subpage-widget .comment-item {
    padding: 1rem;
    border-bottom: 1px solid #e1e8ed;
    background: #f7f9fa;
    border-radius: 12px;
    margin-bottom: 0.75rem;
}

.feedback-widget.subpage-widget .comment-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.feedback-widget.subpage-widget .comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.feedback-widget.subpage-widget .comment-author {
    color: #1da1f2;
    font-size: 0.875rem;
    font-weight: 600;
}

.feedback-widget.subpage-widget .comment-date {
    color: #657786;
    font-size: 0.75rem;
}

.feedback-widget.subpage-widget .comment-content {
    color: #14171a;
    font-size: 0.95rem;
    line-height: 1.4;
}

.feedback-widget.subpage-widget .comment-meta {
    color: #657786;
    font-size: 0.8rem;
}

.feedback-widget.subpage-widget .no-comments {
    color: #657786;
    font-style: italic;
    text-align: center;
    padding: 2rem;
    background: #f7f9fa;
    border-radius: 12px;
}

.feedback-widget.subpage-widget .success-message {
    color: #17bf63;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    font-weight: 500;
}

/* Return home button */
.return-home-btn {
    position: fixed;
    top: 2rem;
    right: 2rem;
    padding: 0.75rem 1.25rem;
    background: #1da1f2;
    color: white;
    border: none;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.return-home-btn:hover {
    background: #1a91da;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Comment popup */
.comment-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.comment-popup {
    background: white;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #e1e8ed;
}

.popup-header h3 {
    margin: 0;
    color: #14171a;
    font-size: 1.25rem;
}

.close-popup {
    background: none;
    border: none;
    font-size: 2rem;
    color: #657786;
    cursor: pointer;
    padding: 0;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.close-popup:hover {
    background: #f7f9fa;
    color: #14171a;
}

.popup-content {
    padding: 2rem;
    text-align: center;
}

.popup-content p {
    color: #657786;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.popup-actions {
    margin-top: 1.5rem;
}

.visit-tool-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: #1da1f2;
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.2s ease;
}

.visit-tool-btn:hover {
    background: #1a91da;
    transform: translateY(-2px);
}

/* Responsive design */
@media (max-width: 768px) {
    .feedback-widget.home-widget .feedback-actions {
        gap: 0.75rem;
    }
    
    .feedback-widget.home-widget .like-btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .feedback-widget.subpage-widget {
        padding: 1rem;
    }
    
    .feedback-widget.subpage-widget .feedback-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .return-home-btn {
        top: 1rem;
        right: 1rem;
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }
}