/* 診所引用樣式 */
.clinic-reference {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 8px;
    margin-top: 16px;
    margin-bottom: 8px;
}

.clinic-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 4px 6px 12px;
}

.clinic-info {
    flex: 1;
    min-width: 0;
}

.clinic-details {
    display: flex;
    flex-direction: column;
}

.clinic-name {
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 14px;
    line-height: 1.4285714285714286em;
    color: #FFFFFF;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clinic-type {
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    font-size: 12px;
    line-height: 1.5em;
    color: #FFFFFF;
    margin: 0;
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.clinic-link {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 999px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    width: 44px;
    height: 44px;
}

.clinic-link:hover {
    background-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.comment-item {
    position: relative;
    transition: background-color 0.3s ease;
    border-radius: 8px;
    margin-bottom: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-bubble {
    line-height: 1.5;
    word-break: break-word;
}

.reply-indicator {
    background-color: #F3F4F6;
}

.heart-button {
    transition: all 0.2s ease;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transform: scale(1);
}

.heart-button:active {
    transform: scale(1.2);
}

.heart-button.active {
    color: #F46A6A;
}

.heart-button.active .heart-icon path {
    stroke: #F46A6A !important;
    fill: #F46A6A !important;
}

.heart-button:hover:not(.active) .heart-icon path {
    stroke: #F46A6A !important;
}

.heart-button:hover {
    color: #F46A6A;
}

/* 評論高亮動畫 */
@keyframes highlight {
    0% {
        background-color: rgba(255, 213, 128, 0.4);
    }

    100% {
        background-color: transparent;
    }
}

.highlight-comment {
    animation: highlight 2s ease-out;
}

/* Ensure comment item and its direct body wrapper do not clip the absolute menu */
.comment-item,
.comment-body-wrapper {
    overflow: visible !important;
}

/* 軟刪除評論的頭像 - 根據Figma設計 */
.comment-item.deleted .user-avatar {
    background-color: #F5F5F5;
    border: 1px solid #E9EAEB;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #A4A7AE;
}

.deleted-avatar {
    margin-top: 4px;
    background-color: #F5F5F5 !important;
    border: 1px solid #E9EAEB !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: #A4A7AE !important;
}

.deleted-avatar i {
    font-size: 20px;
    color: #A4A7AE;
}