.recipe-comments-section {
    margin-top: 40px;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
}

.recipe-comments-section h3 {
    font-size: 1.4em;
    margin-bottom: 20px;
    color: #333;
}

/* コメントフォーム */
.comment-form {
    margin-bottom: 30px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

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

.user-info .user-name {
    font-weight: bold;
    color: #333;
}

.comment-input-area {
    width: 100%;
}

.comment-input-area textarea {
    width: 100%;
    min-height: 100px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    margin-bottom: 10px;
    font-size: 14px;
}

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

.add-photo-button {
    display: inline-flex;
    align-items: center;
    padding: 8px 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    font-size: 14px;
}

.add-photo-button:hover {
    background: #eee;
}

.submit-comment {
    padding: 8px 20px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.submit-comment:hover {
    background: #f57c00;
}

.submit-comment:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* 画像プレビュー */
.image-preview {
    margin: 10px 0;
}

.preview-image-container {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 4px;
    overflow: hidden;
}

.preview-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

/* コメントリスト */
.comment-thread {
    margin-bottom: 20px;
}

.comment {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-user .user-info {
    margin-bottom: 0;
}

.comment-date {
    color: #888;
    font-size: 0.9em;
}

.comment-content {
    margin-bottom: 15px;
}

.comment-content p {
    margin: 0;
    line-height: 1.6;
    font-size: 14px;
}

.comment-image {
    margin-top: 10px;
}

.comment-image img {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 4px;
}

/* 返信 */
.comment-replies {
    margin-left: 40px;
    margin-top: 10px;
}

.reply-button {
    padding: 6px 12px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-size: 14px;
}

.reply-button:hover {
    background: #f5f5f5;
}

.reply-form {
    margin: 10px 0;
    padding-left: 40px;
}

.reply-form textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 10px;
    resize: vertical;
    font-size: 14px;
}

.reply-actions {
    display: flex;
    gap: 10px;
}

.submit-reply {
    padding: 6px 15px;
    background: #ff9800;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.cancel-reply {
    padding: 6px 15px;
    background: transparent;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    font-size: 14px;
}

/* ログインリンク */
.login-to-comment {
    text-align: center;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.login-to-comment a {
    color: #ff9800;
    text-decoration: none;
}

.login-to-comment a:hover {
    text-decoration: underline;
} 